Author Topic: WM2 Automation Documentation / Troubleshooting  (Read 1941 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
WM2 Automation Documentation / Troubleshooting
« on: November 28, 2013, 05:49:07 AM »
Hi! We're currently integrating WM2 into a semi-automated workflow which relies on WM automation, but I stumpled upon a few problems:

a) Documentation is unclear

The documentation has some point were I had to interpret what to actually write into the XML. E.g. the "extent" element was hard to figure out what the coordinates mean (Lower left / upper right like in the project settings dialog? Maybe the height/width is meant by x2/y2?). Also, does it go into the world element? An XSD would be very helpful to figure out the allowed structure, or more a more complex sample showing ALL the features than the simple one provided.

b) Extents (seem) not to work properly

When modifying an extent via automation and saving the resulting TMS, world machine crashes when I try to select the extent in the project settings dialog. Also the renders I get are completely different from what I would get when I'd manually define the extent in the WM GUI and render from there. (Also: Are extents added when they're not present in the TMD yet? Or can I solely overwrite existing extents?)

c) Logging

Where is the output from WM going? How can I fetch the output from WM so I can monitor my automated pipeline which may run for 10-20 hours to generate all my data? Piping the output into a file does not work because the WM process spawns it own console window. Also I can't find a reference of command line parameters to redirect log output somewhere.

Maybe someone could help me out here, I'm becoming frustrated poking around :/ Here's one of my scripts which does not work properly:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<automation version="WMP2">

<load file="SnowScenerieFullTerrain.tmd" />

<section name="Border 2">
<extent index="2">
<location>-68.683800 24.324900 -38.683800 54.324900</location>
<name>Border 2</name>
<tile res="513" number="3" use_exents="2" />
<world use_exents="2" res="513" />
<!-- <build mode="normal"/> -->
<build mode="tiled"/>


What it should do: Load the given TMD file, change the positioning of the extent Nr. 3, render out 3x3 tiles of 513px resolution of extent Nr. 3. The Positioning of the extent has been calculated from another extent so it includes border area. So the middle tile heightmap (e.g. tile_x1_y1.r32) should closely resemble the individual center extent if it was rendered alone. But this is not the case, instead, I can't find anything which resembles the original extent in the tiled build. The original extent is (-58.6838km, 34.3249km) with a size of 10x10 km.


  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
Re: WM2 Automation Documentation / Troubleshooting
« Reply #1 on: December 16, 2013, 07:16:27 PM »
Hi there,

Sorry that I missed this post. You're absolutely right that the automation needs some better documentation, and a little polish too. There has been a lot of organic changes and additions and as a result some of the locations of automation features is not as logical as it should be.

As a quick aside before I get to my answers, make sure you're using the latest 2.3.5 or better version of World Machine. A number of bugs and other issues were fixed over the years, some of which impacted automation.

a) As mentioned in the user manual, this should be a sequence of coordinates (x,y) in the order of lower-left, upper-right, exactly as shown in the render extents dialog box. The extent tag is a child of the modify tag.

b) Extents can only be modified, not added. There is no reason why not, it just hasn't been a requested feature yet. If an extent is specified past the number currently defined, it is silently remapped into a valid extent -- this may be the reason why you are not seeing the extents you expect to see.
c) This is definitely a troublesome point -- getting actual useful output from the command line of WM is murky right now. For testing your scripts, i recommend running them from within the GUI. I will see what i can do to make automation reporting a better experience.

-- Stephen Schmitt
- Creator of World Machine