Jump to content

how to bake displacement into a texture file


Recommended Posts

You could try capturing the displacement as an attribute by using the ray sop with transform points off and the point distance attribute on (raying from the nondisplaced object to the displaced version), then converting the disp attribute to Cd. You can then render this object in UV space using a regular mantra node - under properties/render, enter the object name as the "uv render object." The object itself will need vertex uv's and a flat shader, so that its not rendering lighting on top of the displacement attribute. I did a comparable thing on a recent project with some success, though i'd love to hear other methods.

Link to comment
Share on other sites

You could try capturing the displacement as an attribute by using the ray sop with transform points off and the point distance attribute on (raying from the nondisplaced object to the displaced version), then converting the disp attribute to Cd. You can then render this object in UV space using a regular mantra node - under properties/render, enter the object name as the "uv render object." The object itself will need vertex uv's and a flat shader, so that its not rendering lighting on top of the displacement attribute. I did a comparable thing on a recent project with some success, though i'd love to hear other methods.

Thanks for your reply,mdunkley,but I'm afraid your suggestion wouldn't be the best one,because SOPs work on point while shaders work on shading sample,if I transfer displacement to a point attribute,I may lose most of the fine detail and get a smooth result. I think there is a more straightforward method likg rendering cubic enviroment maps.

Anyway,thanks,mdunkley!

Link to comment
Share on other sites

You should be able to just create a shader where you use your displacement value as surface color instead of actually displacing and then just bake it as you would bake AO or something else.

Just got to make sure that your flat rendering so that no actual light shading is done.

EDIT: Unless you have a very crazy function for calculating the displacement amount it is probably the actual moving of the point etc that makes your render slow and not the amount it moves it and therefore you wont gain much render speed improvement.

Try not to use true displacements if that is viable for your case. They are a lot faster.

Edited by Erik_JE
Link to comment
Share on other sites

You should be able to just create a shader where you use your displacement value as surface color instead of actually displacing and then just bake it as you would bake AO or something else.

Just got to make sure that your flat rendering so that no actual light shading is done.

Yeah!The key is transfer displacement to surface color and render the UV out,I should notice that earlier.Thanks Erik_JE,actually,the reason I need this displacement map is not just for reducing render time.And thanks again mdunkley,you've already point out the key,I just did not quite understand,how foolish I was.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...