Author Topic: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)  (Read 3698 times)

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11470
  • Holy snagging ducks!
The new ray-traced preview (RTP) in the Terragen 4 beta is a much faster way to preview many elements of your scene. But in the current stage of development you need to work with it in a particular way to get best results (we will be working on improvements over time). Here is some advice on how to get the most out of how it currently works and avoid its limitations and bugs.

The RTP is a ray-traced, realtime view of the scene. It renders approximations of lighting, atmosphere, and terrain shading over static geometry of the scene. You can see more-or-less realtime updates in the RTP for changes to camera/POV, lighting, atmosphere, and surface shaders (with certain limitations), but changes to displacement won't show. This is because the RTP does not currently generate any terrain geometry on its own. It relies on the regular preview to generate terrain and can only operate on whatever terrain geometry was generated before you switched to the RTP, at whatever detail level that was (non-terrain geometry such as imported objects will work fine in the RTP, it does not need to be "generated"). As a result you need to use them in clever combination at the moment, and you may need to switch back and forth frequently.

The eventual goal is to have terrain geometry generated dynamically for both the regular and RTP and to have it cached so it doesn't have to re-generate terrain data it has already calculated for a previous view (within limits; the cache will have to be flushed with some sort of intelligent strategy). This should make using both the RTP and the regular preview much more enjoyable and interactive. But even as-is the RTP is already a big improvement over the regular preview for many things.

Workflow Example
Here's my basic workflow with the RTP in its current state.

  • Start Terragen
  • Turn off shaders, atmo, and lighting for regular preview to speed it up
  • Let it generate to whatever terrain detail level you want; often I enable the HD option
  • Pause regular preview before turning on RTP; this is currently helpful with stability, but more generally is also useful to control when the regular preview generates data and how (e.g. with or without shaders, atmo, etc.)
  • Enable the preview elements I want: Shaders, Atmosphere, Lighting
  • Use the RTP, move around the scene, adjust clouds, lighting, etc.
  • If I move the camera to an area or perspective where geometry has not yet been generated:
  • Turn off RTP
  • Turn off Shaders, Atmosphere, Lighting
  • Unpause Preview and let it generate geometry to my desired level of detail
  • Pause preview
  • Switch back to RTP
  • Re-enable Shaders, Atmo, Lighting

You can Set your camera position then pull your camera up above the area and look down, then generate the terrain from this view. That way you can return to your camera position (just switch back to the "set" view) and you'll have more terrain geometry all around your camera, instead of just in front.

The RTP works with the "crop region" feature and you can get detailed results much quicker if you crop to a smaller area of interest. This can work well when tuning clouds, surface shading, and more. Just enable the crop render and shrink/move it to the area of interest, then turn on the RTP and it will render detail only in that area, saving a lot of "rays" (and render time).

There are a number of limitations in the current RTP. These will be improved over time. The regular preview will remain which will mitigate some of these problems, like the lack of preview "info" (e.g. distance, height, etc.).

  • Terrain geometry and displacement are only generated by the regular preview, RTP can only render geometry that has already been created.
  • The "Open preview in new window" functions are currently disabled.
  • Object selection and manipulation doesn't work consistently.
  • Reflective surfaces aren't currently rendered, including Water.
  • Disabling/hiding objects doesn't work.
  • No preview info read-out.


  • The RTP can sometimes cause crashes. We're working to improve stability.

In certain ways it is best to think of the RTP right now as a "very quick render" with realtime camera movement, and the ability to adjust certain focused aspects of the scene. It is useful for tuning cloud settings, for example, along with lighting and camera view. It is not necessarily ideal to adjust objects, create and edit populations, etc. while using RTP. You may want to switch back to the regular preview for that, then turn RTP back on once population/object editing is done. As time goes on you will be able to do more and more in the RTP, but even in its current state it is a very useful, productivity-enhancing feature.

We look forward to your thoughts and feedback! (keeping in mind the above known limitations, bugs, etc.)
« Last Edit: July 03, 2016, 07:45:49 AM by Oshyan »

Offline Matt

  • Planetside Staff
  • *
  • Posts: 2810
  • I'm the crazy one
Great advice, Oshyan, but I'd like to add some things that have changed in the Beta.

I don't think you should Pause the preview before entering RTP mode anymore. Crashes related to that were solved in time for the Beta (although we can't say it's 100% stable yet). In fact, pausing now pauses the RTP.

Actually I would encourage people to use the RTP when working with populations, changing their settings, adjusting their shaders etc. Many things that didn't work in the Alpha builds were fixed in time for the Beta. The RTP is so much faster at rendering and updating populations; using the OpenGL preview will slow you down. If you encounter any crashes by doing this, please report them to us. However, the RTP doesn't display handles for moving objects around (but will in future!), so for that you might need to exit RTP.

« Last Edit: July 03, 2016, 09:02:28 AM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline Chad

  • Member
  • *
  • Posts: 6
RTP also lets you do fisheye and spherical projections.  Neat!

Offline bobbystahr

  • Member
  • *
  • Posts: 7477
  • Turn, and face the Strange Ch Ch Changes...D Bowie
I've found that sometimes the RTP won't happen and I have to save, close and reopen before it responds again...but I'm loving it and man o man does it ever speed up my work flow even on old slowpoke the computer.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New


Offline Dune

  • Member
  • *
  • Posts: 12287
  • Corkscrew Bird
Yes, that happens indeed, but has been reported.
In case you still haven't seen enough of my work:

Offline bobbystahr

  • Member
  • *
  • Posts: 7477
  • Turn, and face the Strange Ch Ch Changes...D Bowie
Keeps crashing today while calculating the pop....may be my computer though, the net is slow as well.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New


Offline KlausK

  • Member
  • *
  • Posts: 241
  • Land ho!
Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
« Reply #6 on: December 27, 2016, 12:30:24 PM »

Did anybody notice the following behaviour of the RTP:
changing the "Sun Glow Power" in the Atmosphere node or the Cloud Layer nodes to higher values (8, 9, etc., depends) leads to the RTP rendering a black atmosphere or a black cloud. The problem is that it is not able to render a correct image after tuning back the value of the glow to a useful working value. The image stays black. Solution: restart TG.
cheers, Klaus

EDIT: Duh, right after posting this I found the solution...Reset the view, and the black overlay is gone after the OpenGL preview has finished its work. The RTP is back to normal.
« Last Edit: December 27, 2016, 01:04:06 PM by KlausK »
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 780 / Win7 Ultimate