Microstation to Unity

Hello everyone,

I am cirrently in my final year of study and have to study virtual reality. For this, I have export my model (Microstation) to import it into Unity. SO I created an fbx file. However, it is divided into x groups depending on the number of layers present in Microstation. Basically, in Microstation, I have a multitude of elements in the same layer and wouls like to keep this structure in Unity. Nowadays, I have all the objects of the same layer that are grouped together and I can't separate them. The goal is then to apply a database to each of the elements, so if they are grouped together, it won't work. 

I tried with Blender but it doesn't happent automatically and it will take too long to do it one by one, knowing that there are up to 500 of them.

If you have any ideas for help, don't hesitate !

Thank you, Lauralee

Parents
  • Hello Lauralee,

    For the past few years I’ve had great success with my “Microstation > FBX > Unity > VR” workflow. For me this has become a crucial feature going forward and I hope to see Bentley devoting more and more resources to embracing third party packages like Unity and Unreal. Be that through ever improving FBX exports, to supporting new export standards such as glTF, and supporting translation software such as PiXYZ for Unity and Datasmith for Unreal. I don’t think Bentley can afford to fall behind with this sort of initiative.

    Having said all that, I’m not sure if I fully understand your problem with Layers. When I export my geometry, the FBX file contains meshes based on the Materials that I have assigned inside MicroStation. I assign my materials based on element Layer & Colour combinations which means that I can have different materials assigned to geometry that is on the same Layer and the meshes will be separate once imported into Unity. How are you assigning materials to your geometry inside MicroStation?

    For instance, it is true that if you have the same concrete bollard copied many times throughout your model, then all of those bollards will become one single mesh inside Unity. Is this what you are trying to avoid? If it is then you may have to change your approach and export your model geometry differently. In this case you might need to export a single instance of the concrete bollard as a separate FBX file, import that into Unity and then populate your scene with that concrete bollard manually inside the Unity editor.

    As an aside, I am no Unity expert but as I’ve developed my VR workflow I’ve written up a handy tutorial that goes through the steps needed to create an interactive VR environment. My workflow uses a VR toolkit called “VRTK v3.3” which is getting a little old at this point but it works really well :-) VRTK v4.0 is in development but the documentation is lacking and I’m not knowledgeable enough to work through the issues myself.

    If you are interested in my VRTK v3.3 workflow, I’ve attached a PDF that goes through the steps in a very systematic way.


    Cheers,
    Andrew Novinc.

    Answer Verified By: LO-SURV 

  • Hello Andrew,

    Thank you very much for your answer.

    I did read your Microstation to Unity to VR workflow. It will be useful when I solve my FBX file problem.

    My problem is exactly what you're pointing out in paragraph 3. For my FBX file, all the elements of the same layer have the same materials. So that's why they're grouped together when they're exported, if I understand what you're saying. So I'm going to try to have several different materials in the same layer and let you know the result. How do we export as we go along, as you point out to me, in case differentiating the materials does'nt work?

    I also tried to use the PiXYZ to Unity plugin but it's the same thing so I think the problem comes from the FBX export. I managed to get separate objects with the . u3d format, however, they lose the credentials I had in Microstation which annoys me to then attach a database.

    I'm going to read carefully the workflow that you gave me, it will perhaps allow me to advance in my subject.

    Best Regards,

    Lauralee


  • Indeed, I applied a different material for an object in Microstation and after the export, it is "alone" in Unity. Knowing that I have about 500 parts per file, do you know a method to apply independent hardware to each one?

    Looking forward to reading you,

    Lauralee Orain

  • Hi Lauralee, before we troubleshoot any further I’m curious about what you are trying to do with your geometry inside Unity. In my example of the concrete bollards, why would it be all that bad that all of the identical bollards are combined into the same mesh? For the most part this wouldn’t be an issue for my Unity projects, the one exception being that sometimes it would be nice to have different “Reflection Probes” affect meshes on a more granular level and that isn’t possible if you are dealing with one big mesh.

    > For my FBX file, all the elements of the same layer have the same materials. So that's why they're grouped together when they're exported

    That sounds correct. Exported meshes are based on the unique materials that you are using inside MicroStation. If you are saying that you have 3D objects on the same Layer but require different materials then it is up to you to create those materials and correctly assign them to your 3D objects. There are different ways of assigning a material to geometry but I prefer to use the element “Layer + Color” combination method.

    > How do we export as we go along, as you point out to me

    I’m not sure what you mean by this. From my concrete bollard example, are you asking how to export a single instance of the concrete bollard?

    > Knowing that I have about 500 parts per file, do you know a method to apply independent hardware to each one?

    What do you mean by “apply independent hardware”? Are you saying that each of the 500 parts is made up of a different real world material? If so, then you will need to create 500 unique materials inside MicroStation and assign them to your geometry in whatever way works for you. If your 500 parts are actually made of the same material then you should only create one material. At this point I go back to my first question and ask why do you need those parts to be separate meshes inside Unity, why is that important? If you need 500 separate parts all with the same material, you may need to create 500 separate FBX files and then go from there.


    HTH,
    Andrew Novinc.

    Answer Verified By: LO-SURV 

  • Hi Andrew,

    Thank you very much for your answer.

    > I’m curious about what you are trying to do with your geometry inside Unity.

    What I want to do with my geometry in Unity would be to associate a database with the model. For the record, the model is a gas station. Thus, all the parts are not necessarily identical, the pipes do not necessarily have the same diameter, etc. . . I then want that when I have virtual reality, if the user is placed on an object, he can have all the components of the object. That's why (it seems to me) I would need separate geometry in Unity to assign the right information to each element. I don't know if everything I'm saying is clear. . . On the other hand, I don't want the process to take too long and I want it to be as automated as possible. This work is in progress but it will be reused for each gas substation we model.

    > Are you saying that each of the 500 parts is made up of a different real world material?

    No, a lot of parts are actually made of the same material.

    > If you need 500 separate parts all with the same material, you may need to create 500 separate FBX files and then go from there.

    How do I export part by part in Microstation?

    At the same time, I want Microstation to export all the part names I have used (if possible in the FBX, otherwise in a text file). Do you know a way to do that?

    Best Regards,

    Lauralee Orain

  • Hi Lauralee,

    > I want MicroStation to export all the part names I have used (if possible in the FBX, otherwise in a text file). Do you know a way to do that?

    No I don’t. I don’t have much experience with databases. I think someone from Bentley might have to help you with that. Out of curiosity, where are you setting these part names in MicroStation? Are you using MicroStation or Bentley’s BIM software solution? If it is BIM, are the part names derived from the Part templates? I haven't had much to do with the BIM side of things so I can’t really help with that.

    All in all though, it seems to me that this would be an ideal candidate for PiXYZ integration but unfortunately they don’t support the DGN file format and it doesn’t look like Bentley are likely to take the initiative to get the ball rolling with the PiXYZ developers :-(

    > How do I export part by part in MicroStation?

    Hmm… The short answer is that I don’t know how your project is structured and it might end up being impractical to try and create 500 FBX files.

    For my projects, they are always split up into as many logical units as possible. This means that a 3D project is typically made up of many logical DGN files, each containing many logical Model Spaces. To ensure consistent content in my FBX files and ensure quick and easy iteration of the design, I create an “Export” folder which contains many empty logically named DGN files. Each one of these DGN files References the bits of geometry that are relevant for it and it is these DGN files that I export to individual FBX files. This way I am sure to get consistent export results over the lifespan of a project and I get total control of what gets exported as individual meshes.

    If you are intending to export every pipe as an individual FBX file, I don’t think my approach is going to work for you and you are going to have to experiment with a different workflow. Ultimately though, you may need to create a unique material for all of your unique pipes and instead of assigning the materials by “Layer + Color” you could try attaching the materials to the geometry itself. I’m only speculating here, I don’t know enough about Unity or databases to be of much help in this case. Sorry about that :-(


    Cheers,
    Andrew Novinc.

    Answer Verified By: LO-SURV 

  • Hi Andrew,

    Thanks,

    I confess that I don't know how to associate my file and the database, I'm still looking for solutions that could help me. And I don't know if I could indicate properties to my objects even though they are associated with another. I know what I want in the end, but I don't know how to get there at all, so it's a bit of a blur, I'll tell you that.

    >All in all though, it seems to me that this would be an ideal candidate for PiXYZ integration but unfortunately they don’t support the DGN file format and it doesn’t look like Bentley are likely to take the initiative to get the ball rolling with the PiXYZ developers :-(

    I contacted them too. Indeed, it is not compatible with the base dgn file (damage). It's with their PiXYZ plugin that I managed to get all my elements one by one with the u3D format. I'm in contact with Bentley's service at the same time so I might be one more in a while.

    > Each one of these DGN files References the bits of geometry that are relevant for it and it is these DGN files that I export to individual FBX files.


    I don't know if there would be a way to do all the steps you do to export one by one with a tool like FME, to speed up the process.

    > For my projects, they are always split up into as many logical units as possible. This means that a 3D project is typically made up of many logical DGN files, each containing many logical Model Spaces.


    I'm going to see if it would be possible for us to consider this option

    > Sorry about that :-(

    Don't worry, you have already given me answers and explanations to my problems, which is already making me move forward and I thank you for that.

    Best Regards,

    Lauralee Orain

Reply
  • Hi Andrew,

    Thanks,

    I confess that I don't know how to associate my file and the database, I'm still looking for solutions that could help me. And I don't know if I could indicate properties to my objects even though they are associated with another. I know what I want in the end, but I don't know how to get there at all, so it's a bit of a blur, I'll tell you that.

    >All in all though, it seems to me that this would be an ideal candidate for PiXYZ integration but unfortunately they don’t support the DGN file format and it doesn’t look like Bentley are likely to take the initiative to get the ball rolling with the PiXYZ developers :-(

    I contacted them too. Indeed, it is not compatible with the base dgn file (damage). It's with their PiXYZ plugin that I managed to get all my elements one by one with the u3D format. I'm in contact with Bentley's service at the same time so I might be one more in a while.

    > Each one of these DGN files References the bits of geometry that are relevant for it and it is these DGN files that I export to individual FBX files.


    I don't know if there would be a way to do all the steps you do to export one by one with a tool like FME, to speed up the process.

    > For my projects, they are always split up into as many logical units as possible. This means that a 3D project is typically made up of many logical DGN files, each containing many logical Model Spaces.


    I'm going to see if it would be possible for us to consider this option

    > Sorry about that :-(

    Don't worry, you have already given me answers and explanations to my problems, which is already making me move forward and I thank you for that.

    Best Regards,

    Lauralee Orain

Children
No Data