In version 6.31, Terragen 4 Professional introduced the Remote Procedure Call (RPC) feature which allows third party applications to communicate with Terragen. This means that the end-user can write programs and scripts that modify the active Terragen project.
Some practical examples of this are:
* Adding and removing items from the project, such as cloud layers and 3D objects, etc.
* Modifying the parameters of an item in the project, such as its position, rotation, and scale, etc.
* Modifying camera and render settings, etc.
Over the last few months we've been refining the
online documentation for RPC and simplifying its installation process, and we've just released two new blog posts to help you get started using it. These blog posts walk you step-by-step through the program writing process, as well as showing you how to install Terragen RPC using Python's "pip" command.
Hello RPC! - Part 1 Scripting for TerragenHello RPC! - Part 2 Error HandlingBuilding upon the entry-level examples described in these posts, we've created additional Python scripts to give you an idea of what's possible with RPC, and hopefully to inspire you to write and share your code with the Terragen community at-large. These resources are available for download at Github.
tg_landmark.py - A script that can add a Landmark object at the origin of the project, or at any coordinates you've chosen. How might you modify the script to change the shape or colour of the Landmark object?
tg_sunlight01_heading_elevation.py - A script that modifies the heading and elevation of the Sunlight 01 node in the project. How might you modify the script in order to select from multiple Sunlight nodes in the project if they exist?
tg_transform_to_origin.py - A script to center a terrain feature at the origin of the project.
We'll be adding even more examples to illustrate the power of this new feature, and hope that you find these resources helpful and instructive, while looking forward to seeing how you incorporate Terragen RPC into your own projects and workflow.