Planetside Software Forums

Support => Terragen Support => Topic started by: Kadri on March 21, 2021, 10:08:50 PM

Title: Excluding Lighting objects origin from the rest
Post by: Kadri on March 21, 2021, 10:08:50 PM
Is there a way to separate the lighting object from the part where it hits the ground and shadows?
I want to exclude only the part from where the light comes.

I looked around and tried some layer options but couldn't find a way.

I use version v. 4.1.25
Title: Re: Excluding Lighting objects origin from the rest
Post by: WAS on March 22, 2021, 01:36:05 AM
I don't think I properly understand. Do you have a visual example of what you are trying to exclude?
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 22, 2021, 02:22:15 AM
So you want the object to be lit, but not the ground it sits on, nor a shadow. I think the only way is to render a crop with just the object lit, and paste it in the total render where the object is not lit (or absent). No other way to my knowledge.
A bit more work for animations though
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 02:27:34 AM
Think as that the place where the light is as glowing. I don't want that glowing part...the origin of the light part.
I want only the lights that come from there on the ground and to the clouds and the shadows.
Now if i have high numbers the point where the light is grows-glows too much like a sun.

Maybe there is something i don't see and it is possible. Wouldn't be surprised.
If this isn't clear enough i will try to show an image.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 02:28:46 AM
I want everything to be lit. I just don't want the glowing part where the light is Ulco.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 02:29:36 AM
It is an animation unfortunately.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 22, 2021, 02:29:59 AM
How about a (wide angled) spotlight, with glow turned off?
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 02:31:39 AM
Everything glows so far i tried at least.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 22, 2021, 02:33:28 AM
You can turn off glow and light atmo in the sun too, but I guess that's not what you mean... that works in my quick try. But you get very dark shadows.
Title: Re: Excluding Lighting origin from the rest
Post by: Kadri on March 22, 2021, 02:42:21 AM
Take a look at this.
The sun is not a problem. But the other 2 light source types are.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 22, 2021, 04:24:14 AM
How about an invisible plane...
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 04:29:58 AM
Unfortunately i want it the other way around. I want the upper part gone where the light source is.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 22, 2021, 04:37:02 AM
Mmmm. Well, maybe a sphere or plane with illumination, but invisible... I often use that to light up shadowed areas (of people).
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 04:39:38 AM
Thanks i will try that.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 05:20:27 AM

Hmm...When you go to some extremes kinda strange things happen.

The sphere object didn't do anything when it was 1 meter or so. Even when i used very high luminosity settings.
Using negative scales-inverting didn't work too.
But when i made it so big (kinda) as the background sphere even 1 luminosity was enough to lit the planet.

The planet node and cube worked the same way.

But the card acted as predicted and lit the ground.

But looks like this brings some other problems. When it goes through the clouds everything is lit-glowing too much...

It could work maybe i don't know. Have to test it in the scene.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 05:34:55 AM
I think a setting in the light nodes to exclude specific objects, clouds, atmosphere could help here.
In my case here probably excluding atmosphere.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 22, 2021, 05:53:44 AM
Yes, like in the sun. That would be for Matt to implement.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 10:31:05 AM
FRUSTRATING!

With card object luminosity test:

Luminosity : 1003101  Render is all white.
Luminosity : 1003100  Render is normal but no lighting.

Small crop and big crop in the viewer looks different too. And even the opposite what you get in the final render...

The luminosity changes i think depending on the object size and you begin to play ones again with settings.
I think i got light with much lower settings first but got to those high numbers while playing around with this strange appearances.

I give up. I will just try to get rid of those parts in post and try to cheat and hope it works.
I think this will be even easier then playing cat and mouse with all those settings.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 10:41:40 AM
Just saw that i could get even 3 different looks (full white, partial lit and without light) by just trying to render 5-10 times the same frame...hmm
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 10:53:25 AM

