Planetside Software Forums

General => Terragen Discussion => Topic started by: Oshyan on July 03, 2016, 03:33:04 AM

Title: Terragen Beta: How to use the new real time ray-traced preview (RTP)
Post by: Oshyan on July 03, 2016, 03:33:04 AM
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.

Basics
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.


Tips
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).

Limitations
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.).


Bugs


Wrap-up
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.)
Title: Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
Post by: Matt on July 03, 2016, 04:52:09 AM
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.

Matt
Title: Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
Post by: Chad on July 05, 2016, 07:05:10 PM
RTP also lets you do fisheye and spherical projections.  Neat!
Title: Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
Post by: bobbystahr on July 06, 2016, 12:22:46 PM
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.
Title: Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
Post by: Dune on July 06, 2016, 12:36:09 PM
Yes, that happens indeed, but has been reported.
Title: Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
Post by: bobbystahr on July 06, 2016, 04:55:40 PM
Keeps crashing today while calculating the pop....may be my computer though, the net is slow as well.
Title: Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
Post by: KlausK on December 27, 2016, 08:30:24 AM
Hi

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.
Title: Re: Terragen 4 Beta: How to use the new real time ray-traced preview (RTP)
Post by: Oshyan on August 09, 2017, 07:24:38 PM
This is a combination of two bugs, both of which have been noted in the issue tracker. The RTP issue is probably more immediate, which is that it doesn't properly reset itself after extreme values are used. This is less common in the situation you reported, I believe, but is something I have seen occur elsewhere, with the same black screen result. The black output is caused by bad handling of certain values in these settings, and the RTP and regular 3D preview, as well as the renderer, all handle these values in the same (arguably broken) way. The real problem is that the RTP doesn't reset itself even after the value is corrected, whereas both the regular 3D Preview and the renderer do. This could easily occur with accidentally high values entered into certain settings so it should definitely be fixed.

- Oshyan