Planetside Software Forums

General => Terragen Discussion => Topic started by: noahding on October 29, 2021, 06:25:40 AM

Title: Student: The parallel light problem
Post by: noahding on October 29, 2021, 06:25:40 AM
有平行光吗?我想在C4D中做出平行光的效果,让云彩可以在六个不同的方向均匀照射,可以吗?
Title: Re: Student: The parallel light problem
Post by: Hannes on October 29, 2021, 10:48:52 AM
I'm using Firefox. Is there a way to translate?
Title: Re: Student: The parallel light problem
Post by: icarus51 on October 29, 2021, 12:28:37 PM
Hi Hannes,

Google translate  says this:

"Are there parallel lights? I want to make the effect of parallel light in C4D so that the clouds can be illuminated evenly in six different directions, is it okay?".

I hope this help.
Title: Re: Student: The parallel light problem
Post by: WAS on October 29, 2021, 01:23:18 PM
Probably the best way to do this is within a inverted Cube and seperate the normals to XYZ masks if you need different light intensity on different sides of the cube. Then use those masks to drive luminosity.

Even illumination will provide no depth for turn-table operations if that is what you are going for. It will just be an amorphous blob.
Title: Re: Student: The parallel light problem
Post by: WAS on October 29, 2021, 02:05:37 PM
Here is an example project. This has all sides illumination set to 0.2 except for the top face, which is at 1.
Title: Re: Student: The parallel light problem
Post by: Kevin Kipper on October 29, 2021, 05:05:49 PM
Terragen's Sunlight node emits light in parallel rays.

By changing the Sunlight node's Heading and Elevation settings you can change the direction of illumination.  In the first example image below, the Heading values of 0, 90, 180, or 270 degrees correspond to North, East, South and West illumination, and the Elevation values of +90 or -90 correspond to top and bottom lighting. 

In the second example image, six Sunlight nodes are added to the project, each one corresponding to North, East, South, West, Top, and Bottom.  Each Strength setting = 1, and the Bottom Sunlight node's Cast Shadows option is off.

For more information on the Sunlight node, check out the Wiki documentation here: https://planetside.co.uk/wiki/index.php?title=Sunlight
Title: Re: Student: The parallel light problem
Post by: WAS on October 29, 2021, 06:04:57 PM
Does location make an impact? It seems all the light points are off setted on the sphere, but probably due to planet location vs suns? Or is something else causing that look? Seems the suns are not perpendicular in each direction. Additionally the atmosphere will create additional rays of illumination I believe from the atmosphere blooms.
Title: Re: Student: The parallel light problem
Post by: Kevin Kipper on October 29, 2021, 08:20:52 PM
The spec hits on the sphere are due to the elevation being at 10 degrees.  I had to raise the sun high enough or the mountains would have shadowed the sphere.  If I had only rendered the sphere, against black or via a render layer w/o the terrain, I would have left the elevation at 0 degrees.  Mostly I wanted to demonstrate the directional aspect of the sunlight and verify that it uses parallel rays.  I agree that if I wanted an evenly lit cloud layer I would probably eliminate any other light source that would contribute to the cloud illumination.
Title: Re: Student: The parallel light problem
Post by: WAS on October 29, 2021, 10:40:19 PM
Oh yeah. I didn't even think of the mountains.
Title: Re: Student: The parallel light problem
Post by: Dune on October 30, 2021, 03:26:07 AM
I think it would be good if users would take the trouble to translate themselves if they want some response in this 'English speaking' forum. I immediately got the reaction to report as spammer.
Title: Re: Student: The parallel light problem
Post by: Hannes on October 30, 2021, 04:34:31 AM
I agree, since the thread's subject already was translated. So it shouldn't be a problem.
Title: Re: Student: The parallel light problem
Post by: WAS on October 30, 2021, 01:28:35 PM
I've never had an issue with it. We most certainly shouldn't be gatekeeping Terragen to English-speaking people. Additionally, if you translate to, and then back, to ensure comprehension, you can often find some things do not translate, unless you actually know the language to fix mistakes the translator is having issues with. If anything, it's intriguing to translate other languages and communicate within them.
Title: Re: Student: The parallel light problem
Post by: Dune on October 31, 2021, 02:45:33 AM
Maar toch, ik ga er in ieder geval geen tijd insteken om vragen eerst te vertalen 8)

