Home Technical Talk

Why does Mudbox output Displacement map values in inches?

ojkoorde
polycounter lvl 10
Offline / Send Message
ojkoorde polycounter lvl 10
Hi all,

I have a 'problem' that bothers me ;-). I have a very simple test scene in 3ds MAX:
scene.png

Essentially a box (w=1cm,l=1cm,h=2cm) hovering 1cm over a plane.
Now I export this to Mudbox in order to create displacement map.
In 3ds Max I have set units to Metric(centimeters) and likewise in Mudbox - linear units set to cemtimeters.

When extracting a displacement map I use the following:
  • source = box
  • target = plane
  • method = ray casting
  • choose samples = furthest outside
  • search distance = 4 (4cm I assume)
  • image size = 2K
  • antialiasing = 8x
  • output = 32bit exr
What surprises me is that extracted map has their its expressed in inches:

inches_in_exr.png

Since my box is 2cm high and hovering 1cm above the plane values in exr should be = 3(3cm) not 1.1769 which is value in inches as 1.1769*2.54=2.9893.
When I export displacement map as PNG with the same search distance and with option 'normalize to search distance' checked - I get:

inches_in_png.png

So similar situation - looks like the value is in inches although I have my 3ds and Mudbox set to centimeters.

Is that some convention in 3d world that displacement maps are in inches? I have not heard / read about it anywhere (althouth VRAY's VrayDisplacementMod has Amount set to 2.54 by default as if expecting inches).
Second - why are (even if expressed in inches) these values so inaccurate? 3cm is 1.1811" not 1.1875" nor 1.1769". Of course inaccuracy in PNG example can be understood as we only have 256 values to express 8cm range in this case.

Now - even if exr DM is rendered in Vray it does not match 3cm altitude of box'es top face:

render.jpg

Can anyone help me understand that? Thanks in advance.

Regards,
Artur

Update:
Looks like this issue occurs only if I use 'Send to > Send to Mudbox' way to transfer a scene into Mudbox.
More manual work using old good obj export/import provides expected results where Displacement Map values are expressed in centimeters as according to units set.

Replies

  • gray
    Options
    Offline / Send Message
    this is an intriguing issue that i was going to look into.

    but from your update you have fixed it.

    i have done extensive tests measuring values like you have done but in maya. and do not remember running into this issue. so it leads me to beleave it might be something local to maxes obj export.

    you could open the obj file in a text editor and see what it says. you could also try fbx and see if that works just for comparison.
  • ojkoorde
    Options
    Offline / Send Message
    ojkoorde polycounter lvl 10
    Thanks for the reply. As for 'fixing the issue' - I kind of overcame this using different means when importing my test scene from 3ds to Mudbox. In general once I use 'Send To > Send to Mudbox > Send as new scene' approach I get inches (I assume this method uses FBX). If I use pure obj export import I get correct values in centimeters in maps extracted in Mudbox.
  • gray
    Options
    Offline / Send Message
    i had it backwards. have not had that issue with fbx in maya so its still worth a shot to try it.
Sign In or Register to comment.