PDA

View Full Version : Alpha gain and offset in displacement map setting?


jasonhuang1115
02-26-2007, 12:43 AM
Hey, all CGers,

I have been doing test-renders since last night till 4:30pm today, just tring to figure out how to correctly set up a very simple displacement map to get both extruded geometry and indent on a tube-like mesh.

So, I layout the uv and paint the whole surface with 50% grey (0,0,50 in HSB mode)in photoshop and fill where I want the indent with 25% gery(0,0,25)(closer to black) and where I want it to be extruded out with 75% gery (0,0,75)(closer to white). Here is the displacement map below:

http://farm1.static.flickr.com/139/402702824_1fdcb1ec64_o.jpg

In maya, I just apply a default lambert to the mesh and connect the displacment map (saved as tga or tiff) to the lambert's shading group. I keep the alpha gain as 1 and set the alpha offset to -0.5 to render with Mental Ray because I want the 50% gery to keep the rest area of the mesh as identical as it was.

Here are the renders of original mesh and after displacement. The mesh is in subD, so it should have enough density to be displaced.
original mesh
http://farm1.static.flickr.com/130/402686679_3fefb6fbcc_o.jpg

displacement map applied
http://farm1.static.flickr.com/141/402686673_39787961c6_o.jpg

I know should be able to adjust the strength of expression/depression via the greyscale and alpha gain to the result I want, but I can't get the rest area to be unaffected. I tried different value of both alpha gain and alpha offset and also try different renderer like Maya software and renderman for maya, but still no luck. :cry:

Is displacemnet map really that hard to control? It suppose to be like bump map but with real displacement on the mesh. Could any of you point it out where I did wrong on this? I felt frustrated on test-renders for several hours but still can't get it right.

GlenGramling
02-27-2007, 10:40 PM
have you tried using an Aproximation.

Windows> Rendering Editors> Mental Ray> Aproximation Editor-

you can use various different Aproximations but i usualy use the (Subdivision Aproximation) set to spatial, Min subdivision 2, Max Subdivision 5, Length .01. in maya 8.5 however im crashing everytime i use the spacial setting so if you have 8.5 try using the Parametric setting.

Hope that helps.

acidream
02-27-2007, 10:48 PM
Try to set the alpha offset to the negative alpha gain amount. If alpha gain is .2 then set alpha offset to -.2.

phyle
02-28-2007, 01:11 AM
I always save maps as jpg so I know im not bringing in alpha channels that I dont need. I might just be paranoid about this though, it might help..

If you cant get the right alpha gain settings you can always use an addition node instead to add -0.5

Goon
02-28-2007, 01:17 AM
Don't bother with that alpha nonsense, and use a set range node: just specify 0 and 1 as the old starting and ending values and the new values as +/- x.xxx (e.g. -3.0, 3.0)

jasonhuang1115
03-04-2007, 12:39 AM
Thank you guys for inputs and sorry for the late response.

Glen, I played around approximation editor before but not on this case, because the problem actaully happen on all my three renderers - Maya software, Mental Ray, and Renderman for Maya. All of them gave me the same rendering result.

acidream, I did try that but not working for me.

phyle, I am wondering what's different between an addition node of -0,5 and putting -0.5 of the alpha offset? I can't get the right alpha gain without putting any negative value on the alpha offset. The reason is whenever I put a positive alpha gain value, the object will bump up, so I have to put a negative value of alpha offset trying to even the surface back to it was.

Goon, I haven't used set range node before. Could you tell me how it would work if I set the range like you mentioned in the reply? Thanks a lot.

I am still wondering why displacement map can't be as intuitive as bump map where 50% grey stands for no any expression/depression?

Goon
03-04-2007, 02:39 AM
Well, the set range node is useful because some displacement maps don't have even -5 to 5 ranges. in mudbox for example, the map might be normalized to -4.6565 to 7.443. By using a set range node, you easily set the map to that range. 50% gray isn't zero displacement in this case, but the value that is, will be correctly set at 0 displacement.

And I just find it an easy way to understand what I'm doing.

Basically its:
set the input range: (always 0-1 (100% black to 100% white) unless you are for some reason are going to clip some values (don't))
set the output range: the negative displacement value being the minimum, and the positive the maximum

CGTalk Moderation
03-04-2007, 02:39 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.