Jump to content
yaohaosquall

how to bake displacement into a texture file

Recommended Posts

hey!I have set up a procedural displacement for a object using VOPs and I want to bake it into a texture file corresponding to the UV map to speed up rendering.Does anyone know how to approach it?

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×