English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Asm / Hardware (https://eab.abime.net/forumdisplay.php?f=112)
-   -   Color Fading (https://eab.abime.net/showthread.php?t=91812)

sandruzzo 13 April 2018 11:05

Color Fading
 
When I coded a fade effect with pc, it was very easy, because I use a "big" quad coupled with alpha effect: job done!

It's that possible to do somenthing with Amiga? I would like to do a fade effect on Ham8 pics

DanScott 13 April 2018 11:38

You would have to fade not only your base palette, but also the contents of the bitplanes that modify the R,G or B component.

I have no idea how this can easily be done quickly.

Perhaps using some kind of blitter subtractive algorithm (similar to shade bobs)... but that would be quite slow.

britelite 13 April 2018 12:21

Yeah, I think the fastest way to fade would probably be to add a sprite layer on top of image and fill that with a dithered pattern to achieve fading. Won't look as good as modifying actual RGB-values, but should be fairly fast

robinsonb5 13 April 2018 13:18

Quote:

Originally Posted by DanScott (Post 1234358)
I have no idea how this can easily be done quickly.

Perhaps using some kind of blitter subtractive algorithm (similar to shade bobs)... but that would be quite slow.

It can be done quickly enough to look nice with low-res HAM6 images (Here's an AMOSPro demonstration - http://retroramblings.net/?p=25) but I think it'd be too slow with HAM8.

DanScott 13 April 2018 13:32

Quote:

Originally Posted by britelite (Post 1234369)
Yeah, I think the fastest way to fade would probably be to add a sprite layer on top of image and fill that with a dithered pattern to achieve fading. Won't look as good as modifying actual RGB-values, but should be fairly fast

By writing random "noise" into the sprite data (and biasing the noise from 0 to solid pattern, with halfway at 50% noise) you could make a pretty decent "fizzle" fader... would look really good at 50fps ;)

Precalculate the noise as a page (for example 1024 pixels wide), with 64 pixel vertical columns of different intensities of noise, and blit the strips (with a random y start offset) into the sprite data

Photon 14 April 2018 17:45

Yes, a proper fade must be done by processing the bitplane data. HAM8 = more MA slots taken+more to process+same Blitter = substantially slower.

You could process parts of it at a time with a pattern, e.g. "blinds" or bobs and it would appear smoother, or shrink the screen.

If you have ~1.1MB free chip or fast you could process 14 frames while showing the pic to be ready in time for the fade.

chb 14 April 2018 20:36

@robinsonb5: That's a nice method, thanks for sharing!

Quote:

Originally Posted by Photon (Post 1234643)
HAM8 = more MA slots taken+more to process+same Blitter = substantially slower.

Hmm, I'd think a HAM8 fade on AGA would be same speed or faster than a HAM6-fade on OCS (both lowres). HAM6 on OCS: ~40,000 chipmem slots per frame free for blitter/copper/cpu if only display dma is active, HAM8 on AGA (FMODE=3): ~60,000 slots free. HAM6 needs to fade 4 planes, HAM8 6 planes - so roughly 10k slots per frame and plane available for both. If you have additional audio/copper dma OCS is more affected because it leaves a smaller percentage of available slots.

Photon 14 April 2018 23:10

Quote:

Originally Posted by chb (Post 1234699)
@robinsonb5: That's a nice method, thanks for sharing!



Hmm, I'd think a HAM8 fade on AGA would be same speed or faster than a HAM6-fade on OCS (both lowres). HAM6 on OCS: ~40,000 chipmem slots per frame free for blitter/copper/cpu if only display dma is active, HAM8 on AGA (FMODE=3): ~60,000 slots free. HAM6 needs to fade 4 planes, HAM8 6 planes - so roughly 10k slots per frame and plane available for both. If you have additional audio/copper dma OCS is more affected because it leaves a smaller percentage of available slots.

Yep, that's correct. I have no idea why I wrote more MA slots taken. :) More to process, more slots free, HAM8 will be roughly the same speed on AGA as the HAM6 example on OCS.


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04227 seconds with 10 queries