The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Casting light from virtual light source onto real world objects
I have a model of a light source which can emit red color light. I will have to show using Hololens how the real world gets lit using this light source and how the light spread looks in the real world. Can anyone suggest a way to do it?
Best Answer
-
Optionsstepan_stulov ✭✭✭
Hey, @Holo_gal
@Vrati, checking that checkbox won't make spatial mapping renderer react to light. the default material is simply a wireframe or occlusion.
I believe achieving realism in this case is hard if not impossible. It is true that you can make the spatial mapping renderer receive light and shadows if an appropriate shader is used. However, shadows are darkening of the surface, and hololens cannot make anything darker than it already is. Also, due to spatial mapping low detail nature and additive rendering technique of HoloLens, this won't, I believe, look like a lit room. It will look like some glow-y low-poly coating on top of an otherwise unlit room.
Perhaps some very limited use cases like lighting up simple geometry without too many hidden cracks could be achieved. Perhaps this can get you make ideas:
https://www.andreasjakl.com/how-to-add-negative-shadows-to-a-hololens-scene/
Building the future of holographic navigation. We're hiring.
5
Answers
You can use Spatial Mapping prefab from Holotoolkit. The mesh so created can have appropriate material as per your room. Check the draw-visual-meshes checkbox.
@vrati: The requirement is slightly different here. I have a 3D model of a light source (an incandescent bulb). I need to show how the real world room gets lit up when the virtual bulb is switched on.
Place your light source in the room and it should show its effect on spatial mapping created.
Hey, @Holo_gal
@Vrati, checking that checkbox won't make spatial mapping renderer react to light. the default material is simply a wireframe or occlusion.
I believe achieving realism in this case is hard if not impossible. It is true that you can make the spatial mapping renderer receive light and shadows if an appropriate shader is used. However, shadows are darkening of the surface, and hololens cannot make anything darker than it already is. Also, due to spatial mapping low detail nature and additive rendering technique of HoloLens, this won't, I believe, look like a lit room. It will look like some glow-y low-poly coating on top of an otherwise unlit room.
Perhaps some very limited use cases like lighting up simple geometry without too many hidden cracks could be achieved. Perhaps this can get you make ideas:
https://www.andreasjakl.com/how-to-add-negative-shadows-to-a-hololens-scene/
Building the future of holographic navigation. We're hiring.
Bart
http://trzy.org