I used a lower luminosity like 10 000 and got 3-4 different looks every time i rendered the same frame.
Luminosity isn't reliable. Don't know if it is because of these high numbers or the way it is sampled.
I have a feeling that AA, detail and-or GI settings will affect this too...
So until i know what i really should do i won't use this method but it was worth a try.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 22, 2021, 12:28:20 PM
Too bad.
Title: Re: Excluding Lighting objects origin from the rest
Post by: WAS on March 22, 2021, 01:30:37 PM
May have to play with lighting in atmosphere, and lighting on surfaces with the large sphere/cube.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 08:15:20 PM
I thought that maybe the card object is a big flat polygon maybe the luminosity was not accurately sampled or so.
So i tried with a high poly obj object. But couldn't get it work like i wanted. Testing in the real scene takes too long.
So i will wait and see if you or others will get any good results.

But still curious. I will see what happens in a default scene.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 08:37:30 PM
This test is with an imported kinda high poly flat sphere.
Luminosity is at 100. It works with 1 too but it is seen with 100 better.

This is an animation of 25 frames (1.6 Mb gif). I didn't animate and didn't change anything from the defaults.
So this is actually the same frame rendered 25 times.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 09:45:42 PM
I tried many things, GI, more atmo samples, AA, animation settings, subdivide etc.
With some it looks less sporadic. But still it is like the sampling is all over the place.

If nothing comes to my mind this is so far i go. The object polygons could be a problem (doubt it but just in case) for example.
I will triple them and try ones again.
Edit: No. Same results.

If you want you can try the same scene here too:
Title: Re: Excluding Lighting objects origin from the rest
Post by: WAS on March 22, 2021, 09:49:47 PM
Have you tried using a saved cache of one frame for all frames? I think this is random "noise" introduced by the approximation of the luminosity lighting and cannot be helped. It can get a little better forcing it to sample better but will never be accurate and takes some shortcuts by way of approximation.

This is why I don't like luminosity and how it works. Very fake. Like with my red dwarf, I got to a point where it looked alright, but if you look closely the rings have the same circle effects where it was approximating lighting coming from the clouds luminosity and underlying planet luminosity.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 09:52:17 PM
Quote from: WAS on March 22, 2021, 09:49:47 PMHave you tried using a saved cache of one frame for all frames? I think this is random "noise" introduced by the approximation of the luminosity lighting and cannot be helped. It can get a little better forcing it to sample better but will never be accurate and takes some shortcuts by way of approximation.

No. I haven't tried that but that could work. But wouldn't help in a real scene unfortunately (?).
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 10:01:17 PM
Jordan i just tested caching like you said. It works. The lighting is blotchy but not going all over the place.

The sampling is like the subdiv settings different and lower then the rest probably.

I think here is the place where Matt says something ;)
Title: Re: Excluding Lighting objects origin from the rest
Post by: WAS on March 22, 2021, 10:29:18 PM
It would be cool to see improvement here, at least maybe some sort of slider for accuracy, despite hitting performance, to leave to the user to find a sweet spot.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 22, 2021, 11:00:26 PM
Yeah. Maybe Matt didn't see it coming that luminosity would be used in these kind of kinda extreme ways...
Hope he changes this like you said (if there isn't already a way of course).
It could be kind of an alternate use instead of lights in some situations.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 23, 2021, 11:10:17 AM
I thought about if there is any workaround.
I cloned the same obj object many times and much smaller. Nothing changed.

I used a population of the object but again nothing changed.

Curious if not the polygon count but the surface count (how many surfaces there is on the object) is important for luminosity.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Dune on March 23, 2021, 11:39:13 AM
Maybe a stack of invisible, luminous, no-shadow planes will 'average' the light calculation? Or if you could just move the sun to that location and reduce its size.
Title: Re: Excluding Lighting objects origin from the rest
Post by: Kadri on March 23, 2021, 12:04:18 PM
Quote from: Dune on March 23, 2021, 11:39:13 AMMaybe a stack of invisible, luminous, no-shadow planes will 'average' the light calculation? Or if you could just move the sun to that location and reduce its size.
I tried stacking too. Didn't work. I used only 6 objects but still...
The sun won't work that way (think of a meteor lighting seeing from above).

Many surfaces test didn't work. I tested with an object with 7 surfaces.

Anyway... Moving on.