• Welcome to World Machine Community. Please login or sign up.
October 18, 2019, 07:46:22 am


Read the Development Diary for an inside look at World Machine's progress!

Unity3d to Worldmachine and back

Started by Polynaught, December 11, 2013, 06:16:26 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


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.
-- Stephen Schmitt
- Creator of World Machine


Hi Remnant,

thx for answering :)
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.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S save/post or ALT+P preview