Please, dont remove Branched Path Tracing!

Did you even try to optimize your scene? (aka don’t use meshlights)
I also have to deal with open ocean environments / island etc… and I thank the day Cycles X was introduced. My rendertimes went down to less than 1/2

1 Like

The light tree building process can take up quite a lot of memory if you have a lot of lights. And when you’re working with mesh lights, every triangle is a light.

So as @Isscpp suggested, maybe you should try avoiding using mesh lights if possible. For example, maybe avoid using a mesh to represent the sun?

If you really need the sun to be a mesh light ball (E.G. You have a special shader on it that makes it look more like a sun, and it’s easier to control on a mesh, and your camera will be looking at the sun), then one option you have is to place a point light in the location of the sun, scale it up to the right size and strength, then disable light sampling on the mesh sun and disable it’s interaction will all materials except the camera.

With those changes, you can have the mesh ball sun for the camera, but the mesh ball sun won’t be included in the light tree, reducing Light Tree build time and memory usage and increasing render speed (The more lights there are in your light tree, the longer it takes for the light tree to be traversed, which slows down rendering).

This technique could even be useful for Branched Path Tracing. Because Branched Path Tracing samples every light (and I believe every mesh light). So if you turn off the sampling of the mesh ball sun and swap it for a point light, then fewer lights will be sampled, speeding up Branched Path Tracing.

@Alaska , @lsscpp

I have cooked scene from original so you can test difference. Not same, it is hard to see difference like in original, but if you look correctly, you can see…main difference is in center of image and further to horizon. Obviously more noise.
In original scene, this noise is more obvious because what yo can see is done by Noise texture, which gives more oblique/sine waves. Original uses trochoids, which are more spiky at wave crests/tops. When not using BPT, these crest are obliterated and ultra noisy.

I can upload images here but, this new scene does not pass memory load when using v360 Light trees. Only have 32Gb ram and LT is crashing rendering.

(site converts png to jpg…so who knows what compression had done extra)

P.S. So, where I can upload blend files…if you are interested? (topic not allowing zip upload)

Possibly, U can do extra optimization, but if I try to optimize more…it will take about month to optimize it (at least for me). While in one month…I can render whole animation.

@ lsscpp

Mesh lights or lamps, question is now!?

Simply speaking, I dont use lamps anymore. They gave me always poor image quality, non natural. Mesh Light are minimum building block for an scene…I can live with at most 20% penalty.

For me its like someone says to you “use Principal shader”.

No. In this particular scene I am hiding simple sun ball from camera. I put is somewhere behind environment image sun. This ball is huge and very far away to get sun like angularity. Power and color is manually (by eye) tuned…to fit environment colorization, contrasts, natural look and some artistic influence. Not using special shader, no need coz it is far away, not visible to camera, just adds juice to lights.

Special shader I use only when doing some angular anisotropy, volumetric gradients…like LED lights, laser, light glow gradient per sea depth…etc…

If you have a personal file sharing account like Google Drive or Dropbox, you can share it there.

Or you can do what someone else did. Rename your file.blend or file.zip to file.txt and upload it here. It just needs to be below 10Mb

Lamps and meshs with the same brightness and shape will look identical. And, lamps will produce less noise than mesh lights in many situation. So something must be weird about your tests.

To help me understand, what lead you to come to the conclusion that lamps reduced quality and are less natural than mesh lights?

Along with that, special lamps like area lights and spot lights have optimizations in place to provide better sampling within their cone of influence, meaning they will have reduced noise over a mesh lamp trying to mimic the same effect.

Overall, using lights/lamps instead of mesh lights can:

  • Reduce noise (Path Tracing or Branched Path Tracing with “sample all lights” turned off)
  • Reduce render times (The more lights there are in a scene, the more time is taken picking a light. Each triangle is a light. Ever point light is one light)
  • Reduce memory usage
  • Reduce scene initialisation time

Here’s some renders for comparison. I tried to match them as as close as I could. It’s not a perfect match in terms of brightness, but it’s close.

Note: I used the Light Tree and turned off “back face light sampling” to decrease the noise in the case of the mesh light.

Renders
1 Samples per pixel

Lamp:

Mesh:

1024 Samples per pixel

Lamp:

Mesh:

3 Likes

Although, when working in a complex scene, combining mesh with “normal” lights may of made mesh lights look better.

For example, with Path Tracing (without light trees), when a ray hits a surface and calls “we need to sample a light”, it first picks between mesh, “local lights” and “distant lights”. I believe the distrobution of rays between the different groups is equal. So each group has a 1/3rd chance of being selected (assuming each group contains an active light). After that, the function then picks a single light from the group it selected in the previous step.

If you had a scene with many local and/or distant lights, then added a single mesh light to the scene, then that mesh light would be highly sampled compared to other lights, and it could be believed that mesh lights offer improved sampling performance. And this is because 1/3 of the light samples are distributed to the mesh light group, and there’s only 1 mesh light, so all the rays will hit that object.

However, if you then shifted over to 100% mesh lights for everything, that benefit is lost.


Here’s a render show casing that:

This scene is rendered with path tracing, no light trees, 1 sample per pixel with 1 mesh light (Blue light) and 1 point light (Red light). As you can see, it’s noisy, because half the samples are sampling the mesh light, and the other half is sampling the point light, thus creating noise.

If I then leave all the settings the same, but instead change over to 1 mesh light and 25 point lights. You can see there is a lot of noise, but the mesh light is rendering well. This is because half the samples are sampling the mesh light, the other half are spread between the 25 point lights.