但是,至少我不会把时间放在翻译问题第一。
Title: Re: Student: The parallel light problem
Post by: WAS on October 31, 2021, 01:30:18 PM
Kinda ironic... Lol We don't really need any glottophobia here, though.

But it is also ironic, because while you say this you have engaged in code-switching with other Dutch members  to have derogatory conversation about members who don't speak Dutch (me).

I have no problem translating peoples posts if they are having trouble conveying what they need. I got plugins for it anyway. Though I have spent a life communicating with companies and my own websites with translators. Literally going on 22 years of working with people who don't speak English.
Title: Re: Student: The parallel light problem
Post by: icarus51 on November 01, 2021, 06:58:43 AM
Hi Jordan and all,

Me too, i have no problem with this thing. But i don't want to destabilize the forum and then i will think 20 times before to replay on these arguments, in the future. 
I'm sorry. :-[
Title: Re: Student: The parallel light problem
Post by: bobbystahr on November 01, 2021, 08:12:03 PM
Quote from: WAS on October 29, 2021, 02:05:37 PMHere is an example project. This has all sides illumination set to 0.2 except for the top face, which is at 1.
thanks 4 sharing man!
Title: Re: Student: The parallel light problem
Post by: noahding on November 01, 2021, 11:01:07 PM
First of all, I'm really sorry that I forgot to translate.
Thank you very much for your answer
This is the VDB of the entire sky that I exported on Linux and then set up a parallel light rendering in C4D in 6 directions (X.-x Y. -y Z.-z).
But using sunlight in Terragen didn't get the desired effect. But sunlight is valid for a single object or a cloud.
It would save a lot of time if Terragen could directly produce the right light in all six directions of the sky
I have uploaded the Terragen file I used for testing
Title: Re: Student: The parallel light problem
Post by: noahding on November 01, 2021, 11:28:13 PM
First of all, I'm really sorry that I forgot to translate.
Thank you very much for your answer
This is the VDB of the entire sky that I exported on Linux and then set up a parallel light rendering in C4D in 6 directions (X.-x Y. -y Z.-z).
But using sunlight in Terragen didn't get the desired effect.
It would save a lot of time if Terragen could directly produce the right light in all six directions of the sky
I have uploaded the Terragen file I used for testing
Title: Re: Student: The parallel light problem
Post by: noahding on November 01, 2021, 11:51:50 PM
Quote from: Kevin Kipper on October 29, 2021, 05:05:49 PMTerragen's Sunlight node emits light in parallel rays.

By changing the Sunlight node's Heading and Elevation settings you can change the direction of illumination.  In the first example image below, the Heading values of 0, 90, 180, or 270 degrees correspond to North, East, South and West illumination, and the Elevation values of +90 or -90 correspond to top and bottom lighting.

In the second example image, six Sunlight nodes are added to the project, each one corresponding to North, East, South, West, Top, and Bottom.  Each Strength setting = 1, and the Bottom Sunlight node's Cast Shadows option is off.

For more information on the Sunlight node, check out the Wiki documentation here: https://planetside.co.uk/wiki/index.php?title=Sunlight
First of all, I'm really sorry that I forgot to translate.
Thank you very much for your answer
This is the VDB of the entire sky that I exported on Linux and then set up a parallel light rendering in C4D in 6 directions (X.-x Y. -y Z.-z).
But using sunlight in Terragen didn't get the desired effect. But sunlight is valid for a single object or a cloud.
It would save a lot of time if Terragen could directly produce the right light in all six directions of the sky
I have uploaded the Terragen file I used for testing
Title: Re: Student: The parallel light problem
Post by: Hannes on November 02, 2021, 05:28:55 AM
I haven't yet understood, what you want to achieve. Six parallel lights at once? What's the benefit?
Title: Re: Student: The parallel light problem
Post by: noahding on November 02, 2021, 07:47:53 AM
In the test of the mobile terminal project, the correct light range of the sun shining on the cloud was simulated in UE with the light texture in 6 directions, so as to achieve the cloud effect with low performance consumption
Quote from: Hannes on November 02, 2021, 05:28:55 AMI haven't yet understood, what you want to achieve. Six parallel lights at once? What's the benefit?
Title: Re: Student: The parallel light problem
Post by: Hannes on November 02, 2021, 09:20:26 AM
Ah, I see. Thanks for the explanation.
Title: Re: Student: The parallel light problem
Post by: WAS on November 02, 2021, 12:51:49 PM
I gave you a solution that provides the same sort of look. Which is actually the same method UE uses, box sky lights.
Title: Re: Student: The parallel light problem
Post by: Matt on November 02, 2021, 07:07:02 PM
Quote from: noahding on November 01, 2021, 11:51:50 PMThis is the VDB of the entire sky that I exported on Linux and then set up a parallel light rendering in C4D in 6 directions (X.-x Y. -y Z.-z).
But using sunlight in Terragen didn't get the desired effect. But sunlight is valid for a single object or a cloud.
It would save a lot of time if Terragen could directly produce the right light in all six directions of the sky
I have uploaded the Terragen file I used for testing

