Forum Discussion

senthilvelGS's avatar
senthilvelGS
Copper Contributor
Jul 12, 2021

HELP: Hololens2 apply camera capture texture for Spatial Mesh

I successfully saved and displayed the spatial mesh after scene understanding room scanning process. Now I am struggling about how to apply hololens camera live texture to mesh. Any Solution?

    • senthilvelGS's avatar
      senthilvelGS
      Copper Contributor

      Thank you for your reply. My use case is display the current Room with real color texture at runtime in front of the hololens camera. It is like a 3D minimap. I am using unity3d(2019.4.23 version) with c#. I have imported the scene understanding plugin for Room scanning. Room scanning and displayed the room mesh functionalities are completed. Now I want apply the real world room texture to the displayed mesh.

      I have attached my sample output.

       

       

      • daniel_camara's avatar
        daniel_camara
        Copper Contributor
        Hi I am interested in the same thing :), I also just managed to get the scene on .obj and would like to have the texture from the camera over the object, even if in post processing it wouldn't be a problem for me. Did you manage to advance over this problem?

        By the way, I guess the code used on the paper mentioned on the other post can be found at https://github.com/samueldong-us/Realtime-Hololens-Retexturing.
  • Epic-Max's avatar
    Epic-Max
    Copper Contributor
    I'm looking into the same topic. Is there a way to work together on this subject?
    As far as I know by now, it's seams to be a very tricky subject. Some have solved it but I cannot find out how they did it
    • senthilvelGS's avatar
      senthilvelGS
      Copper Contributor
      Hi,

      I searched the holo texture functions in github. Someone developer has successfully completed.

      check the link:
      https://github.com/tarukosu/HoloCameraTextureMapping

      It is a unity 5.6.7 version project and you can take the build without any error. It is properly working in hololens 1. But currently I am working with Hololens2 device. So I tried this project open with latest version(2019.4.4). But lot of errors coming, I could not solve the errors.

      Can you help me for the solution?
      • daniel_camara's avatar
        daniel_camara
        Copper Contributor

        senthilvelGS 

        A person that worked with me diged up on that code and managed to "convert" it to a newer version, supposedly compatible with Hololens 2. You can find a version over https://github.com/danielcamara/Holo2CameraTextureMapping.

         

        Unfortunately it does not work, it gives no compilation errors, but does not work. It can be a better starting point for someone that want to adapt it to Hololens 2.  My skils are shalow, I am not able to fix it... but maybe someone else is 🙂