Recent posts

#41
Image Sharing / Forest drive
Last post by digitalguru - January 10, 2025, 05:37:24 AM
Here's a few WIP stills from a planned animation.
Heightfield is from Gaea 1.3, terrain rendered in Terragen and truck and all flora rendered in Maya/Arnold.
Still some work to do - just about to get into Houdini to sim some exhaust smoke and a muddy pool for the truck to drive through.

dodge_hd.1180.jpg 

dodge_hd.1258.jpg 

dodge_hd.1380.jpg
 
#42
Tools, Utilities / Script tg_set_coords_to_origin...
Last post by Kevin Kipper - January 08, 2025, 07:54:16 PM
It's not everyday that you get to make a new script just by changing one line of code in another script.  As I was posting the tg_copy_coords_to_selected.py script I realized you could easily reset the xyz coordinates to the origin of the project by changing one line in the program.  It's taken me longer to write the documentation and post this to the forums, but Terragen users are worth it!

This script has no UI.  Just select the nodes in the Node Network and run the script.  The nodes do not have to be the same type of node.  For example, you can select a Simple Shape shader node which uses the Position parameter for its xyz coordinates and select a TGO reader node which uses the Translate parameter for its xyz coordinates.  Both nodes will be reset to the origin of the project, i.e. the xyz coordinates <0, 0 , 0>.

"Running the script" currently means to double click the Python script filename from wherever you've saved it to disk on your computer.  In an upcoming post I'll show you a couple of ways to simplify the execution of a script, so running it will be more at your fingertips.

Get your copy for free right here:
https://github.com/RedMawVFX/tg-set-coords-to-origin.git
#43
Tools, Utilities / Script tg_copy_coords_to_selec...
Last post by Kevin Kipper - January 08, 2025, 07:18:07 PM
This is a pretty simple script that mimics what you can already do in Terragen on a node by node basis via the "Copy/paste coordinates" button on many parameters.  However, there are a couple of advantages to using the script. 

First, there's no UI.  Second, you can select multiple nodes in the Node Network and set their xyz coordinates all at once.  The nodes don't have to be of the same class either.  For example, you can select a Simple Shape shader node which uses the Position parameter for its xyz coordinates and select a TGO reader node which uses the Translate parameter for its xyz coordinates.  Both parameters will be updated with the xyz coordinate values in the clipboard.

You need two things to use the script; valid xyz coordinates in the clipboard and at least one selected node.  To add the xyz coordinates to the clipboard, simply right click in the 3D Preview and select "Copy Coordinates".  With some nodes selected in the Node Network, run the script. 

"Running the script" currently means to double click the Python script filename from wherever you've saved it to disk on your computer.  In an upcoming post I'll show you a couple of ways to simplify the execution of a script, so running it will be more at your fingertips.

Teaser alert, this script is very helpful when used in conjunction with another script that I'll be posting soon. One that has more artistic merits than utilitarian.

Get your copy for free right here:
https://github.com/RedMawVFX/tg-copy-coords-to-selected.git
#44
Tools, Utilities / Script tg_find_nodes_in_projec...
Last post by Kevin Kipper - January 08, 2025, 02:46:56 PM
There are occasions when it would be nice to be able to find a specific node in the active Terragen project, especially in large or complex projects.  This script does just that, and allows you to add or remove nodes from the currently selected nodes in the project.

tg_find_nodes_in_project_gui.jpg

