PDA

View Full Version : My experiments with multiple displacement


phyle
02-23-2007, 12:48 AM
I was playing around with this a while ago and sort of hit a dead end. Ive been trying to find a way to layer displacement layers on top of each other, each layer displacing along the normals of the last. I know in other threads there are many people asking for this aswell so i thought Id share my progress. I was initially excited when francescaluce released ctrl_multidisplace, but it turns out this doesnt do exactly what I wanted..

Im rendering in mental ray. For directional displacement I am using the waterblue displacement node that someone on this forum pointed to.

What I have been trying to do-
to layer displacements on top of each other you need to add them together, but before you add each layer you need to multiply it by the normals of the layer below it. So Ive constructed a very elaborate shading network that turns a bump map into a normal map(I wish there was a node to do this).

Ive got it to work, as you can see below, there is no modelled geometry in the scenes below, just a flat nurbs plane.

The trouble Im coming across is with tesselation. If you want to do really detailed textures the tesselation just doesnt seem to be detailed enough. I think this is because the tesselation algorithms arent built for this sort of thing but I could be wrong.

Anyway I just thought Id post my tests and see if anyone had any thoughts. Im not really an uber programmer TD so all this is probably a bit beyond me. Does anybody who knows a bit more think its possible to make really detailed textures using this method?

bgawboy
02-24-2007, 03:22 AM
Is your approximation subdivision limit set up higher? I think it defaults to 0 5. Try 7.

Also, try pre-subdividing your original geometry.
For nurbs, there are two places for tessellation, surface approximation AND displacement approximation.

For subds, there is only one approximation for both, so it may be more susceptible to hitting the limit earlier.

For polys, try subdividing the original mesh.

Regarding your shader network for layered displacements, I couldn't quite follow it, because I don't quite know what is meant by multiplying normals.

Ultimately, inside mental ray for any displacement, the normal may be changed, and a single floating point number is used to specify how far along this normal the point is moved.

A displacement shader list (not available in Maya) can call a series of displacement shaders, each changing the normal, and accumulating some distance to move. Some of the the third party displacement combiners may accomplish the same. The key is arranging the combination to come out right, because ultimately one distance is given to the material, and it is assumed the normal has changed appropriately.

phyle
02-27-2007, 03:25 AM
Sorry ive taken so long to respond.

Ive attached a version with subdivision limit set to 7. Its getting very slow to render. To me it just seems like the subdivision algorithm is built for displacing directly up. When you start displacing outwards its stretching polygons in ways they shouldnt be stretched. I could set things even higher I suppose.

I also attached my maya scene file, so you can see my shading network if you want - its pretty messy. You need to install the mentalray waterblue displacement if you want the render to work.

Im interested in that displacement shader list that you are talking about because it sounds like what i want. What renderer is that available in?

phyle
02-27-2007, 03:28 AM
Sorry heres a link to my maya file if you want-
http://putstuff.putfile.com/52659/672874

Fathom
04-24-2007, 02:08 PM
Yeah I've been looking for info on shader lists. Thanks for letting me know that they are not available in MRFM yet Barton. Is there another solution. I am looking to do some non-uniform displacement shading.

Fathom
04-24-2007, 03:17 PM
Hey Guys I've been checking out Francescas multi_displace shader and it looks like it's what I'm looking for. There's just one problem; it's incomplete. There's a ctrl_h_displace node I need but it's not included in the download. And the thread seems to just stop there. Did anybody ever get the thing to work properly? Does anybody have the missing piece?

tauism
05-08-2007, 03:34 AM
yeah i've got it working.

the only nodes i need are the ctrl_multi_single, ctrl_multi_collect, and ctrl_multi_geo.

first you prepare your displacement maps, connect each one to its own multi_single and the route them into the multi_collect. Then put the multi_collect into the SG node.

then you have to create a dummy object with which to assign the ctrl_multi_geo. Then in the shader setting, enter the name of the object you want to multi displace and click automatic. voila!

Fathom
05-08-2007, 09:53 AM
Hi Tauism,

Thanks for the reply! But as far as I can see that still only gives me a layered displacement ie displacing in the direction of the original surface normal.
There were two examples Francesca posted in her thread. You are refering to the first one. I am looking to reproduce the second one ie each successive displacement displacing normal to the perturbed surface. But it looks as if there is a node missing. If you take a look at the images she posted you'll see there is a ctrl_h_dirDisplace node in her hypershade and shading network. That node is missing in the download pack. Without it I don't think one can get true multi-directional displacement (I think!)

Ash-Man
05-08-2007, 03:10 PM
are you trying to get this

http://www.xsibase.com/forum/index.php?board=29;action=display;threadid=28834

Fathom
05-09-2007, 03:00 PM
Thats exactly what I'm trying to get... but I don;t have z-brush or mudbox. Any suggestions.... or am I looking at moving to xsi? :)

Ash-Man
05-09-2007, 03:10 PM
I think this is a new technology that is still under testing, (at least to my knowledge :blush: ) XSI is the first 3D application that use it

dagon1978
05-09-2007, 08:38 PM
I think this is a new technology that is still under testing, (at least to my knowledge :blush: ) XSI is the first 3D application that use it

impressive :eek: :eek:
http://gibdie.com/xsi/Vector_Displacment_test.jpg

Fathom
05-10-2007, 10:56 AM
Hey Dagon1978 give us some more info. Is that a map created in XSI or did you use another modeller then import? Looks great though!

dagon1978
05-10-2007, 07:16 PM
Hey Dagon1978 give us some more info. Is that a map created in XSI or did you use another modeller then import? Looks great though!

this is not my work, it's a work you can see in the link posted above ;)
i think it's impressive, modelled in zbrush and rendered with the vector displace (applied to the sphere), stunning :buttrock:

Fathom
05-14-2007, 10:03 AM
The mr docs reckon:

Note that the shader adds its displacement to the result instead of storing it. This allows chaining displacement shaders in shader list (file:///C:/Program%20Files/Autodesk/Maya8.5/docs/Maya8.5/en_US/RefGuide/node66.html#INDEX146)s. Shaders in shader lists get called in sequence, each adding its contribution to the result of the previous. mental ray calls the first displacement shader of the list with a result that is initialized to 0.

Displacement shaders may also change the vector file:///C:/Program%20Files/Autodesk/Maya8.5/docs/Maya8.5/en_US/RefGuide/images/182.png along which the displacement will take place, or change file:///C:/Program%20Files/Autodesk/Maya8.5/docs/Maya8.5/en_US/RefGuide/images/183.png , which is the original vertex position that the displacement is added to. However, note that mental ray does not check that surfaces resulting from such arbitrary displacements are free of self-intersections.


So I guess it's just a matter of Autodesk writing a shader for maya that uses 'Shader lists'. COME ON AUTODESK! YOU"RE GETTING WHIPPED BY THE CHAPS AT XSI! :-)

CGTalk Moderation
05-14-2007, 10:03 AM
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.