Recent posts

#21
Tools, Utilities / Re: Script tg_splatter_craters...
Last post by RichTwo - January 18, 2025, 12:12:08 PM
Hello once again.  Since I had medical issue which limited computer use, I had taken a somewhat sustained absence from both this forum and Terragen itself. This is a welcome addition indeed, except I haven't found a way to get Terragen to communicate with the script.

So far, trying use TG to open / read the script results in my only getting an error message, which I guess says it's unable to do so. The message box is too small to show all of the message.

The only app I have that will show anything, which I assume is the entire script, is the MS File Viewer.  I have not found any practical way to use this, so there must be something else, which I'm not sure I have.

I have read the above instructions several times, and it's still not clear to me how the script will create the TG nodes.

I'd really love to have this capability, since much of my endeavors are of a space / extraterrestrial theme. Thanks in advance for any helpful advice.

#22
Image Sharing / Roman investigators find new c...
Last post by Dune - January 18, 2025, 10:58:17 AM
;D
#23
Tools, Utilities / Re: Script tg_splatter_craters...
Last post by Dune - January 16, 2025, 02:15:05 AM
Thanks Kevin. Good to know it works like that. I will dive into this...
#24
Tools, Utilities / Re: Script tg_splatter_craters...
Last post by Kevin Kipper - January 15, 2025, 01:33:01 PM
For most of the scripts I'm posting, you need Terragen to be open.  That's what I refer to as the "active" Terragen project.  When you run a script that utilizes the RPC feature, the script is communicating with that open Terragen project.

In this script you're adding Crater shaders to the active project.  You can always select all the Crater shaders and save them as a clip file for use in other Terragen projects.

#25
Image Sharing / Re: Forest drive
Last post by digitalguru - January 15, 2025, 04:55:59 AM
It's meant to be fairly low key, but I'll need to get some more contrast in the final. To some extent it's driven by the IBL I'm using for the lighting and far b.g.

Taking my inspiration from these stills in this Dodge Ram promo video:

dodge_powerToTheWeekend_000020645.jpg
dodge_powerToTheWeekend_000020812.jpg 
#26
Tools, Utilities / Re: Script tg_splatter_craters...
Last post by Dune - January 15, 2025, 02:52:29 AM
This is really cool! I have't used RPC yet, so I'm curious how this will work. Actually I was hoping that once you execute the script you end up with a clipfile that can be saved and used with an open TG, not by using the script. Because I imagine you sometimes want to enliven a landscape with something like this, but then you've already opened a project. But I guess you miss certain parameters then.
Your samples are very inviting!
#27
Image Sharing / Re: Forest drive
Last post by Matt - January 14, 2025, 09:05:54 PM
Looking forward to it! If I may, it seems quite underexposed. Will it be brighter after comp?
#28
Tools, Utilities / Script tg_splatter_craters.py
Last post by Kevin Kipper - January 14, 2025, 06:48:19 PM
As promised, here's a script that's a bit more artistic in nature.  This script "splatters" instances of the Crater shader across your terrain.  Now you can create fields of impact craters with just one click. 

tg_splatter_craters_forumpost.jpg

Each crater's parameter values are randomly generated and based in between the minimum and maximum values you provide.

tg_splatter_craters_gui.jpg

The first thing you'll notice is a checkbutton for "Tooltips".  Hovering over the script's parameters will display a tooltip when the checkbutton is checked.

tg_splatter_craters_tooltips.jpg

To add Crater shaders to the active Terragen project enter the quantity you want in the "Number of craters" field.  The shaders can be grouped together by checking the "Group" checkbutton and providing a name.

The "On mountain or in valley?" parameter will add one Simple Shape Shader beneath all the Crater shaders.  The Simple Shape shader will displace the terrain by the amount specified.  Positive values will displace upwards creating a mound and negative values will displace downward like a valley or pit.  I've found that having a subtle displacement of just a few metres can work wonders when eroding the terrain later on (downstream) in the node network.