When the script is first run the UI will present a list of all the nodes at the root level of the project. (It doesn't display nodes within the internal node network of another node). You can refine the items that are displayed in the list by entering characters in the "Search pattern" field.  Clicking the "Clear" button will clear the search pattern and redisplay all the nodes.

As I've mentioned in previous threads, these types of scripts will continue to run until closed by clicking on the Close Window button.  The "Refresh" button allows you to update the list of nodes to take into account any changes in the Terragen project while the script was left running.

You can quickly select all the nodes displayed in the list by clicking the "All" button, or deselect all the nodes displayed in the list by clicking "None". Clicking "Invert" will toggle the selection state of the displayed nodes in the list.

To add the selected nodes in the list to the currently selected nodes in the project click on the "Add to selection" button.  Similarly clicking the "Remove from selection" button deselects the nodes from the currently selected nodes in the project.

Now this version of the script works fine, but there is plenty of room for improvement and additional features.  In an earlier iteration of this idea, I had a function to step through the selected nodes, and I'm thinking that it might be nice to add that into this UI as well.  Here's an example of an earlier incarnation of the script with that feature.

tg_find_nodes_in_project_old_ui.jpg

Also, one feature I really want to include is to have the ability to center the Node Network on a selected item or items in the list.  This will require the terragen_rpc module to be updated, but when it does that feature is going in. 

What else can we add to the script?.  How about using the currently selected nodes in the Terragen project to drive the selection of the displayed nodes in the list?  That might make deselecting certain nodes quicker and easier.  How about overriding the current selection in the project with the selection from the list?  I'm still toying with the idea of a separate and simplified script that just presents a search pattern and buttons to advance to the previous or next node that matches the search pattern.  What do you think?

As always, you can download this script for free right here:
https://github.com/RedMawVFX/tg-find-nodes-in-project.git

#45
Terragen Discussion / Re: Cloud Layer with Simple Sh...
Last post by Dune - January 08, 2025, 10:55:28 AM
It may be a bit fiddly to rotate it the right way though, as you can't see it rotate really.
#46
Terragen Discussion / Re: Cloud Layer with Simple Sh...
Last post by danmwilson - January 08, 2025, 10:34:33 AM
Yeah I'm just talking about the oval shape. If rotating it with the transform shader is the right way to handle that distortion then that's what I'll do. Thanks for the insight.
#47
Tools, Utilities / Script tg_node_display_options
Last post by Kevin Kipper - January 08, 2025, 04:32:05 AM
There are over twenty types of nodes in Terragen that have some kind of display options for viewing the node in the 3D Preview.  As you can see in the image below the potential for visual clutter starts to add up as more and more nodes are added to the project. 

tg_node_display_options_before.jpg

Terragen provides a number of ways to set an item's display options ranging from manually setting the options for each node to globally hiding or unhiding all object nodes via the "Perform an action" button at the bottom of the Object List.  Even so, some node types such as Cloud layer nodes and Light nodes must be completely disabled in order to hide them in the 3D Preview, which is not always ideal.

This script allows you to select any type of node listed in its UI and turn the display options on or off, or to toggle between the two settings.  Some node classes, like Camera, have multiple display options, and with this script you can choose which of those options to affect.

tg_node_display_options_gui.jpg

This version of the script affects all the nodes of a particular class in the project. For example, you can turn off the "Show b-box in preview" option of all the Simple Shape shaders in the project at once.  With another click of the button you can turn them back on.  Some nodes let you choose between multiple display modes like "Bounding box", "Wireframe", or "Smooth shaded".  Currently the script doesn't keep track of the original display mode, and toggles between "Hidden" mode and "Texture" mode, but that feature may be something to add in the future.

tg_node_display_options_after.jpg

Instead of affecting all nodes of a particular class, I was toying with the idea of affecting only nodes selected in the Node Network, but now I'm thinking it would be better to make that a separate script without a UI.  It would be more akin to selecting a node in the Node Network and pressing the "d" key to disable it.  Let me know what you think.

Just to clarify, the script does not affect the render state of a node, only its preview options, i.e. how it is displayed in the 3D preview.

Download a copy of this script for free at the url below:
https://github.com/RedMawVFX/tg-node-display-options.git
#48
Terragen Discussion / Re: Cloud Layer with Simple Sh...
Last post by Dune - January 08, 2025, 02:42:39 AM
That's due to the radius of the cloud localisation, the falloff in the cloud node makes these random holes. If you extend it, it's a perfect circle.

A plain simple shape wouldn't be good enough to make a hurricane cloud; you'd need some cloud fractal and a vortex shader. But I guess you're aware of that.

Ah, I just realized there's probably something else you mean; the oval shape instead of round. That's because the simple shape is flat and if it's projected on the side of the planet, you end up with an oval. You could rotate it with a transform shader.
#49
Terragen Discussion / Cloud Layer with Simple Shape ...
Last post by danmwilson - January 07, 2025, 08:42:02 PM
I'm having some trouble with creating a cloud layer in the shape of a hurricane, following the basic structure of this TerraTuts video https://www.youtube.com/watch?v=M-3hIVf2V-I. It looks like the simple shape shader, when plugged into the cloud layer, ends up being distorted the further from the origin the cloud layer gets.

Here's some pictures of what I mean.

At origin: cloud-layer-circle-origin.png  At xyz: -130035, -2.18776e+06, -4.80703e+06: cloud-layer-circle-distorted.png

This is on a brand new project with the only changes being to add the cloud layer. I've attached the project file for reproduction.The TerraTuts video didn't seem to have this problem, but given I can reproduce it in such a simple scenario I'm not sure what the cause is. It looks like the simple shape is being projected from its plane on to the plane of the cloud layer and that's causing the distortion. I've tried disabling "Move Textures with Cloud" and pasting the same coordinates into the simple shape shader but that doesn't have an effect. I'm also not sure if the same distortion is present with the fractal noise shaders. I have found that if I plug a transform shader after the simple shader and apply a rotation I can cancel out the distortion, but I'd rather not have to do that manually.

Is this a bug? Is this expected? How do people deal with this? I can't imagine I'm the first to experience something like this.
#50
Terragen Discussion / Re: fake stones madness
Last post by digitalguru - January 07, 2025, 04:08:19 AM
The underlying texture helps a lot.