You could turn off "Render surface" in the Planet node. Apart from that, your TGD looks like it should work. What was wrong with the Terragen renders? Do you want more contrast in the shading? You might get more contrast if you increase the cloud density. "Millions of voxels" might need to be higher too, but I'm not sure in this particular case.
Title: Re: Student: The parallel light problem
Post by: noahding on November 02, 2021, 10:27:55 PM
Quote from: WAS on November 02, 2021, 12:51:49 PMI gave you a solution that provides the same sort of look. Which is actually the same method UE uses, box sky lights.
You mean make a box and import Terragen to wrap the whole sky. The six sides of the box simulate 6 directions of light to bake 6 light textures?
I have tested terragen's surface light before, but the surface light is too soft. Can Terragen adjust the attenuation of surface light?
Thank you very much for your answer!
Title: Re: Student: The parallel light problem
Post by: WAS on November 02, 2021, 11:18:08 PM
I know you can play with the lighting settings of the clouds, as well as the density settings. But yes, it is pretty soft/flat. It also is approximated, so probably not very accurate. I'm not sure if there is a way to add to that approximation's precision. @Kevin Kipper or @Matt would probably know for sure. I do feel this should work much better, like it does in Blender and other programs where an area light is parallel to the plane's surface. So if it's flat, you have an area of straight light rays from the surface.
Title: Re: Student: The parallel light problem
Post by: Matt on November 03, 2021, 07:16:03 AM
Quote from: WAS on November 02, 2021, 11:18:08 PMI know you can play with the lighting settings of the clouds, as well as the density settings. But yes, it is pretty soft/flat. It also is approximated, so probably not very accurate. I'm not sure if there is a way to add to that approximation's precision. @Kevin Kipper or @Matt would probably know for sure. I do feel this should work much better, like it does in Blender and other programs where an area light is parallel to the plane's surface. So if it's flat, you have an area of straight light rays from the surface.

