View Full Version : Dirtmap - Occulsion shader
tjnyc 08-09-2004, 05:51 PM Hey,
Here is a link to a dirtmap, procedural dirt/ambient occlusion shader for XSI. The developer was kind enough to share his source code.
Go to the stuff link
http://animus.brinkster.net/index.html
I was hoping to convert the code over myself to messiah, but I'm starting slow with shader development, so if anyone else is interested and with better skill and knowledge, please give this shader a go.
He also has a really nice Diffraction shader as well, source code included.
Cheers,
|
|
DocuWild
08-10-2004, 08:36 AM
Ooh! shaders :)
I had a little look at it (never coded anything for messiah though as i do not own it yet) and it's basically a raysampling accessability shader. In short, at each surface point, it fires off n rays in a half-hemisphere facing the way of the normal. He then calculates an mean "dirt" value based on the distance average of each ray to surrounding geometry. This is of course controlled also of a minimum distance the ray is allowed to travel (ie. a "range" value). Usually you also "normalize" that value so you can use it as say a percentage to control the other surface attributes of the dirt layer.
A little word though regarding this type of dirt shader and this goes for every such shader, DirtyReyes, Dirrty (soon to be released btw ;) and this one. As rendering times can be quite intensive it is better to use them as a template to create a UV map with the dirt areas. Then pull the UV map into either a 3D paint or 2D paint program and touch it up. Add some extra streaks where you want and generally mop it up a bit. This gives you two advantages, first rendering speed since firing rays at each point can take a LOT of time (and if you have a lot of geometry, woohoo). Secondly the end result will usually be a lot better than just going all procedural on the dirt. Real life dirt & grime usually follows certain rules which are hard to simulate programmically but easy for a half decent texture artist to do. Especially if he has a dirtmap as a reference.
I could have a little look at porting my LW shader Dirrty to Messiah if someone would point me to the SDK :) If not it will have to wait until i can buy it myself.
Julez4001
08-10-2004, 04:06 PM
Yep we need some type of baking method.
That would be super kool.
CGTalk Moderation
01-18-2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.