However, if I flip it. 1 point light, 25 mesh lights, the same behavior can be seen, but in reverse. The point light is rendering quite well compared to the mesh light. This is because half the samples are sampling the point light, and the other half are distributed between all 25 mesh lights.

2 Likes

Ok, thanks…lets try…test.txt is really test.zip…

Message box…“Sorry, new user are not permitted to upload attachments” :rofl:

I also get some messages like: “To many posts per second…wait 6” …
I remember Google search was trolling me by “I am not robot” testing. Now I use DuckDuckGo :slight_smile:

Look, I dont see how to accomplish volumetric light gradient using lamps.
Or, how to create sky dome without mesh light.

For the sun that I mentioned, Ok, lamp can pass…and pardon me, now I peeked into scene and Im actually using point light (4km radius) in the scene as approximation for distant sun. :slight_smile:
There U are right.

OK…configuration is…

  1. distant point light r=4km sun
  2. mesh light, sky dome, half ball, 20km radius, (scene is inside, far clouds & sky texture)
  3. sea pool, cube, currently mesh light constant trough cube volume.
    Im using sky dome to fix horizon…to be at same place as camera is moving in about ±1km all dir.

And, U are probably right, PT cannot digest this light configuration well, while BPT can.
And, in next scenes I will reduce using mesh lights as much as possible.

When I think about it…its really seriously wrong for my taste that render engine discriminates light sources. Ray must be statistical… and any of its optimization should be in same statistics. Maybe slower/faster, but should come as same results. Only if you destroy scene original statistics with some other parameters…then is obvious you cannot expect same results.

By “discriminating” between light sources, Cycles actually increases the quality in many scenes. For example, consider you have 100 point lights, and a distant light (a sun light). Well, 50% of the samples will be distributed between the point lights, the other 50% will sample the sun.

This increases quality because it means the sun, which lights up the entire scene, gets “over sampled” compared to all the point lights, this could be considered bad, but in a vast majority of cases it’s good, because it means your scene gets lit up by the sun in fewer samples.

And in most scenes, there are usually 2 distant lights at maximum (The sun and the sky). So this could be an assumption that was made to improve the rendering of scenes that contain a sun and/or sky.

As for the discrimination between “lights” and meshes, I’m not sure why that one exists. But I’m sure there’s a reason.

With Branched Path Tracing, the discrimination between lights types obviously isn’t an issue since every light gets sampled at once.

With Light Trees this is also kind of not an issue. Distance lights, Local lights, and mesh lights all get combined together into the light tree instead of being treated separately. Although, due to the layout of the light tree, the first decision that’s made is “Should I sample a local/mesh light or a distant light?”. However, this is simply because the distant light can’t fit anywhere in the light tree other than right at the top, and the top of the light tree is the first decision made.

I may be mis-understanding what you’re implying here. But I think what you’re implying is that rays should be equally distributed between all directions/lights, otherwise when you start taking multiple samples, the render will end up with the wrong brightness because some lights get over sampled and others get under sampled, resulting in weird results when you combine samples.

This issue is already taken care off. There are PDFs (Probability Distribution Functions) in the code that automatically adjust the brightness of samples based on the probability of sampling a given direction and or light to ensure you end up with the correct brightness at the end.

So if a mesh light gets “over sampled” compared to other lights, it’s PDF will be different from other those lights, meaning it’s brightness gets scaled differently so you end up with the correct result in your renders.




That’s true, I don’t know how to achieve a volumetric light gradient with lamps either.

Cycles has a world “object”. It’s primary purpose is to be a sky dome.

You can access this section by opening a “Shader Editor” and in the tab beside the editor selector, change it from “Object” to “World”. And you will now be working with the World shader. Here’s a video showing how to use it:

Video

Also, if you shift over to using a world “object”, then I assume you probably won’t need to use the point light any more to represent the sun. Instead you could use a sun light.


Notes: About world shaders and sun lights. If you have an active volumetric scatter or absorption shader in your world shader, then the world shader and sun light will have no impact on the scene.

This is because those light types are treated as being “infinity far away”, and Cycles assumes the active volumetric shader is “infinitely thick” and so there is no possibility for the distant lights to reach it.

Here’s an example of a shader setup with a background shader and volumetric shader on the “world” that would cause this sort of “issue”.

Avoiding mesh lights where possible is a good idea. But in some cases you will probably still need to use mesh lights. For example:

  1. If you want a light to be visible to the camera and you’re still using Blender 2.93, then you will have to use a mesh light.
  2. If you want to create a light with a weird shape, a mesh light is probably how you would do it.
  3. If you want to use modifiers on a light to do things like “array” the light. Then mesh lights are your primary option. It’s hard working with normal lights and modifiers.
  4. If you want your light to have motion blur, you will need to use a mesh light.
  5. etc

Or if you are using Path Tracing, no light trees, you can selectively use mesh lights or local lights to increase “sampling priority” by abusing the system described here:

3 Likes

That it basic. I know “Shader → World”…but it is represented by “infinite ball inside”…and you cannot fit easily horizon to be aligned with surface of the sea, while moving camera. That is why my sky dome is large but finite.

And, yes, I use volumetric absorbing sea. Not, for the Word absorption, thou.

I remember I had issues using “sun lamp”…but I dont recall all issues exactly…thats why I use point ball lamp for the Sun.

I would very gladly speak about probabilities and other stuff but I think we have already saturated this topics, and are being off topic. Topic conclusion is “want BPT => use Version<=v293”…coz BPT is not going back soon, or never.

P.S. Server banned me for 54 or so hours…like…“New user cannot post so much…blah blah”… and cant type freely here anymore coz some site technical reasons/rules.

So, Alaska, and for others, thank you very much for your help! You gave me lot to think!
C U!

2 Likes