Hello I have a problem to use the displacement
in the shader my map displacement has a scalar zero value of 0.250, how can I add that value also to my displacement map in Xgen?
Thank you
If you have converted the displacement map to a ptex map, you can adjust the map values via a clamp or fit expression. The displacement values default to 0 to 1 so the mid point is .5, but you can offset the values with a fit expression:
$a=map('${DESC}/paintmaps/displacement');#3dpaint,500.0
$min=0.0000;
$max=0.2800;#0.0,5.0
fit($a, 0,1, $min, $max*2)
You can then adjust the values to fit the xgen displacement values to the displacement used on the object:
Cheers
Hi Michael,
Unable to match xgen displacement with surface displacement. Can you please check attached file and let me know if there is any mistake?
Thanks
Sudarshan
There seems to be something wrong with the jpeg being sued as the displacement map source. I can't open it in photoshop as it says it has an invalid header. What resolution is the image and what bit depth?
Sorry about that, Not sure what happend exactly. Sending new image.
Looks like the image in in sRGB color space as applied to the mesh, but the color space of the displacement is RAW, as applied by XGen. You can adjust the gamma in the displacement expression as the scaling in the displacement, of the sRGB color space image, will differ from scaling the displacement in RAW space.
$a=map('${DESC}/paintmaps/displacement');#3dpaint,200.0
$min=0;
$max=10.0000;#0.0,10.0
$G=0.3650;#0.00,10.00
$gamma=gamma($a,$G);
fit($gamma, 0,1,min, max)
note that I raised the resolution of the ptex map to 200 texels, to increase the fidelity of the disaplacement maps 4k resolution. This gives 512 pixels per face
Cheers