Topic: Generate terrains entirely via scripting?

Hello,

We purchased RWT primarily for its scripting capability. Our use cases demand that we eliminate the possibility of human error. We ultimately seek to build a unified (stichable) collection of Unity terrains composed of SRTM 1-arcsec cells. RWT’s API documentation is class/type-oriented but does not offer scripting “How-Tos” as far as I can tell. Can you point us at scripting tutorial content relevant to our goals or provide a walkthrough of how one might use RWT’s APIs to accomplish the equivalent of the required GUI-based workflow?

Thanks!

Re: Generate terrains entirely via scripting?

Hello.

There are a couple of examples on the forum on how to use API:
https://forum.infinity-code.com/viewtopic.php?id=1447
https://forum.infinity-code.com/viewtopic.php?id=1538

If you have any specific questions, you can ask and I will try to explain how to do it.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Generate terrains entirely via scripting?

Thanks for that^ Alex.

What I'm considering is the shortest path to the goal is illustrative of what we're trying to achieve. Generally speaking, it'll be way easier to start with your capture implementation -- you've done a great job! -- than roll a new one from ground up using the API.  I just hope this approach doesn't violate your intended use of the product smile

1 Fire EditorUtility.OpenFilePanel from a new button on RealTerrainWindowUI to retrieve a file containing a list of area boundary requests (Top-Lefts + Bottom-Rights in latlong) and a name for the desired output subdirectory.
2. Provide another OpenFilePanel to provide a location other than RTW_Result for the generated output. If an alternate location is specified, the terrain will not be added to the current project.
3 For each area requested, invoke a modified StartCapture() that accepts the request params and directs processing accordingly.

I'm open to alternate approaches. If you consider the general idea valuable to other users I'd be happy to collaborate on and/or follow up with the changes.

Re: Generate terrains entirely via scripting?

If you have programming experience, you can modify the asset's source code for your own needs.
There are no problems here.

1. OK.
2. There is no way to specify the result folder here. You will need to modify RealWorldTerrainGenerateTerrainsPhase.Start method.
3. You can adjust settings before invoking StartCapture.
All settings are stored in RealWorldTerrainWindow.prefs (public static field) which exists after calling RealWorldTerrainWindow.OpenWindow.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.