Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would it be possible to add AgX to the Tonemapping options? #555

Closed
kitaedesigns opened this issue Nov 28, 2023 · 12 comments
Closed

Would it be possible to add AgX to the Tonemapping options? #555

kitaedesigns opened this issue Nov 28, 2023 · 12 comments
Labels
feature request New feature request

Comments

@kitaedesigns
Copy link

kitaedesigns commented Nov 28, 2023

Now that Blender 4.0 has switched to AGX being the default Tonemapping mode, does it make sense to add to add here as well so that assets look as similar as possible?

See more about AgX here.
https://github.com/EaryChow/AgX

@kitaedesigns kitaedesigns added the feature request New feature request label Nov 28, 2023
@kitaedesigns kitaedesigns changed the title Would it be possible to add AGX to the Tonemapping options? Would it be possible to add AgX to the Tonemapping options? Nov 28, 2023
@vanruesc
Copy link
Member

vanruesc commented Dec 2, 2023

Yes, support for AgX would be good, but I think we should wait until it's implemented in three. Then it should be possible to tap into that logic instead of implementing it twice.

Related dicussion: mrdoob/three.js#26479 (comment)

@kitaedesigns
Copy link
Author

Ok thanks!

@VanderSP
Copy link

VanderSP commented Dec 23, 2023

I started using three AgX today! and I also plan to use this POSTFX MIXER!!!!!!!!

@vanruesc
Copy link
Member

Added ToneMappingMode.AGX in [email protected].

@kitaedesigns
Copy link
Author

Hey @vanruesc thank you for adding AgX! This was a great addition. I'm testing using a baked lighting model between Blender AgX and threejs's and pmndr's AgX using the same HDR to light the scene at an intensity of 1, and no lights in the scene but still noticing some differences in color, namely the threejs version seems to be more washed out. Is this just a difference of how AgX is implemented in WebGL vs OpenGL?

image

@VanderSP
Copy link

VanderSP commented Jan 6, 2024

Hey, AGX is not just agx... theres punchy, golden, idk many presets of something... threejs implemented agx but still thinking about the presets... maybe this is the issue, i think it deals with some kind of contrast... still so new... i leave my blender in PUNCHY lol

@vanruesc
Copy link
Member

vanruesc commented Jan 6, 2024

@kitaedesigns Please try comparing results with vanilla three first. Three's physically-based lighting model is not exactly the same as the one Blender uses so some differences are to be expected.

@VanderSP I think it's safe to assume that @kitaedesigns used the default AgX preset in Blender. Results would obviously differ if that wasn't the case.

@kitaedesigns
Copy link
Author

Hi @vanruesc, yes here is a comparison with threejs and blender's AgX. Blender on the Left. Threejs on the Right. Using the exact same asset and cubemap.

Blender AgX with Exposure at 0 vs Threejs AgX with Exposure at 1.
image

image

If I manually adjust each one's exposure I can get them quite close but I think the expectation would be that Exposure of 1 with AgX tonemapping in Threejs should be the same as Exposure 0 AgX tonemapping in Blender.

image

@vanruesc
Copy link
Member

vanruesc commented Jan 6, 2024

Thanks, I think three's output looks more pale in comparison, but it's hard to tell with this model and a blurred background. A comparison of your original scene from this comment would be useful.

My current guess is that the visual differences between Blender and three are not caused by postprocessing and are therefore out the scope for this project. In that case, it might be worth a shot to create a forum post over at three to discuss this as a potential issue.

@kitaedesigns
Copy link
Author

Ok I will crosspost in the AgX thread here mrdoob/three.js#27362

Here are the assets.

GLB
https://1drv.ms/u/s!AksR0p9ftT9Yjilvft0H-B_IUNun?e=ttLJdA

HDR (this is the blender default)
https://1drv.ms/u/s!AksR0p9ftT9Yjiy5yFGQuDXIsuKo?e=wBMQgz

@VanderSP
Copy link

VanderSP commented Jan 8, 2024

Ah now i see... when comparing to threejs, we are on NONE/BASE... how do you are keeping it more constrasty? epxosure value? or envmapIntensity?

I did a test right now... looks like toneMappingExposure between 0.25 ~ 0.5 make it contrastier!
Edit 2: it´s not more contrastier as it loses highlights... sorry being boring with this.. its too new :D
Edit 3: Im liking to put 0.5 ~ 0.75 on toneMappingExposure and 0.75 ~ 4 on envMapIntensity depending of material

@kitaedesigns
Copy link
Author

So far I've just been adjusting the exposure to match them as best I can but there seem to be some fundamental color difference. Apparently this is due to how exposure is calculated in Blender vs Threejs being totally different. mrdoob/three.js#27362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

3 participants