I have been thinking about the best way of sampling the color temperature of the sun in the HDRI:
Sample the values in the HDRI directly, but as it is 32 bit float that needs to be tone mapped I’m note sure if this is the best way forward.
An indirect approach could be to set up a sample scene with a diffuse gray plane aligned towards the sun, then render the scene and probe the color of the plane. I believe this would work in theory, but is seems a bit complex to set up…
Hi Alex74,
1 - No. To avoid compromising the 32 bit depth of an HDRI, you must not use tone mapping but fusion exposure. You have simply to sample the center (circa) of your source light (Sun on outdoor HDRI, Studio lights for indoor scenes) and give the three RGB value (or HSV, HEX…) to the color of the 3D software light.
2 . To match the intensity, instead, you have to use False Colours pass (or display mode) to match the False colours of the original HDRI render with the False Colours of a rendered scene used 3D software lights (After you have removed from the HDRI the original lights such the Sun from an HDRI outodoor, or studio lights from an indoor HDRI).
(The False colours give as the levels of intensity of light (in EV) of the scene)
What I did was simply using your add to create a Sun, relocate it if needs, matching with the position of the original sun above all concerning shadows and reflections.
Then I use the Color picker to get the original sun color RGB values and gave them to the added sun.
Finally, I rendered both images, I saw them with the False color values to try to match the light intensity of the original HDRI sun with the virtual sun added with your plugin. This is the most physically accurate method I found the right position of the original HDRI sun, his color and his intensity.
I hope it helps.
I found your addon and made some changes to work in blender 4.0 and also some modifications to fit on what i was needing. I hope you don’t mind about.
to work in Blender4.0 i just changed the bpy.ops.hdrisa.calculate_sun_position(override, ‘INVOKE_DEFAULT’) line in HDRISA_OT_dummy to bpy.ops.hdrisa.calculate_sun_position(‘INVOKE_DEFAULT’) only.
Only removed the override, until now looks to work so far haha. also changed the layout of the panel and made the Sun Energy 5.0 and the alignment automatic when it is created. Also made the Search for the Environment texture to loop in the Node Tree and Node Groups to fit on my personal World Texture Group. Thanks for this amazing addon!
It can be soften by increasing the Angle on Sun Lamp property. To soften it Direct on the HDRI image maybe you can try to blur the image, i have never tried it before but i think it can work. But i think only change the sun lamp property will solve your problem
Hi @Robert_Kezives, thanks for looking into my code and sorry for the late reply from my side I tested the addon in Blender 4.0 (using the latest code from GitHub, download ZIP “hdri-sun-aligner-master.zip”) and it worked without errors.
Then I looked at my previous commits realized that I have forgot make a new release after the latest updates. One example is that “HDRISA_OT_dummy” was removed, but it’s still included in the 1.5 release.
Would you mind have a quick test of the latest version (Code → Download ZIP) to verify it works for you as well? I can then make a release version bump to 1.6 to sort out the confusion.
oh, I did not noticed that when i first try your code!! I went straight to the release tab.
I did the test and the Master version is working perfectly, all the features!
I think you can make the new release for it, will help people without attention as me lol, i still confused on github website.