shmups.system11.org

Shmups Forum
 
* FAQ    * Search
 * Register  * Login 
It is currently Sun Nov 28, 2021 12:12 am View unanswered posts
View active topics



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: TF3 flame distortion effet with UNITY ?
PostPosted: Thu Sep 30, 2021 6:09 am 


User avatar

Joined: 13 Jan 2020
Posts: 40
Hi all,

Did someone know how to achieve TF3 flame distortion effet with UNITY ?
https://www.youtube.com/watch?v=fL81XjT_xxQ (at 03:30)

In fact, how to apply a sin distortion on a sprite...

I think that the MD had a native spec to achive this. Is it doable easily in unity ?

thanks


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Thu Sep 30, 2021 10:59 am 



Joined: 01 Mar 2008
Posts: 154
Location: Finland
Custom pixel shader


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Fri Oct 01, 2021 5:20 am 


User avatar

Joined: 13 Jan 2020
Posts: 40
Thank you pieslice.

Do you think it's possible to do also this effect (just after the sega logo) with custom pixel shading ?
https://www.youtube.com/watch?v=1_vKyaz5seg&t=3s


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Fri Oct 01, 2021 12:34 pm 



Joined: 01 Mar 2008
Posts: 154
Location: Finland
Yes, of course.


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Mon Oct 04, 2021 9:17 am 



Joined: 19 Jan 2009
Posts: 739
Location: stuck at the continue prompt
It might be best to split the effect into layers and milestones:
  • render a plain rectangular sprite (with basic vertex and fragment shaders in place)
  • add deformation
  • animate position and deformation
  • add the carefully aligned second sprite and its mirrored geometry
  • add the alternate scanlines effect in the fragment shader (but either transparency or "artistic" dithering with visible texture should look better than the original)


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Mon Oct 04, 2021 10:12 am 


User avatar

Joined: 18 Feb 2011
Posts: 6529
Location: Denmarku
In a classic 2D console, background layers all have a pixel perfect global X and Y scroll value, which of course makes sense when you are scrolling through a stage. Typically updated every frame.
But these sorts of effects raster effects, like the two linked here, are created by offsetting the X scroll value per scanline instead of between each frame, essentially shifting the entire horizontal line to the left or right (the same cannot easily be done vertically due to the way screen rendering worked, but changing the Y scroll has interesting effects as well). You can create lots of cool effects this way, like the flame effect, parallax, semi-3D perspectives, etc.

I think if you're trying to replicate multiple raster effects instead of just the flame/sine wave effect, and want it to look authentic, your best approach might be making a simple shader which simply holds an array of X-"scroll" offsets for each line as a parameter (which would be 240 numbers for a "240p" game) and just offset each pixel by this amount depending on the Y coordinate. Then populate this array at run-time using simple math depending on the effect you want to achieve.


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Wed Oct 13, 2021 5:22 pm 


User avatar

Joined: 13 Jan 2020
Posts: 40
Thanks you Ixmucane2 and Sumez.
I would try to achieve this effect on a small sprite first using a kind of slices (several sins on sprites to rebuilt the picture).
If it works as i want, i'll try on backgrounds.

The YT channel 'coding secrets' is very nice. I wish having this genesis distortion effects available in unity :)


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Fri Oct 15, 2021 3:55 am 


User avatar

Joined: 02 Jul 2010
Posts: 57
Something like that works :

Image
_________________
YOU ! (yes you, not me) need more practice ^0^ !


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Fri Oct 15, 2021 8:00 am 


User avatar

Joined: 13 Jan 2020
Posts: 40
It could be a solution for small sprites. Maybe not the best if i want a full background.
(are you Alec from shmup.com ? The sprite remains me Nanoforce.)


Top
 Offline Profile  
 
 Post subject: Re: TF3 flame distortion effet with UNITY ?
PostPosted: Sat Oct 16, 2021 12:40 pm 


User avatar

Joined: 02 Jul 2010
Posts: 57
Hum yes it's me !
_________________
YOU ! (yes you, not me) need more practice ^0^ !


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Space Pilot 3K template by Jakob Persson
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group