Blender 4.x Cycles Photorealism Improvements...still not quite there for me

As i said somewhere above: i see a difference but sometimes can’t say which alternative looks “better” and also wonder if this could be approximated with compositing rather then some renderer features.
Because i could not tell if this is some contrast thing.. or brightness dependend contrast or color shifting or whatever technical term i never heard of ( :sweat_smile: ) :

I would love to know if anyone who is more skilled in “colorgrading” than me knows some composition magic to make one of this images look a bit more like the other.

..maybe this even gives some “insights” about when a rendered image does look realistic irrespective of the used physical models or mathematical algorithms ???

Also because this may does depend on the

of the whole thing ??? :wink:

Like in general: mostly there are more than one reason because something is like it is..

Of course it would be nice to be able to say XYZ just does it correct.. maybe inclusive “color-management” :stuck_out_tongue_closed_eyes: and when it also would be open source.. than we would be in paradise ?? :question: .. or.. heaven :thinking:   ..so maybe already dead ??
2 Likes

Not sure why you think something weird is going on. That’s most likely simply the lack of mipmaps.

Thankfully, the developers are well aware of this:

Unfortunately, the task most likely didn’t become easier within the 5 years since it was posted, as there now quite a few more supported devices.

1 Like

Both renders don’t have textures mapped the same way

While talking about mipmaps…
Today I played around with some larger (21.600 x 21.600) earth textures from NASA and Houdini / Mantra (because I don’t have any other renderer available that makes use of tiled / mipmapped textures like Arnold, V-Ray, Renderman, …)

The aim was not realism or anything beautiful at all. It was just to get a feel for the difference between raw unfiltered textures and properly tiled and mipmapped ones in terms of quality, speed and memory consumption.

So here’s a quick peek at a first “result”. It’s basically a sphere with a 21.6k earth surface texture as a bump map and a slightly larger second sphere with a 21.6k cloud texture as opacity and bump. As I said: Nothing too fancy but even with this simple setup you can see that tiles / mipmaps have nothing but advantages and will help Cycles a lot:

First a version with clouds:
On the left the original non-mipmapped, un-tiled JPEG textures (Render time 3:20min, 2.06GB RAM used)
On the right the mipmapped and tiled TX-textures (Render time 1:16min, 750MB RAM)


And here the naked earth, same setup:
left 46 seconds, 1.34GB RAM
right 26 seconds, 550MB RAM


Even with just 2 textures the difference in speed (especially the time-to-first-pixel is another ballpark that makes a huge difference while setting up and lighting a scene) and memory consumption of this simple example gives an indication where you would be heading when it comes to hundreds of textures all at 4k+.
And then look at the “shape” of the bumps. The unfiltered one just looks dull and velvety where all the fine details more or less resemble noise while the mipmapped version shows mountain slopes etc.
By the way, this is just an albedo map of earth that I abused as a bump, so don’t expect too much here.
When you imagine rendering an animation with the unfiltered version you can expect a noisy mess instead of detail, so you would need to increase the samples to an insane number or manually scale down the textures from 21.6k to say 4k depending on your output resolution. Yes, there is such a thing as “too large texture resolution” that makes you images worse instead of adding extra detail. Mipmapping automatically takes care of that.
Oh, and if you need sharper details with mipmapping you can of course offset the mip-level to force the renderer to use a more detailed mip-level.

Now imagine what this would do to the bumps of the wood, fabric, stone, etc textures in a rendering instead of an abstract red plastic earth :wink:
I just wanted to post it here to give a glimpse of how much of a visual difference it makes even with bump maps.

P.S.: I rendered on an older laptop and Mantra is CPU only and not the fastest render engine on earth :wink:

P.P.S.: I also tried to compile the latest Tangent fork of Blender from 3 years ago (https://github.com/tangent-opensource/blender ) because it offers Stefan Werner’s texture cache work but I failed because the libs from SVN don’t match the ones from back then any more. Would’ve been nice to give it a try as well.

16 Likes

Wow, this is really eye-opening. Thank you so much for doing this!

1 Like

Thanks for contributing with hard science. This is great ! hehe. To be clear, left is Cycles and right is Mantra?
The end effect looks to me like an increase in bump strength. It’s uncanny that this is the outcome of mipmapping. What I mean :

I am stuck on this. Consider : given an image and the same image in -say- 1/4th definition. Randomly sampling both over a period of time should ultimately converge on the same average value.

I am unable to explain this difference, are you sure it’s not some setting between renderers you forgot to account for?

Afaik the only thing that should differ is how much each pixel blends into the next. I’ve mentioned it before, it is controlled by the filter size, and a bigger filter size means a more blurry image. That’s Cycles firing samples a little off to the side.

There’s also the texture filter that should match. The one on the texture node itself. (I’m just trying to iron out possible differences)

Also make sure the texture isn’t color-managed because with AgX it would drastically decrease the values, hence the intensity of the bump. I feel this is worthy of note because you said the height map was derived from color data, so I suspect the image texture node might be color-managed

2 Likes

You are correct. The scale is same but offset is different.
But are you implying that this difference could be due to viewing different parts of the texture?
I hope you are not serious…

It is a different spread of light in diffuse surface some scenes will have more contrast some others less, others will change a very bit, all will depend in the amount of very rough surfaces you have in your project. here are some examples.

In this kitchen the oren nayar version is this.

and this is the non oren nayar version.

the next are other scenes I tested with oren nayar.
oren nayar.

non oren nayar.

Oren nayar.

Non oren nayar.

Maybe you will think there’s no so much difference, but all those scenes are made without knowing about oren nayar and how diffuse work in others renderers, so I made all materials to look well using lambertian, maybe making a scene from scratch using oren nayar will show better it’s benefits.

but in general what we can find is that oren nayar change how the light it’s spreaded in a scene, and in almost all scenes gives a more deeper light fallof, you can see how lambertian make the light look like it’s very linear while oren nayar make it look like it’s less linear and more soft, also in some scenes you gain more light info like the first kitchen example.

13 Likes

Sorry for not making it clear enough:
both sides are Mantra. The only difference is that the renderings on the left use the original JPEG, the ones on the right use the tiled and mipmapped version of the original JPEG textures converted to TX with maketx.

2 Likes

I wasn’t sold on Oren-Nayar until I saw this. This could be a photograph, at least as far as surface response is concerned. On the other hand the Lambert render seems immediately off, too bright.

Oh wow. So how does that work??

2 Likes

Yes, that’s my understanding too. However, if you use very high resolution textures, where one rendered pixel is sampled from a large area of the texture, you need many sample steps to get an average. On the other hand, if the texture was already scaled down, it converges a lot faster, because you are sampling from a decently sized average directly.

2 Likes

Hmm to me the original on the left looks more unprocessed.The right looks like increased or altered bump.Does Is it look really better or does it something to the render?
Would be nice to see more examples to see what exactly happens.

I believe this could be a key reason why the bump node has the distance input in addition to the normal strength input (because the way gradients are handled changes significantly when it is decreased from 1 to say, 0.1).

Outside of that though, the other notable thing is that for noisy textures, it might help to change the filtering from linear to cubic. Overall, though, the reluctance to optimize texture handling with mipmapping appears to be yet another one of those puzzling decisions that can only be found in a FOSS environment.

Yes. So the difference should tend to zero over a large enough number of samples, right? I don’t think that’s what’s going on in @SteffenD 's pictures…

Thanks for sharing comparison.
As form me with ON shadows are more contrast and as a result image looks deeper.

1 Like

I think so.

I am not confident about what exactly is happening. But my initial guess would still be that this is happening, because the texture is very large. Let’s assume that each pixel is sampled from roughly 5x5 pixels. To get a good average, we likely need at least 10-15 samples, just for the texture. If we want to get the details, we likely need at least 50 or more, because it is not sampled evenly over all pixels. However, when rendering, this is directly combined with light computations. And when we account for that, we likely have to multiply the 50 samples by some factor which accounts for the complexity of the lighting situation. If we have high frequency bump or normal maps, this factor likely needs to be quite high.
Please take all that with a grain of salt or more, because those are estimations and even though I might be close, there might also be flaws in my assumptions, making this whole argument pointless.

2 Likes

Also is there a problem in Cycles with Sun and shading for cylindrical smooth surfaces? This happens:
VVu

Harsh line instead of smooth shading of the curved surface. I am using Blender 4.0.

That might be caused by the shadow terminator problem where, right at the edge of the shadow, some polygons become self shadowing. I’m not sure about Cycles, but Octane has a check box you can set to fix those errors, otherwise you will need to add more geometry to fix it.

1 Like

Thanks for the help. I did try to add more geometry, which faded the harsh line away to some degree but it comes back once you add a bump or displacement map to the vector slot.

Luxcore doesn’t have this issue at all. I am thinking of maybe giving Luxcore another go. Problem is the renderer is no longer in development by the original dev and it was recently updated to 4.0 by a very generous person here: @odil24 . I am wondering if Ton might consider adopting Luxcore as one of Blender’s official renderers. It has everything and is on par with corona renderer and Vray which is heavily used in the industry. It just needs light linking, world material nodes and udim support.

Maybe Luxcore might push Blender towards more use in professional settings (its getting there) which in turn will bring in even more donations for Blender’s development. Maybe he can reach out to the dev and see if he can be recruited to continue development of luxcore for Blender?

It’s just a suggestion and I doubt this would happen tbh. Cycles always has some sort of technical problem here and there. Like that shading issue with normal/bump maps I posted earlier on this thread.

I am not in any way suggesting Cycles should be discontinued btw.

3 Likes

This is a limitation of pathtracers, and a consequence of modeling reality with polygons. Cycles works around it, but the user has to tweak settings by hand… perhaps Luxcore uses a different method

3 Likes