View Full Version : Up Vector + HeightMap Blending - Demo
Ryan Smith
08-08-2010, 11:54 AM
Hi Guys, thought i'd just share the fruits of my labor for the past 3 days.
Been working on a technical shader for the UDK that procedurally blends in a texture onto a rock mesh based off of that rock's height map in combination with the worldpsace up vector. In addition, there is a parameter that enables you to use a WindSpace and Direction Actor to control exactly what vector angle the snow is going to be blending in on your rock.
This is really useful for something like snow or sand. Included is a 2 part demonstration that shows some of the different parameters of the material, as well as some of the applications it can have on a quick mini environment i have made.
part 1
http://www.youtube.com/watch?v=otedqKHET1w
part 2
http://www.youtube.com/watch?v=sXl3z_Zcyck
Let me know what you guys think :D
looks really interesting, especially the animation thingie.
made a very basic deposit shader for the polycount collab thingie a while ago which I intended to share with the community, but since I'm not really sure if you might want to make a paid video tutorial from yours I'll probably hold off on doing that.
it's so much fun messing with udk shaders if you actually understand what stuff is doing :).
http://sebastiansch.com/tutorials/images/DepositShaderScreen.jpg
JValencia
08-08-2010, 12:42 PM
Virtuosic, this is great!
The ability to matinée the snow transition is fantastic; Great for storytelling. Very efficient too in the way you could change the snow position to match with your scene placement.
Are you planning to release this to the public or are you going to sell it?
glynnsmith
08-08-2010, 01:55 PM
I've just gotten through your Advanced Mesh Paint with UDK videos, which are great, btw.
I'm eagerly awaiting news on you releasing the training material for this demo, too.
Please do.
Thor Sowards
08-08-2010, 08:03 PM
Awesome man! Thanks for posting your vids, they are helping me out alot!
haiddasalami
08-09-2010, 05:26 AM
Didnt know you can animate materials with Kismet :O Nice work Virtuosic...
@divi: I agree. Although Im no expert but been studying HLSL and it has really helped me a lot understand what the different nodes do.
SHEPEIRO
08-09-2010, 02:53 PM
looks very nice... could do with maybe using two vectors wind vector and Y so that you could have snow blown very sideways but not sticking to the underside of rocks...having said that the extra expense may not be worth it....
now you just need to add a vector displacement ;-)
kernersvillan
08-09-2010, 09:00 PM
Amazing stuff! Thanks!
cptSwing
12-09-2011, 06:55 AM
pretty awesome and probably helpful for a game taking place on mars that we're working on.. yet i take it you haven't planned to let us have a looksie at the shader tree? ;(
ambershee
12-09-2011, 07:04 AM
cptSwing -they do this kind of thing in UT3. Just take a look at some of the rock meshes for various levels.
passerby
12-09-2011, 08:02 AM
@cptSwing, he explains pretty much all of it, if you cant figure it all out i can show you a shader network that does it.
cptSwing
12-09-2011, 08:07 AM
thanks guys, will check out the UT assets before i come back to bug you all :)
chrisradsby
12-11-2011, 05:09 AM
Sweeeeeeet! Great work, looks awesome! Exactly why I want to learn more about shader creation! :)
passerby
12-11-2011, 06:12 AM
ya i managed to figure out the bulk of the shader, and got my working using a up-vector or the wind direction, that take normals into account, and can be used with a optional heightmap to influence the blending.
if anyone is still having problems i can explain how i hooked it up.
should kinda click in your mind once you convert your normals to world space with the transform node, since after that it is just a matter of comparing it to a vector of 0,0,1 with a dot product, and do any additional blending, such as using a heightmap blend like you would in a vertex paint shader you can replace the vector of 0,0,1 with the wind speed and direction node too as long as you mask out the alpha channel.
Oniram
12-11-2011, 12:09 PM
ive managed to figure out the upvector part but the wind direction is still something im iffy about. mind explaining that part?
Ace-Angel
12-11-2011, 12:13 PM
Connect the Wind Direction normally, more or less how Passerby explained for the normals, but mask it out (RGB), at least, thats what I did in my case since it doesn't work without a mask.
Also, if it's more helpful, One-Minus it so that the effects applies where the arrow points instead of it being opposite.
If you need moar help, I can post up my Wind section and show you what I mean.
Oniram
12-11-2011, 02:00 PM
ah thanks! it was the mask that i was missing. now it works. :D
http://dl.dropbox.com/u/13680846/StoneWindVector.jpg
EDIT: also just had some issues when i tried showing a friend (recreating it on his PC) and found that if you change the strength of the wind to 2 or higher.. it gives more accurate results.
Ace-Angel
12-11-2011, 08:11 PM
Interesting, will have to look into that, when you say 2, do you mean the actual strength of the wind or multiply it by 2 in the material?
Oniram
12-11-2011, 08:19 PM
actual strength of the wind. in the properties of the actor
passerby
12-12-2011, 10:36 AM
ya i noticed the xyz for wind does seem more accurate when upto a certain strength, which makes no sense to me, since i thought the node just outputed the XYZ in RGB than the strength in Alpha, which gets removed in shader anyways.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.