As you can see the results are different that obviously HB annual result is not showing any impact from the mirror. I’m trying to understand why but found my self a bit lost in the recipe.
While debugging this, I’m hoping if we can see a list of radiance command from the recipe, as HBPlus did for the commands.bat. I think this should help us in debugging things if this could be added as some feature in the future.
Let me know if I could provide any detail information.
Also, when playing with the HBPlus annual daylight calc, I found the result got improved by the following modifications:
instead of using black material for the direct sky, using black for opaque material but keeping mirror materials. This will allow -dr 1 to work, thus we can remove the reflection from mirror for direct sky.
When doing the sunpath calc, use -dr 1 and keeping mirror material will take into account the direct reflection from mirror for sun.
With these two modification we should be able to remove direct sky and add back sunpath for the mirror material. Hope this make sense.
Not sure if this could be taken into account for new HB.
I think I know why this happens but we should get @mostapha and @mikkel 's thoughts here on the best way to address it.
I am pretty sure that this happens in LBT honeybee because the mirror material only works with the direct calculation but we set the -ab of the direct calculation in the LBT Honeybee recipes to be 0 under the hood. I think, if we were to set it to 1 or 2, you would see the effect of the mirror. I guess you can see the mirror effect in HB[+] because you can specify the radiance parameters of the direct calculation separately from the rest of the calculation.
Maybe we can just expose the direct-ab as an input on the annual recipes in the LBT plugin. What do you think, @mostapha and @mikkel ?
Thanks Chris for looking into this. However, I think instead of ab, it is the dr that making the difference for mirror material.
Also in addition to changing radiance parameters, I think we also need to include the mirror materials in direct sky and direct sun calculation, which is not currently. For direct sky, including mirror material will be able to subtract the direct contribution of sky patches via mirror direct reflection correctly. Then we can include the direct contribution of sun via mirror direct reflection by including mirror material. This is not done by either LBT or HB[+] but I think it is necessary for mirror material. Please correct me if I got this wrong.
You are correct that simply changing the -dr option within the direct calculation of annual-daylight or annual-irradiance enables you to correctly account for the mirror materials. So we basically just need to change the end of this line of code here if we want to model a mirror material like so:
… and then we can see the effect of the mirror in the annual results:
Granted, I can understand why the default calculation uses zero direct reflections since the calculation time can go way up if you have a lot of mirror geometries in your model or you are modeling a curved mirror material.
Still, I imagine that people expect to be able to use mirror materials in annual calculations and they really can’t right now. So I feel like the best solution is just to expose direct_reflections as an input on the recipe with a default of 0.
I think I will implement this on the annual-irradiance recipe now unless @mikkel or @mostapha have any objection.
Thank you. I tested that as well and see the same result as you had.
However, I do have a question that I thought the Direct Sun calculation will use a black scene (i.e. a scene with all material as black plastic), am I wrong here? I don’t understand if that is the case, as how direct sun calc can capture mirror reflection with a black scene that has no mirror material.
Thinking through this a little more, I think there isn’t a need for a new direct-reflection input but rather I just need to make it possible for the recipe to respect the input -dr from the input Radiance parameters. The line of code that I highlighted above means that -dr 0 was hard-coded into the recipe (without the ability to change it) and I can’t understand why it was set up this way since it clearly prevents the accurate simulation of mirror materials and changing it to a non-zero value yields results for mirror materials that make much more sense.
If I remove this hard-coded -dr 0 and just add it to the default input Radiance parameters, then the default recipe behavior can remain the same and people can still get fast simulations when there aren’t any mirror materials in the model. However, with this restriction removed, you can now actually change the -dr parameter to get results out for mirror materials that make sense. So this is what I just implemented right now:
You’ll be able to get the update on your end with the Versioner in an hour or so. Afterwards, you’ll be able to run annual simulations like the following, where mirrors end up concentrating the sunlight and which I know people have been asking for:
For your question about the black scene materials, these are not currently used in the direct calculation of Annual Irradiance or Annual Daylight in LBT. The recipe essentially uses the same octree that is used for the other calculations (it just adds in some modifiers for the direct sun positions). But I think @mikkel makes use of the black modifiers within the simulation of dynamic window groups that he just completed (so there’s still a point to having them). But they aren’t used for this purpose of direct sun calculation.
It has been some time and I don’t remember the implementation at the time and if we sense the mirror material when creating the black scene. You should be able to check that in the folder. If we are not taking care of it already, then we should fix this. @mikkel is more updated on the topic than I am.
I can confirm that mirror material was not respected in the .blk material. However, as Chris said both these two methods are not using black scene so it is not impacting these two recipes.
My understanding in HBPlus when using black scene for direct sky and direct sun calc was only to speed up the process. Now using full scene for these two calc are more accurate, as it takes out the reflection/diffusion of direct sky and add back reflection/diffusion. Happy to learn more about this. @mikkel
Avoid mirror-like materials which can generate reflection rays. See page 4 of 23. Section 3.2.
3.2 Dd–Direct daylight matrix
The direct daylight contribution matrix contains characterizes the amount of light from the sky that reaches the window without reflection. We can use -ab 0 even though we have a sky with glow material because we are using genklemsamp to send sample rays from the window into the scene.
While setting ambient bounces to zero avoids most inter-reflections, if a ray hits a surface with specularity greater than zero and roughness less than 0.002 a mirror reflection ray will be sent (even with -ab 0 and -st 1) that might then strike the sky.*
Avoid reflections while sampling the BSDF material. See page 7 of 23
We can’t simply use –ab 0 because in cases with a BSDF material we need to sample the BSDF material from all directions, which can only be done with ambient sample rays. We use –ab 1 to generate ambient samples, however, we don’t want ambient sampling to include reflected sunlight, so we need to use an all-black model.
Thanks for sharing the information. If I could share my thoughts here:
I believe the Dd method (3.2) you refer is widely used in all methods, 2 phase (DC) method, 3 phase and 5 phase, as it is trying to remove direct sun contribution from discretized sky and then add back sun. However, I think it only applies to typical opaque material as it is trying to avoid secularity reflection. When we are dealing with mirror like material, we should include those mirror material in the black scene.
If I’m right the Dc method is widely used in all methods, shall we used black scene instead of full scene as it is now, when doing direct calc for Annual Daylight and Annual Irradiation recipes? However we do need to include mirror materials in the black scenes.
The other reasons seems to only apply to BSDF materials and 3 and 5 phase methods. As the annual daylight and annual irradiance recipes are two-phase methods, it does not matter at the moment.