Each crater is randomly positioned around the "Area centre x,y,z" coordinates and within the "Area volume x,y,z".  This is similar to how the Populator v4 shader works in Terragen.  You can copy valid x,y,z coordinates from the clipboard to the "Area centre x,y,z" parameter by clicking the "Clip" button, and reset them back to the origin of the project with the "Reset" button.

Parameters for each Crater shader are randomly generated between the "Minimum" and "Maximum" value for that parameter. Some parameter values can be based on the crater's diameter by checking the "or % of diameter" checkbutton.  Furthermore, those values can be randomized by checking the "+/- Offset" checkbutton.

The script includes a list of certain types of displacement shaders that can be assigned to the Crater shader's "Rim shader" parameter.  Select a displacement shader from the list and check the checkbutton.  One displacement shader will be assigned to all the crater shaders generated when the Apply button is clicked.  Most of the displacement shader's parameters are set to their default values, so you'll need to tweak those values based on the size of the craters you're adding to the project.  For example, the default value of the Alpine Fractal shader's "Feature scale" is 4000 metres and its "Displacement amplitude" is 2000 metres. This may be extreme if the crater you're adding is only 10 meters across.  Perhaps a future version of this script can take this into account and scale certain parameters of the displacement shader assigned to the craters.

If desired, the Crater shaders can be inserted into the node network workflow. The "Output > Main input" option will attempt to connect the added Crater shaders in between the first Compute terrain node in the project and whatever shader was assigned to its Main input when the Apply button is clicked.  The "Merge shader" option will attempt the same via a Merge shader node.  When the "Don't" option is chosen, no attempt is made to connect the Crater shaders to the existing node network.

When checked, the "Append fractal warp shader?" checkbutton will add a Fractal Warp shader node after all the Craters.  This comes in handy when you want to apply a warp to the shape of the craters you've just added.  When your craters have been inserted into the node network via the Merge shader this is a handy way to warp only that grouping of Crater shaders.  The Fractal Warp shader's Scale value is set to about twenty-five percent of the crater diameter.

Clicking the "Apply" button will add the Crater shaders and other supporting nodes to the project.

tg_splatter_craters_NodeNetwork.jpg

The menu includes a set of "Presets". These values are meant for fun and are not necessarily scientifically accurate.  I'd love to add more presets to the menu, both artistic and scientific, so if you come up with any good ones please let me know, or try your hand at editing the preset dictionary in the script.

tg_splatter_craters_presets.jpg

Have you ever noticed that the Crater shader doesn't have handles so that you can move it around in the 3D Preview, even though it has x,y,z coordinates?  What if you want to move a crater?  This is where the tg_copy_coords_to_selected.py script comes into play.  You can right click in the 3D Preview and select "Copy Coordinates" for the location you want to move the crater to, then run the tg_copy_coords_to_selected.py script.  The script will copy the coordinates from the clipboard to any nodes you have selected in the Node Network that accept xyz coordinates.  Here's a link to the forum post with more information about that script: https://planetside.co.uk/forums/index.php/topic,30972.0.html

This script can create some interesting terrains to say the least.  When applying the techniques described in the Terrain Techniques blog posts such as warping and eroding a basic shape, in this case the Crater shaders, you can come up with unique and exciting terrains. 

https://planetside.co.uk/blog/terrain-techniques-simple-shape-shader/
https://planetside.co.uk/blog/terrain-techniques-image-map-shader/
https://planetside.co.uk/blog/terrain-techniques-detail-warp-erode/

Here are some example renders that I've made by just goofing around with the script.

tg_splatter_craters_examples.jpg

Get your copy of the script right here for free!
https://github.com/RedMawVFX/tg-splatter-craters.git
#29
Image Sharing / Re: Glacier science
Last post by Stormlord - January 14, 2025, 12:04:57 PM
Terragen and CG for geological science is a cool thing!
Doesn't look real, but it's a nice render to illustrate differences in nature.

STORMLORD

#30
Image Sharing / Re: Glacier science
Last post by Dune - January 14, 2025, 02:49:08 AM
Good to see you posting again. And this looks pretty dramatic. Quite a change in landscape.