Home Technical Talk

How to Unwrap High Poly CAD model?

Hi everyone!

We are just developing a small Vive VR demo application that let's a user interactively explore a complex engine.

The poly count of the engine's CAD model, even with low import settings in our CAD importer, goes into the millions. Unity running on our highend workstation +  TitanX graphics card can handle that amount of polys surprisingly well and we get interactive frame rates.

We do however need to bake some maps for the engine (e.g. AO) or ideally handpaint some textures to increase the realism. Unfortunately, 3ds Max is hopelessly overchallenged with auto unwrapping (using "Flatten Mapping) even only parts of the engine that have a few hundred thousand polys. It takes ages and stalls Max for like 10-15 minutes at least.

At the moment, we don't have the time, nor the expertise to retopologize the complex shape and messy topolgy of the engine's CAD model in order to do a proper high-to-low-poly baking workflow.

So I am wondering if there are any UV Unwrapping tools which can do a decent auto unwrap of such heavy CAD geometry fast and fairly well with a minimal amount of user action required? Have any of you guys experience with a scenario like this and how did you go about getting a useable UV Layout with non-overlapping UVs? We are fine with getting a UV Layout that is quickly generated and good enough for baking lighting. Getting a UV Layout for handpainting maps is probably asking for too much.

Thank you very much for any help!


Replies

  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Not sure if it's much help but unwrap uvw in  max2017 is a lot better at handling dense meshes than anything previous.  

    But even so, as I'm sure you're aware, trying to unwrap something like this is going to be a nightmare in any package. Have you considered building a custom shader in Unity and using vertex paint in-engine? That way you could box map the model and paint between layers. Zbrush would also be very handy in this situation to open your optipns if any of your team have the knowhow.
  • ConSeannery
    Options
    Offline / Send Message
    musashidan, thanks for you help!

    The topology isn't even good and regular enough for vertex painting. Apart from that, we don't have anyone familiar with writing shaders in Unity. I seem to remember though that there was a vertex color based blend shader somewhere in the Asset Store. Anyhow, the first problem remains.

    Yes, we have someone who knows a bit of ZBrush. But he's skeptical as to whether ZBrush's UV Master would be any better.

    I will look into Max 2017 though!
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Zbrush UV master should work perfectly, and its fast.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Obscura said:
    Zbrush UV master should work perfectly, and its fast.
    Not necessarily on a multi-million mesh. But CAD models are relatively easy to polygroup based on angle threshold and  the option is there to Zremesh based off those polygroups. You could get the multi-mill down to a few hundred thousand and UV master from there based on those same polygroups.
  • ConSeannery
    Options
    Offline / Send Message
    I managed to get better results with Max 2016 now. For some reason it made a huge difference going from a Spacing of 0,002 to 0,001. The UV Layout looks much more coherent now without hundreds of tiny UV shells. Angle threshold was set to 45. Took about 5-8 min for a 1mio. part of the model. I baked an AO and it looks good enough on the mesh. Still pretty time consuming.

    ZBrush's UV Master hung itself up with that same mesh. The UI wasn't responding for 10min or so. I will have my colleague look into it again some time this week.

    Will test with Max 2017 now.

  • Eric Chadwick
    Options
    Offline / Send Message
    Have you looked at post process effects in Unity like screen-space ambient occlusion (ssao)? For complex cad models I prefer this over baked ao.

    There are a couple ssao solutions on the Asset Store, both a strong step up from the free included solution.

    You could also try baking the ao into vertex color, which is generally more performant. We have some info on our wiki about this.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range


    ZBrush's UV Master hung itself up with that same mesh. The UI wasn't responding for 10min or so. I will have my colleague look into it again some time this week.



    I thought as much. Unwrapping at that density is not advised. :)

    I'm pleasantly surprised that 2016 resolved it in 5min.  If that's the case then you should have a much easier time of it in 2017.
  • Hangs
    Options
    Offline / Send Message
    Hangs null
    Actually these CAD data are a real pain in the a**** if you need a decent unwrap or get them down to a more reasonable polycount. At the moment I try to avoid making unwraps as much as possible.
    I like the idea of baking the AO into the Verticies, maybe i will test this soon. Does anyone knows about the preformance hit on high dens meshes with vertex colors ?
    Maybe someone knows this, I sometimes get high dense triangulated CAD data which have quite good UVs. Is there any CAD programm which can make good UVs for these data ?
  • ConSeannery
    Options
    Offline / Send Message
    Have you looked at post process effects in Unity like screen-space ambient occlusion (ssao)? For complex cad models I prefer this over baked ao.

    There are a couple ssao solutions on the Asset Store, both a strong step up from the free included solution.

    You could also try baking the ao into vertex color, which is generally more performant. We have some info on our wiki about this.
    Eric, yes I had SSAO in mind, too. As you said, the Unity implementation is an ugly flickering mess, so I will look into the SSAO versions for sale on the Asset Store. In my experience though, SSAO is fairly expensive to calculate which could easily lead to non-interactive frame rates. What are your experiences performance-wise with the SSAO implementation on the Asset Store? Is the AO only applied to the indirect illumination part of a material in order to prevent that "dirty" look with AO that also influences direct illumination?

    Btw, that 5-8min. / 1mio polygon figure for unwrapping wasn't quite correct. The subpart I unwrapped actually only had about 350k polys and repeated tests with other objects of similar geometric complexity resulted in unwrapping times of at least 10min.

    Baking the AO into vertices is maybe not going to work very well with the topology of the CAD object. The distribution of polys/vertices tends to be quite irregular in some places. I will give it a try though if unwrapping fails to be a viable workflow.
  • ConSeannery
    Options
    Offline / Send Message


    ZBrush's UV Master hung itself up with that same mesh. The UI wasn't responding for 10min or so. I will have my colleague look into it again some time this week.



    I thought as much. Unwrapping at that density is not advised. :)

    I'm pleasantly surprised that 2016 resolved it in 5min.  If that's the case then you should have a much easier time of it in 2017.

    No, 2017 wasn't faster! :-(
  • bjornsyse
    Options
    Offline / Send Message
    bjornsyse null
    Hi, 

    We also run into this particular problem all the time. Having to drag heavy cad files into game environment and or/webGL and animation. What solution did you end up using?
Sign In or Register to comment.