English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 01 August 2024, 16:22   #61
Kreator
Registered User
 
Join Date: Dec 2022
Location: UK
Posts: 6
Quote:
Originally Posted by morbid View Post
I took me years to figure it out...



Now, this sounds interesting! Do you have any suggestions?

Not wishing to resurrect an old thread, but I started tinkering with some old ideas I'd had many aeons ago. I wanted to expand on the rotator I did for Brian the Lion to a full screen roto-zoom like effect, only to discover that Axis had already done something similar in RockLobster. Nevertheless I persevered and created a 320x256, 16 colour 1x1 pixel rotator running at 50fps using the old double shear technique. It's not really a roto-zoom as the zoom is just the usual side-effect from the double shear effect - Axis did comspensate for that in his code, so it's not entirely comparable, and used a C2P approach to doing the vertical shear.

However the point of commenting on this thread is that for the vertical shear I'm using a similar technique to what's described here I believe. I shear within a 16 pixel wide block using 4 blitter passes, all at run-time. So unlike the full screen rotator which was incremental, this one can be set to an arbitrary angle at run-time.

[ Show youtube player ]

I could have 'optimised' it a bit to use fewer passes based on the shear angle, but it wasn't really worth it. It's already cutting down the number of horizontal copies based on shear angle, so in some frames there's a load of blitter time free. But in the worst case I think I'm using about 90% of the frame. I tried triple buffering so that some frames could run over a bit and claw back the time on the lighter frames. But the issue is that it goes in cycles, so I'd need far more than 3 buffers to avoid over-running before I had free frame time to claw it back.

Still it can easily be optimised further, for one thing most of my code is written in C, only a few critical functions are hand optimised assembly.

I thought at the time, this technique could be used for a sine scroller without even realising it had already been done
Kreator is offline  
Old 01 August 2024, 16:26   #62
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,215
That looks great!!!

You should definitely get back into demo coding!
DanScott is offline  
Old 01 August 2024, 16:45   #63
Kreator
Registered User
 
Join Date: Dec 2022
Location: UK
Posts: 6
Quote:
Originally Posted by DanScott View Post
That looks great!!!

You should definitely get back into demo coding!
Thanks Dan!

I've reigned in my ambitions a little to something more achievable, so hopefully I will get round to it this year.
Kreator is offline  
Old 01 August 2024, 17:05   #64
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,515
Quote:
Originally Posted by Kreator View Post
I wanted to expand on the rotator I did for Brian the Lion..
Which still remains one of the best in existence!

Quote:
.. to a full screen roto-zoom like effect
Awesome!
ross is offline  
Old 01 August 2024, 18:04   #65
morbid
Registered User
 
Join Date: Aug 2020
Location: Huddinge
Posts: 25
When I got back into amiga coding (10 years ago now... time flies...), I tried to do bitmap rotation with shears, but I thought you had to use 3 shears. I was not aware of the fact that 2 was enough. I only managed to do a small one in 64x64 pixels or so in one bitplane.

Can only agree with @Dan and @Ross. Awesome, and please make a new demo!
morbid is offline  
Old 01 August 2024, 18:52   #66
Jobbo
Registered User
 
Jobbo's Avatar
 
Join Date: Jun 2020
Location: Druidia
Posts: 391
Wow! Really cool to see Kreator on here and coding Amiga again!

That full-screen rotator looks very nice.

Poking around your youtube channel I also spotted your 256x256x16 rotator, also excellent to see!

I made my own tribute to your and Mr.Pets rotators in a recent demo: https://www.pouet.net/prod.php?which=96604

Would be cool to compare notes some day.
Jobbo is offline  
Old 02 August 2024, 13:09   #67
Kreator
Registered User
 
Join Date: Dec 2022
Location: UK
Posts: 6
Quote:
Originally Posted by Jobbo View Post

Poking around your youtube channel I also spotted your 256x256x16 rotator, also excellent to see!

I made my own tribute to your and Mr.Pets rotators in a recent demo: https://www.pouet.net/prod.php?which=96604

Would be cool to compare notes some day.
Yes I saw that, awesome work, and to be honest my heart fell a little when I saw your rotator because I hadn't realised yours was in 8 bitplanes at first But we're both shifting about the same amount of data. I do have a bit of frame time left over but it's not enough to jump up to 272x272 unfortunately.
Kreator is offline  
Old 02 August 2024, 14:21   #68
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,582
Wowsers, Michael Troughton in the house. It's like having royalty pop over to borrow some tea.
alexh is offline  
Old Yesterday, 03:28   #69
Jobbo
Registered User
 
