Search Unity

Reflect 2.0 questions

Discussion in 'Unity Reflect' started by unity_aica01, Apr 5, 2021.

  1. unity_aica01

    unity_aica01

    Joined:
    May 19, 2020
    Posts:
    86
    Hi!
    Im wondering if the Unity Team is abled to do a little webinar explaining the new reflect structure. I would like to know where the viewer is getting the metadata from the models. (Can I assign the reflect root to access the bim data as the older viewer? or is it using another method to get them?)
    Also, it will be nice if you can tell how the camera is moving when screen mode. I had deactivated the Login and selec project canvas because I only want to build an executable with just one model in the build and be able to explore it and watch all the info related to it. But the problems start when I try to move in the scene, the toggles of the controls are activated but not the functions the call.

    In conclussion a little resume of the reflect functionallity and structure will be awesome to help us understanding the behaviours and process that takes reflect to do its things.
     
    quintus_smit likes this.
  2. unity_aica01

    unity_aica01

    Joined:
    May 19, 2020
    Posts:
    86
    Okey... After a week looking for information I found out how does the reflect API works to stream the model into the viewer. Also, I know that the model is streamed into the Root (So now I dont understand the use of the PlacementRoot and neither the Bounding Box root (itss seem not doing anything)). But my main question its the same, how can I cutomize my model and set it into the scene (like we can do in the previous viewer). Should I write a new node in wich I store my custom model and then reflect would be able to stream it like any other project?
     
  3. GSingland

    GSingland

    Unity Technologies

    Joined:
    Dec 10, 2020
    Posts:
    14
    Hi @unity_aica01 !

    I'm not sure I followed what you meant by "customize my model" ? Am I right in assuming it means you want to force the viewer to fetch & display only a specific project that you own ?

    If so, then at the time, the way to go would be to use the StreamingAssets folder + custom ISyncModelProvider implementation (as mentioned in NEW REFLECT VIEWER BUG).

    Here are my suggestions regarding what you'd actually need to do :
    • First download the cached data of the model you're interested in. If you've already published it to Reflect, you can get the data files through the Reflect Editor Window (in Unity, go to Window/Reflect/Reflect Window) ; this window allows you to import a project directly into your Assets folder.
    • Then you'd want to move these assets into the StreamingAssets folder (that you would create for the occasion). By doing this, you are forcing Unity to store the assets directly in the target device's filesystem, instead of concatenating them raw into the app, which is going to help for the next step.
    • Finally you can create your own implementation of ISyncModelProvider, an implementation that would pick the data out of the cached data (those in the StreamingAssets folder) instead of fetching them from the sync server. You can then replace the ReflectClient (used in ViewerReflectPipeline component) with your own implementation.
    I hope my answer is useful !
     
    unity_aica01 likes this.
  4. unity_aica01

    unity_aica01

    Joined:
    May 19, 2020
    Posts:
    86
    Hi @GSingland
    Your reply was awesome thank you so much! I have been reading all the documentation related to it and i think i understood the main cancepts, workflow and structure.
    Your explanation of the procces was very helpful was like the last piece of my puzzle.
    What I meant with "customize my model" its just to get one project models and replace its materials for ones that look more realistic for some reviews and presentatios to our clients so they could have a more close-to-real world experience while cheking the project.
    Again thank you so much for your explanation. Was very helpfull!!
     
  5. unity_aica01

    unity_aica01

    Joined:
    May 19, 2020
    Posts:
    86
    Hey @GSingland !
    Hope you are right and had a nice summer!
    I recently came back to the reflect viewer (like a few weeks ago) I am using the samples to see how does the pipeline works, by now what I have understood is that if I want to make my own application based on reflect I should write my own pipeline with my own nodes to controll everything its right.
    What I havent accomplished to do its to set the streaming assetes folder as we talked last time, also I keep not seeing how its the pipeline getting the proyect to stream it (I am reading all the documentation and reviewing all the scripts to figure it out but its pretty complicated.
    What scripts should I see to learn this part of the pipeline?
    Thank you!