Custom GPT for Terragen

Started by D.A. Bentley (SuddenPlanet), May 05, 2025, 10:18:38 AM

Previous topic - Next topic

D.A. Bentley (SuddenPlanet)

Has anyone created a custom GPT to understand .tgd files/Terragen nodes yet?

Is it possible to train a GPT to understand each Terragen Node and it's capabilities/function so that the GPT could read and summarize .tgd files and how they work. ChatGPT says yes, so I was going to try.

I already did a GPT search and there was nothing public that came up in the search.

I was going to try this soon, but if it has already been done or tried and doesn't seem possible then I won't waist my time. Just curious.

Kevin Kipper

Very interesting question.  Can you elaborate on what you're hoping to get from a custom GPT?  What do you imagine the summarization of the project file would look like?  Are you thinking of running this enmasse on a folder full of Terragen project files, or perhaps along side a current project?  Would it be for your own project files, or perhaps example files from this forum?

gao_jian11

This is definitely feasible! I initially gave a try to combine Gemini 2.5 and Grok3 with terragen to work together. Both of these AI systems can directly generate Terragen's TGD files and CLIP files. I use them to control the movement direction of the camera and the sun, import external model files to adjust the model materials, and arrange them in arrays. In summary, since the scene files of terragen are essentially XML files, writing such code is a domain where AI is very proficient. AI can do many things for terragen and greatly enhance work efficiency. I can open a separate post to introduce my attempts.

D.A. Bentley (SuddenPlanet)

Mainly just wanted to see if ChatGPT could understand Terragen nodes and their connections well enough to look at a tgd file and explain what all the parts do. Sometimes I encounter very complex tgd files, and want to break them down into pieces to understand what is going on. ChatGPT is good for having conversations, so even it if explains something to you that doesn't make sense, or is too complex you can keep chatting to it asking questions in different ways to teach yourself things.

digitalguru

I've tried Chat GPT on a few things with various degrees of success... depend on what it can find in its database I guess.
It's good on Python, ok on Maya, not bad on Nuke, but hallucinates badly on Houdini. I'm learning Houdini and lost count of the amount of times I've asked how to do something, only to find the node suggested by the AI doesn't exist. Or it'll suggest a totally heath robinson workflow invloving writing a bunch of Python only to find the solution is as simple as clicking the right button.

But reading and decontructing an existing file is an interesting idea, maybe it would handle that better. Would love it if I had an issue with a Maya/Nuke/Houdini/Terragen file and it could point it out, but then that would take the fun out of it...


Dune

Well, I just asked how to make a tunnel in Terragen :D
To create a tunnel in Terragen terrain, you will need to utilize several nodes that allow you to manipulate the terrain effectively. The process involves generating a heightmap, creating a tunnel shape, and then subtracting this shape from the existing terrain. Here's a step-by-step guide on how to achieve this:
Step 1: Prepare Your Terrain
Start by generating your base terrain using nodes such as Fractal Terrain or importing a heightmap using the File Input node. This will serve as the foundation for your tunnel.
Step 2: Create the Tunnel Shape
To create the tunnel, you can use a combination of nodes:
  • Shape Node: This node can be used to define the geometry of your tunnel. You might want to set it up with a rectangular cross-section (e.g., 5m x 4m) to represent the dimensions of your tunnel.
  • Transform Node: Use this node to position and orient your tunnel shape correctly within the terrain.
Step 3: Subtract the Tunnel from the Terrain
Once you have defined your tunnel shape, you will need to subtract it from your terrain:
  • Boolean Operations Node: This node allows you to perform operations like subtraction. Connect your terrain output to one input of this node and your tunnel shape output to another input. Set it up to subtract the tunnel from the terrain.
Step 4: Final Adjustments
After performing the subtraction, you may need additional adjustments:
  • Erosion Node: To refine the appearance of both your terrain and where the tunnel intersects with it, apply erosion effects.
  • Texture Nodes: Use shader nodes (like Surface Layer) to texture both the exposed parts of your terrain and any visible parts of your tunnel.
Example Node Setup
  • File Input (for heightmap)
  • Fractal Terrain (if not using an imported heightmap)
  • Shape Node (to define tunnel geometry)
  • Transform Node (to position the tunnel)
  • Boolean Operations Node (to subtract the tunnel from terrain)
  • Erosion Node (for realistic surface details)
  • Shader Nodes (for texturing)
By following these steps and utilizing these nodes, you should be able to create a realistic-looking tunnel within Terragen's terrain environment.
The probability that this answer is correct is approximately 90%.