Jobbo's Avatar
 
Join Date: Jun 2020
Location: Druidia
Posts: 391
Quote:
Originally Posted by Kreator View Post
But we're both shifting about the same amount of data. I do have a bit of frame time left over but it's not enough to jump up to 272x272 unfortunately.

Yeah, it's roughly the same amount but I do need a bit more bitplane dma which soaks up the difference, I went for size over colors.

I too have a few spare cycles but no magic to make the blitter faster and no memory left for triple buffering.

I did manage to squeeze in copper bar colors to make up for 8 colors and then used some extra cycles to print the greets.

It was a lot of fun and I'd been enamored by your Brian effects for 30 years so it felt great to finally make my own.
Jobbo is offline  
Old Yesterday, 09:15   #70
!ZAJC!
Registered User
 
Join Date: Jan 2024
Location: Zagreb / Croatia
Posts: 18
Kreator!
I cannot count the number of times I stared at Brian the Lion intro rotozoom and wondered if this is A1200-only and how the hell did you make it so fast in 1994 on OCS!

I met Dan at Revision and kept asking him if there's a chance you'd come back and release something.

The shearing trick was well known in the graphics community since 1986, discovered concurrently by several people and popularized by late prof. Alan Paeth in Graphics Gems 1. Here's a great compilation of different approaches to bitmap rotation by the late Mike Morton, who was also a Graphics Gems contributor: Bitmap Rotation.
Here's a scan of the original 1986 Paeth rotation paper.

Here's a very nice repo of all the Graphics Gems code.

Now on top of that, you have to figure out how to use blitter to do a high-performance Y-shear on Amiga 500.

This kind of impressive stuff pushed me into democoding on Amiga in 2020s. You just cannot use standard graphics algorithms as they will run too slow and have to think way out of the box.

My self-challenge (ok, might have been a debate with britelite and later gigabates) was a textured tunnel in 50fps and 4bpl on Amiga 500 that I ended up partycoding and releasing at Revision.
!ZAJC! is offline  
Old Yesterday, 09:18   #71
!ZAJC!
Registered User
 
Join Date: Jan 2024
Location: Zagreb / Croatia
Posts: 18
Quote:
It was a lot of fun and I'd been enamored by your Brian effects for 30 years so it felt great to finally make my own.
It was absolutely amazing to see it live at Revision, the Amiga corner was raving!
!ZAJC! is offline  
Old Yesterday, 09:59   #72
Kreator
Registered User
 
Join Date: Dec 2022
Location: UK
Posts: 6
Quote:
Originally Posted by !ZAJC! View Post
Kreator!
I cannot count the number of times I stared at Brian the Lion intro rotozoom and wondered if this is A1200-only and how the hell did you make it so fast in 1994 on OCS!
All the effects I put in Brian the Lion were originally for my next Amiga demo,and I had quite a few others in reserve. But when I took them into work, the boss Martin Edmondson immediately wanted them in the game, so we had to find some way of cramming them into a nearly finished game. I wish I had gotten round to doing another demo back then, but by the end of BtL I was no longer writing Amiga stuff at home - I suppose that's what happens when you turn a hobby into a job.
Kreator is offline  
Old Yesterday, 12:33   #73
chip
Registered User
 
Join Date: Oct 2012
Location: Italy
Age: 49
Posts: 2,974
One pixel sinus scroller rulez !
chip is offline  
Old Yesterday, 20:59   #74
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,215
Quote:
Originally Posted by !ZAJC! View Post

My self-challenge (ok, might have been a debate with britelite and later gigabates) was a textured tunnel in 50fps and 4bpl on Amiga 500 that I ended up partycoding and releasing at Revision.

That was mind blowing in it's own right
DanScott is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alien Breed II title pixel by pixel logo removal dex project.Sprites 17 06 May 2020 15:23
Sine scroller pmc Coders. Tutorials 95 02 July 2017 16:40
Sinus Creator/Editor Legionary Nostalgia & memories 2 11 February 2017 17:49
Working / Creating Sinus tables h0ffman Coders. Tutorials 6 15 January 2011 23:37
Corkscrew scroller pmc Coders. Tutorials 33 01 September 2010 12:41

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.37986 seconds with 12 queries