Forum

Fun project for a DP shader guru (advanced procedural snow)

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

Fun project for a DP shader guru (advanced procedural snow)

Postby Julius » Wed May 22, 2013 5:49 pm

I am currently thinking of a cool shader-setup as a main feature of an open-source Darkplaces based game, which I belive is possible to do (based on other games that are doing it already similary) but sadly I am a real n00b when it comes to shader programming.

So the basic idea is to have a procedural frost and snow system coupled with a heat map for each texture.

The background is that I would like to make a sort of stealth mech game in a deep frozen post-apocalyptic world (all snowy keeps the art requirements low ;) ) where the player has to manage the heat given off the unshielded nuclear reactor in his mech and leaves heat signatures behind (where the mech stood etc.).
So the less you fire and move around the more invisible you become (as snow and frost also accumulated on parts of your mech etc.) and the more you do crazy moves the more likely to have a core meltdown or at least a heat shut-down and you are a glowing heat signature visible from far away.
To make this fully interactive one would need a procedural snow and ice shader on more or less all surfaces of the game.

If one does a google search (or looks at the game cyrostasis) one can see that there are plenty of (easy to implement?) snow and ice GLSL shader ideas floating around.

Given my limited understanding of how texture materials and shaders work I would basicly like to have the following fuctions:
- Procedurally accumulating snow based on the slope of the normal-map (e.g. only the top of stuff gets white)
- Procedural "growing" frost based on the creases (e.g. dust map/ambient occlusion) of a texture
- melting of ice and snow based on the above texture features and an additional "heat-map" that specifies the heat a surface gives off (or how easy it reacts to outside heat)
- A way this heat-map can be influenced in real time (e.g. "scaling" of heatmap based on heat generated and other heat-source nearby plus projecting heat onto a surface by touching it or by exhaust of jump-jets etc.)
- bonus points for adding a snow sparkling effect for textures ;)
- additional bonus points for having snow and ice effected by a wind direction paramenter
- totally awesome super bonus points for improving the snow-flakes system in darkplaces to allow for an all level snow-fall effect that leaves out areas under roofs automatically and has decent performance.

Example implementation preferrably in Xonotic... I would be willing to give help with any artistic stuff needed (custom models, textures etc.).

Know I know this is a lot to ask for and I can only beg someone to try and implement it. But it might be a fun project for someone working with GLSL shaders or who wants to learn some advanced techniques and is looking for a good example project.

THX :)

Edit: something looking similar to this would be great: http://youtu.be/PWpqwVQYosw
Julius
 
Posts: 92
Joined: Sun Aug 29, 2010 4:32 pm

Re: Fun project for a DP shader guru (advanced procedural sn

Postby Julius » Mon May 27, 2013 4:46 pm

http://youtu.be/lH6SIFQ0ROE

maybe like this?

I am looking into replicating that with Blender GLSL material nodes... but I doubt I will manage it.
Julius
 
Posts: 92
Joined: Sun Aug 29, 2010 4:32 pm

Re: Fun project for a DP shader guru (advanced procedural sn

Postby Spike » Mon May 27, 2013 5:02 pm

those vids are based purely on the surface normals. I'm sure you could easily do that with any surface with a decent normalmap etc, but I expect it would look wrong on more concave objects (like a corridor in a quake map).

what I'm saying is that I don't see this looking good without using something like a lightmap (think stainmaps), which would require engine modification rather than just glsl.
Spike
 
Posts: 2882
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Fun project for a DP shader guru (advanced procedural sn

Postby Julius » Mon May 27, 2013 7:09 pm

Not sure if I get you... that effect would be for outdoor areas mostly so overshadowing of parts would occure only rarely and snow there could be atributed to snow drift, no?
Obviously it wouldn't be perfect and the level designer would have to take it into account a bit, but I don't see that as a huge barrier. (Edit: and where it is too obvious, the level designer can just place a "heat source" to melt it off via the heatmap proposed above ;) ).

Ahh btw here is some further (old) discussion on issues of rendering snow:
http://www.polycount.com/forum/showthread.php?t=66952
Julius
 
Posts: 92
Joined: Sun Aug 29, 2010 4:32 pm

Re: Fun project for a DP shader guru (advanced procedural sn

Postby Julius » Wed May 29, 2013 8:42 pm

Maybe this might help:
http://www.zspline.net/blog/deposit-sha ... entalmill/

A sand and moss version would be of course cool too ;)
Julius
 
Posts: 92
Joined: Sun Aug 29, 2010 4:32 pm


Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 1 guest