How to create reference renders to compare with a real time PBR shader

Started by
6 comments, last by Lewy 4 years, 3 months ago

Over one the three.js repo, we frequently get questions like this one: Too dark edges due to new IBL multi-scattering approach.

In short, there's a person saying that the latest updates to our PBR shader have resulted in too dark edges:

Compared to the previous version from a few months ago:

Maybe they are correct - but it's pretty hard to decide when looking at a disembodied white sphere.
Next in that post they link to a similar scene from BabylonJS. Well, that's just going in circles.

I want to figure out a way of creating reference renders that we can compare these screenshots against. I use 3DS Max and I figure Arnold will be a good comparison target.

However, I don't have the knowledge to create renders with Arnold that I can confidently say are “correct” when compared to the three.js version. I have a fairly good knowledge of max, but not the rendering side of it - I usually just use the renderer for baking AO and shadow maps.

Given a HDR environment map, say the one in the above scene, how would I go about creating a render of a simple white sphere to compare with the three.js scene? (note: in this post I'm talking about a scene lit exclusively with an environment map, no other lights).

I know how to add the environment map and get a clean render from Arnold. What I don't know is:

1. what setting I should use for the Arnold standard surface to make a valid comparison against the three.js MeshStandardMaterial.
2. what setting I should use for tonemapping, both in three.js and Max (maybe just disable tone-mapping)?
3. how to make sure the render is correctly saved in sRGB from max. The save PNG dialog box in max is a bit confusing and just mentions gamma, not sRGB. Of course, I can disable sRGB in three.js and just use a simple gamma 2.2 there.

(author of Discover three.js)

Advertisement

Arnold is a good renderer, but unfortunately I don't have any experience with using it. In the past I've used Mitsuba as a reference renderer, and that's worked pretty well for me. I wrote up some quick instructions on how to set up a Mitsuba scene (including how to to use an environment map as a lighting source) here: https://therealmjp.github.io/posts/mitsuba-quick-start-guide/

@mjp nice write up, thank you.

Learning Mitsuba would add a considerable chunk of time to producing the renders for me, and I'm not really into the idea of setting up scenes by hand editing XML. I want to be able to move beyond simple spheres and boxes at some point and compare more complex scenes.

On the other hand, it would be nice to use a GPL licensed renderer as our ground truth. I'm gonna continue using Arnold for now but I'll look into Mitsuba later when I have some spare time.

(author of Discover three.js)

Sorry - Text editor is so buggy it's hard to reply.

Try again… I did not want to integrate Mitsuba either, so wrote my own Pathtracer. This worked well for Lambert diffuse which i needed. For fun i also added PBR shading, but becomes pretty complex and i'm not sure results are correct. That said i think it's much less work to go with Mitsuba. Just to share my experience here (unfortunately proofing correctness is some work…)

I did not want to integrate Mitsuba either, so wrote my own Pathtracer.

Text editor is so buggy it's hard to reply.

Yeah, what's up with that? It's really hard work to post here. My backspace key/delete/copy/paste don't work. Is it always like this?

(author of Discover three.js)

JoeJ said:
I did not want to integrate Mitsuba either, so wrote my own Pathtracer.

Well, if we are talking about reducing the amount of work then I already have a solution - use Arnold.

(author of Discover three.js)

This topic is closed to new replies.

Advertisement