For parallel rays (a directional light source), the Sunlight node is the best choice. If the light direction needs to be softened, you can increase the soft shadow radius. The soft shadow radius causes it to be an area light as far as the clouds and atmosphere are concerned.
Title: Re: Student: The parallel light problem
Post by: WAS on November 03, 2021, 01:38:43 PM
It would be nice to see improvements, as the sun technically is not a good choice at all, its a spot light essential, and is very noticeable as such when you use an object with its specular highlighting. This will even influence how the clouds receive direct light, especially with TGs issue with sun burning in clouds (creating giant hard glow circle that the first lighting setting can't spread out enough). Will soft shadows really somehow effect highlights?

To me it's very obviously like shining a flashlight with cascading rays. This will most certainly effect the Y+/Y- look like it does for any overcast scene looking at the sun area.
Title: Re: Student: The parallel light problem
Post by: Matt on November 04, 2021, 06:31:54 PM
Quote from: WAS on November 03, 2021, 01:38:43 PMIt would be nice to see improvements, as the sun technically is not a good choice at all, its a spot light essential, and is very noticeable as such when you use an object with its specular highlighting. This will even influence how the clouds receive direct light, especially with TGs issue with sun burning in clouds (creating giant hard glow circle that the first lighting setting can't spread out enough).

Noah's request was for parallel rays similar to those found in a parallel/infinite/distant light in other renderers. In Terragen the equivalent of this is the Sunlight node.

Yes, this produces a bright spot in the clouds in the direction the rays are coming from, but this can be turned off with "Glow in atmosphere and clouds" in the Sunlight parameters.

QuoteWill soft shadows really somehow effect highlights?

Yes, the soft shadow radius will widen and soften out the bright spot in the clouds. (On surfaces the specular highlight doesn't quite work this way at the moment, but luckily we're talking about clouds here.)

QuoteTo me it's very obviously like shining a flashlight with cascading rays. This will most certainly effect the Y+/Y- look like it does for any overcast scene looking at the sun area.

The self-shadowing rays will be softened by increasing soft shadow radius, as it simulates an area light.
Title: Re: Student: The parallel light problem
Post by: WAS on November 04, 2021, 06:38:25 PM
Quote from: Matt on November 04, 2021, 06:31:54 PM
Quote from: WAS on November 03, 2021, 01:38:43 PMIt would be nice to see improvements, as the sun technically is not a good choice at all, its a spot light essential, and is very noticeable as such when you use an object with its specular highlighting. This will even influence how the clouds receive direct light, especially with TGs issue with sun burning in clouds (creating giant hard glow circle that the first lighting setting can't spread out enough).

Noah's request was for parallel rays similar to those found in a parallel/infinite/distant light in other renderers. In Terragen the equivalent of this is the Sunlight node.

Yes, this produces a bright spot in the clouds in the direction the rays are coming from, but this can be turned off with "Glow in atmosphere and clouds" in the Sunlight parameters.

Quote from: undefinedWill soft shadows really somehow effect highlights?

Yes, the soft shadow radius will widen and soften out the bright spot in the clouds. (On surfaces the specular highlight doesn't quite work this way at the moment, but luckily we're talking about clouds here.)

Quote from: undefinedTo me it's very obviously like shining a flashlight with cascading rays. This will most certainly effect the Y+/Y- look like it does for any overcast scene looking at the sun area.

The self-shadowing rays will be softened by increasing soft shadow radius, as it simulates an area light.


Thanks for the explanation, and suggestions there with glow, I always thought that turned off highlighting in general so never bothered with stuff like thick clouds. All this information is handy.
Title: Re: Student: The parallel light problem
Post by: noahding on November 05, 2021, 04:52:03 AM
Quote from: WAS on November 04, 2021, 06:38:25 PM
Quote from: Matt on November 04, 2021, 06:31:54 PM
Quote from: WAS on November 03, 2021, 01:38:43 PMIt would be nice to see improvements, as the sun technically is not a good choice at all, its a spot light essential, and is very noticeable as such when you use an object with its specular highlighting. This will even influence how the clouds receive direct light, especially with TGs issue with sun burning in clouds (creating giant hard glow circle that the first lighting setting can't spread out enough).

Noah's request was for parallel rays similar to those found in a parallel/infinite/distant light in other renderers. In Terragen the equivalent of this is the Sunlight node.

Yes, this produces a bright spot in the clouds in the direction the rays are coming from, but this can be turned off with "Glow in atmosphere and clouds" in the Sunlight parameters.

Quote from: undefinedWill soft shadows really somehow effect highlights?

Yes, the soft shadow radius will widen and soften out the bright spot in the clouds. (On surfaces the specular highlight doesn't quite work this way at the moment, but luckily we're talking about clouds here.)

Quote from: undefinedTo me it's very obviously like shining a flashlight with cascading rays. This will most certainly effect the Y+/Y- look like it does for any overcast scene looking at the sun area.

The self-shadowing rays will be softened by increasing soft shadow radius, as it simulates an area light.


Thanks for the explanation, and suggestions there with glow, I always thought that turned off highlighting in general so never bothered with stuff like thick clouds. All this information is handy.
Thank you very much for your answer ~ I have read your article (Cosmic Background (Stars and Galaxy) [2019 Night Sky]) this is a very wonderful Sky! I love it! Can this source file learn the following? Or where can I download and tutorial?
Title: Re: Student: The parallel light problem
Post by: noahding on November 05, 2021, 04:54:59 AM
Quote from: Matt on November 04, 2021, 06:31:54 PM
Quote from: WAS on November 03, 2021, 01:38:43 PMIt would be nice to see improvements, as the sun technically is not a good choice at all, its a spot light essential, and is very noticeable as such when you use an object with its specular highlighting. This will even influence how the clouds receive direct light, especially with TGs issue with sun burning in clouds (creating giant hard glow circle that the first lighting setting can't spread out enough).

Noah's request was for parallel rays similar to those found in a parallel/infinite/distant light in other renderers. In Terragen the equivalent of this is the Sunlight node.

Yes, this produces a bright spot in the clouds in the direction the rays are coming from, but this can be turned off with "Glow in atmosphere and clouds" in the Sunlight parameters.

Quote from: undefinedWill soft shadows really somehow effect highlights?

Yes, the soft shadow radius will widen and soften out the bright spot in the clouds. (On surfaces the specular highlight doesn't quite work this way at the moment, but luckily we're talking about clouds here.)

Quote from: undefinedTo me it's very obviously like shining a flashlight with cascading rays. This will most certainly effect the Y+/Y- look like it does for any overcast scene looking at the sun area.

The self-shadowing rays will be softened by increasing soft shadow radius, as it simulates an area light.

Okay, but if it's -y and the sun is at -90 degrees below the horizon, the clouds will look wrong. I think it is possible if horizon occlusion can be eliminated, but I can't find how to eliminate it
Title: Re: Student: The parallel light problem
Post by: WAS on November 05, 2021, 12:49:24 PM
Quote from: noahding on November 05, 2021, 04:54:59 AM
Quote from: Matt on November 04, 2021, 06:31:54 PM
Quote from: WAS on November 03, 2021, 01:38:43 PMIt would be nice to see improvements, as the sun technically is not a good choice at all, its a spot light essential, and is very noticeable as such when you use an object with its specular highlighting. This will even influence how the clouds receive direct light, especially with TGs issue with sun burning in clouds (creating giant hard glow circle that the first lighting setting can't spread out enough).

Noah's request was for parallel rays similar to those found in a parallel/infinite/distant light in other renderers. In Terragen the equivalent of this is the Sunlight node.

Yes, this produces a bright spot in the clouds in the direction the rays are coming from, but this can be turned off with "Glow in atmosphere and clouds" in the Sunlight parameters.

Quote from: undefinedWill soft shadows really somehow effect highlights?

Yes, the soft shadow radius will widen and soften out the bright spot in the clouds. (On surfaces the specular highlight doesn't quite work this way at the moment, but luckily we're talking about clouds here.)

Quote from: undefinedTo me it's very obviously like shining a flashlight with cascading rays. This will most certainly effect the Y+/Y- look like it does for any overcast scene looking at the sun area.

The self-shadowing rays will be softened by increasing soft shadow radius, as it simulates an area light.

Okay, but if it's -y and the sun is at -90 degrees below the horizon, the clouds will look wrong. I think it is possible if horizon occlusion can be eliminated, but I can't find how to eliminate it

From what Matt said, you should be able to uncheck the "glow in atmosphere and clouds" box in the sun shaders. May also need to adjust soft shadow diameter in the the sun's as well.
Title: Re: Student: The parallel light problem
Post by: Toggle on November 06, 2021, 09:51:48 PM
Thank you very much for your answer
Title: Re: Student: The parallel light problem
Post by: Toggle on November 08, 2021, 11:04:55 AM
What's the benefit from it?
Title: Re: Student: The parallel light problem
Post by: noahding1 on June 13, 2023, 11:31:53 PM
Why is rendering different from real time? The exposure value of the rendering is higher, and the detail of the dark area is missing
Title: Re: Student: The parallel light problem
Post by: noahding1 on June 13, 2023, 11:42:41 PM

Why is rendering different from real time? The exposure value of the rendering is higher, and the detail of the dark area is missing
Title: Re: Student: The parallel light problem
Post by: WAS on June 16, 2023, 05:10:08 AM
I assume the light is approximated to a degree, and the voxel count that the cloud lighting calculates from has to be limited to be real-time I assume too, this together would create a different lighting model result.

There's a lot of computation going on for cloud lighting.

Use the real-time preview to preview the actual shape of the clouds, and use a small preview real render, or crop preview render to sample the lighting.