Author Topic: Displaying Basic Logic Outputs in WM and Export  (Read 1932 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Displaying Basic Logic Outputs in WM and Export
« on: December 29, 2014, 05:49:51 PM »
Hi guys,

Still waiting for manual moderation, but I figured I'd ask now since some people have been saying they're waiting 10+ days for activation.

I have two questions for those more educated in the ways of World Machine.

1.  I've made a modification to the simple example project for islands here: so that it outputs several layers for textures (for Unreal Engine 4) based on slope angle.  However, I'm not sure how to combine the angles back into a single node that I can send to the Preview node so I can view my modifications in WorldMachine rather than spending 40 mins exporting and importing into UE4.  Any help on what node I should use to get all three slope nodes to register in WorldMachine preview would be great.

2.  I'd also like to make this setup more complex rather than picking three slopes.  Here's a sample picture of my current output and my goal output:  I'd like to pick slopes but also have each layer dependent on world height and other similar things.  I know there's a Select Height node that I can use for that specific purpose, which is great, but I'm curious to know how one would build logic that says something like "for everything below 500 meters high, have slopes greater than 45 degrees be stone and slopes less than 45 degrees be sand".  Then to get meta on this question, combine that with "for everything between 500-1500 meters, do XYZ based on slope" and so on and so forth.  I see there's a Height Chooser, Combiner, and Chooser node, but I'd love some more literature on these nodes in regards to how best to use them together with all the other logic.

Thanks for the help and for your time!


  • Author
  • World Machine Guru
  • *****
  • Posts: 2315
    • View Profile
Re: Displaying Basic Logic Outputs in WM and Export
« Reply #1 on: January 07, 2015, 06:13:11 PM »
Hi there,

1) I'm not 100% certain I know what you mean here, but in general you can take your mask output and pipe it to an overlay view (with the terrain its from connected to the primary input). This will let you examine the mask against the terrain. If you want to see multiple masks at the same time, you can do something like turn them into an RGB texture with each mask of a different color channel. To do that, simply connect them all to a Channel Combiner device.

2) Yup, you're going to want to use the Combiner and Chooser nodes for this.

The Chooser node is a mixer / alpha blending node. Given the first two inputs, choose between them at each location based on the control input.
The Combiner lets you mathematically combine your masks according to your logic. So for example:

Generally speaking, you can express "this AND that" with the the multiply mode of the combiner. Only areas where both conditions are true will result in true.

Everything below 500m -> Create a height selector set to 0..500m range.
slopes >45deg -> Create slope selector from 45 to 90deg

Then express each condition with the combiner like so:

<see image>

The Chooser lets you express "this OVER that" relationships, so that the mask control input governs which input is taken. This lets you control, when overlap occurs, which surface should get priority. So for example, in your "500 - 1500m do THIS" case, you'd have a height selector set to that range, piped into the control input of a chooser. The first input is the ELSE case, and the second input would be your THIS case.

Does that make sense?

-- Stephen Schmitt
- Creator of World Machine