Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Fading between viewtypes? #288784
09/08/09 15:21
09/08/09 15:21
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
I hope you know some games, where you´re able to switch between different Views.

In Batman Arkham Asylum, you can switch to a scanning mode, where the complete level is viewed in a blue/violet color. And you´re able to see the Enemy skelettons through walls. Weapons are shown red..etc

in Wolfenstein, there´s the veil-dimension.



What i need to know:
Switching through that views is not difficult. just different shaders and different layers, wich changes on switching.

BUT,
how do i make the fading? I don´t want a immidiatly switch from one frame to another. I want to change like in this video from Wolfenstein:
http://www.youtube.com/watch?v=QYrkaYSeNHM


Any idea how to do that?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Fading between viewtypes? [Re: Espér] #288802
09/08/09 17:39
09/08/09 17:39
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
thats not another view, just a change of shaders


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: Fading between viewtypes? [Re: Michael_Schwarz] #288840
09/09/09 01:14
09/09/09 01:14
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
It could be done with one shader that interpolates between two shaders. Basically, you pass a value to the shader that does the calculations for both normal shading and fancy-pants shading -- when passed "0" the final result is the normal shading, and when passed "1" the final result is the fancy-pants shading, and this is done by interpolation so that values in-between can be used for a gradual transition.

Of course, the immediate response is: "Are you trying to kill my computer?? Why have one shader that does two shaders' work when you only see one result most of the time! What a waste!", but that really depends on how you do it. The difference might be a very small calculation (depending on the effect you want), so there's almost no performance hit. If the two shaders are wildly different then it is a waste, but you could have the "transition shader" enabled just during the transition between styles, and use independent shaders otherwise.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Fading between viewtypes? [Re: JibbSmart] #289112
09/10/09 15:54
09/10/09 15:54
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
you just need to interpolate between the two different color styles based on a value you calculate in you script and pass them in the shader for a simple interpolation,
like:

final_color=lerp(standart_color,crazy_color,color_lerp_var);

where "color_lerp" is the var you send in the shader through the "_var" extention.

you could also remove the effect from the view while "color_lerp" is "0".


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1