Baking out various displacements to texture

   1377   1   1
User Avatar
Member
2 posts
Joined: July 2005
Offline
Hi all,


I am trying to bake out the position delta between an un-displaced model and a displaced model and have run into a couple of (3) problems:

- In the Labs Map Baker 'Position' should do it for me, but there doesn't appear to be any means of normalizing the position space so it fits within an 8bit image - there is only the flag to enable position baking - no range settings for X,Y and Z. Have I got this right?

- In the standard texture baker (Mantra) I'm also having no luck - vector displacement (Vd) appears to not align with my calculations (made by subtracting P_displaced from P_undisplaced. Again - have I gotten the use of this correct?

- I could solve all of this by baking out an arbitrary point attribute - I can calculate delta-P in an Attribute Wrangle SOP. My problem with this is I'm not sure how to make either the Labs Map Baker or the traditional Mantra baker see the custom attribute - I have tried a few ways and have so far drawn a blank. Any guidance on how to do this?

(Apologies for the cross-post - I also added this question to an existing thread in the 'Houdini Realtime' forum - first time using this forum for ages and I'm not sure how much traffic it gets)


many thanks - Mathew
User Avatar
Member
197 posts
Joined: July 2015
Offline
Hi Matthew,

Before we start debugging, are you using the latest version of SideFXLabs? If not please try updating to the latest daily build.

The position map the MapsBaker generates is already normalized similar to what the substance baker produces. That is finding the bounding box of the geometry, and normalizing the position values based on the maximum extent of it. The result is RGB values in the 0-1 range.

As for baking arbitrary attributes, you can use the custom attributes multiparm found below the default maps the baker generates. Just specify the vec3 attribute you need and it will bake its values to texture for you. If you decide to bake to a non-hdr range image (png, jpg etc), make sure those attributes dont fall outside the 0-1 range or they will get clamped.
Paul Ambrosiussen
Technical Artist, Freelance
twitter.com/ambrosiussen_p
  • Quick Links