Planetside Software Forums

Support => Terragen Support => Topic started by: neverager on June 19, 2019, 05:42:54 PM

Title: Slicing the terrain according to distance from the camera
Post by: neverager on June 19, 2019, 05:42:54 PM
I'm trying to to slice the scene according to distance from the camera by creating a render layer with set far clipping or near clipping distance, but it works only on atmosphere with clouds, terrain is not being slicing. So is there a way to slice terrain according to distance from the camera?
Title: Re: Slicing the terrain according to distance from the camera
Post by: WAS on June 19, 2019, 11:41:32 PM
Quote from: neverager on June 19, 2019, 05:42:54 PM
I'm trying to to slice the scene according to distance from the camera by creating a render layer with set far clipping or near clipping distance, but it works only on atmosphere with clouds, terrain is not being slicing. So is there a way to slice terrain according to distance from the camera?

At first thought I would say no, not the way you want likely. The scene in general works off a spheroid object. So perhaps to achieve these effects you could use a plane, at the desired width/lengths you need with your terrain setup.
Title: Re: Slicing the terrain according to distance from the camera
Post by: neverager on June 20, 2019, 03:42:15 AM
Thank you for the answer

Title: Re: Slicing the terrain according to distance from the camera
Post by: Matt on June 20, 2019, 08:41:41 AM
If you render with "ray trace everything" enabled in the Advanced tab, clipping works. Unfortunately this reduces the apparent micropolygon detail, so you would need to go into Subdiv Settings and set "ray detail multiplier" to 1. This usually increases render times by quite a lot, but give it a try and see if it works for you.

Another way you could solve this without ray tracing everything is by using Plane objects instead of the Planet, as WASasquatch mentioned above. You can plug the same set of shaders into the Plane instead of the Planet. However, you would lose the curvature of the planet.

A third possibility is using a Default Shader at the very top of the shader network and using a mask in its opacity input. This should propagate the opacity mask all the way down the chain. It's more efficient to mask it right at the top.
Title: Re: Slicing the terrain according to distance from the camera
Post by: neverager on June 20, 2019, 03:45:14 PM
Thank you very much for your answer, Matt! I think it will works for me.
Title: Re: Slicing the terrain according to distance from the camera
Post by: Mohawk20 on December 27, 2019, 09:36:08 AM
QuoteQuote from: Matt 6/20/2019, 2:41:41 PM
Another way you could solve this without ray tracing everything is by using Plane objects instead of the Planet, as WASasquatch mentioned above. You can plug the same set of shaders into the Plane instead of the Planet. However, you would lose the curvature of the planet.

Actually, I tried this out of curiosity:
A simple shape with a gradient displacement under several smaller planes.
If you get the size and displacement of the simple shape right to look like the curvature of a planet, you can place your planes wherever you want above it, and they'll have matching curvatures.

This opens up some possibilities... 8)