Unity3d to Worldmachine and back

Well, topic says it all.
I 've run into problems trying to set up WM to match the actual Unity scene.
While I can export the raw data file from Unity and import it into WM through the file node I cannot get the terrain heights in WM to match the ones I see in Unity.
The WM terrain is way too steep compared to what I get in Unity.
Inside Unity you usually set the max height of the terrain to a desired value - default is 600 meters I think.
This means, I think, that the 16bit heightmap spreads the 600 meters over 65536 values.
Anyway - inside the file node of WM I’ve tried to set the “altitude scale” to a specific range of 0 - 600 meters which does not yield the desired results.

What exactly is WM doing with the raw file at this stage? How is it interpreting the height values… ? And what is Unity3d doing when it exports the raw file? How can I synch WM and Unity?

Hi there,

A couple things:

  1. Being in proportion is a function of both vertical and horizontal scale – by which I mean, matching heights without matching horizontal extents will not do what you want. In the File Input node, make sure you’ve set the horizontal scale to the same as your heightfield in unity.

  2. If you are working with only one file, and know that you don’t need to go above 600m in elevation, I would go to the Project Settings in WM and set the world elevation max to 600m. World Machine maps heightfield values 0…1 to the min,max values specified in your project settings. You will usually get the best results having your terrain use the bulk of that range.

  3. You can then fine-tune the import elevations by adjusting the values in the File Input device.

Hi Remnant,

thx for answering :slight_smile:
Being in proportion horizontally wasn’t the problem - I’ve set the World Project Parameters to the Unity equivalent size as well as the file input node. But I couldn’t find a way for WM to interpret the height data the same way as Unity did.
Thx for pointing me at the world elevation settings… somehow I must have overlooked them. I was staring at the file input node and the first section of the project parameters but I didn’t think of looking for the height interpretation anywhere else. If it’s not only me who found this to be unintuitive you may think of putting that option on the “Render Extents and Normal Build Resolution” as well. Seems to better fit in there.
Anyway, problem seems to be solved. Thx again.