yaohaosquall Posted August 19, 2011 Share Posted August 19, 2011 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? Quote Link to comment Share on other sites More sharing options...
mdunkley Posted August 19, 2011 Share Posted August 19, 2011 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. Quote Link to comment Share on other sites More sharing options...
yaohaosquall Posted August 20, 2011 Author Share Posted August 20, 2011 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! Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted August 20, 2011 Share Posted August 20, 2011 (edited) 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 August 20, 2011 by Erik_JE Quote Link to comment Share on other sites More sharing options...
yaohaosquall Posted August 20, 2011 Author Share Posted August 20, 2011 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.