Importing CAD Models into Cinema 4D: Using Zbrush to quickly retopologize and UV Map a CAD Model
Posted: 23 September 2022 03:09 PM   [ Ignore ]  
Total Posts:  5
Joined  2022-09-23

I’ve been working on trying to texture and then animate a complex model that I have imported from SOLIDWORKS, into cinema 4D. So far I have tried importing a .obj, and an FBX file which was slightly better. As you may already know, the CAD files from engineers are extremely messy. This one in particular is a very heavy file, and am trying to retopo the whole thing piece by piece, so I can eventually texture in RedShift. Unfortunately, after countless hours of research, I am almost coming to an end to figure this out. I tried using the new Remesher in cinema 4D, tried Check Mesh tools, turned the messy meshes into volumes, and just tried to use Zbrush Remesher and non are working. The vertices and edges import unwelded, and it doesnt seem to be addressed in this tutorial. Using Zbrushes “Group by Normals” didnt work. It simply made a million different groups, which obviously does not work. Sorry for the lengthy post. I’m just not sure where else to go , and this project is super super important. I have attached an image of the model I am trying to fix and pulled out a point to show the issue. Any help would be greatly appreciated.

Profile
 
 
Posted: 23 September 2022 07:28 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  11946
Joined  2011-03-03

Hi kernstephen,

Without seeing what you got, it is hard to tell. I assume you can’t share the Solidworks file. Would you mind sharing your worse object that you got inside Cinema 4D in the Q&A forum? As I would like to use Cinema 4D’s Remsher or options. IF the Solidworks file is not OK, ZBrush can’t do magic.
So far, most questions about it have missing sub-files from Solidworks.

Please as zip/attachment. (Or Dropbox, Wetransfer, Google, Apple, Adobe, Amazon)

Anyway, no promises; I had cases where starting over or getting the Solidwork person to export a different model or a complete file structure was the only way, as nothing was OK.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 26 September 2022 07:13 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  5
Joined  2022-09-23

Hello and thanks for the reply.

I uploaded the cinema 4D file with a piece of the messy geometry in the WeTransfer link below. This was the resulting mesh from an emported FBX file, which maintained the integrity of the CAD model way better than importing a .obj file. The model is very complex in it’s entirety, so I’m wondering if that was why the model was not importing correctly? Anyways, you’ll be able to see how the shape of the model is okay, but the un-welded vertices and edges are ruin it. Really appreciate your help on this!

https://we.tl/t-qKmOdrYZFp

Profile
 
 
Posted: 26 September 2022 10:24 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  11946
Joined  2011-03-03

Hi kernstephen,

Thanks for the file!

Perhaps not a fit for all models, but some steps might find a way into best practice:

• Render the model to see what happens, especially with a “chrome” material, as this points out how well a surface is crafted.

• Go to Attribute Manager> Mode> Modeling> Mesh Checking. This will allow us to see the main problem if any.

• Determine the two points from a mesh that are closest while creating a visible Polygon. Use then the Mesh> Remove> Optimize* >Tolerance with a smaller value.

• In cases like this, you might be left with a massive number of problems.

• Remove all unwanted Phong Edge Breaks. (Mesh> Normal> Phong Shading> Unbreak Phong Shading.

• Set the Phong tag to a value that fits your model that is often determined if a Bevel was introduced or not. 44º is often a good starting point.

• Set up a Polygon Reduction Generator. Reduction between 1% and 5% (this hopefully kills lots of bad Polygons)

• On top of that set, the Remesher (ZRemesher) While Edge detection is set to Shading.

• Now comes the part to inspect the model. Are there any artifacts in the new mesh? If so, there is a balance among Remesher, Reduction, and Phong Angle (Phong Tag). This is an individual balance that can revive a model or not. In the example below, I found the balance.

https://www.dropbox.com/s/hjnzlv5s8grdn77/CV3_2023_22_MOrm_01.c4d.zip?dl=0


Use the Current State To Object, perhaps with a new Remesher!


Don’t use those objects you get from a 3rd party. Make a list of problems and request proper working files. This file had around 2/3 of its polygons labeled as bad! This is mainly based that polygons were between polygons. This is 66% buggy and should be acceptable at all. 27K polygons and 18K of them are wrong. Even though I have modeled in 3D for three decades, this ratio is rare.

My take: To get a polygon model out of a Mathematical based CAD is a skill, and nothing can be done by just selecting a preset.

All the best

Image Attachments
Screen Shot 2022-09-26 at 11.25.41 AM.jpg
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 28 September 2022 09:30 AM   [ Ignore ]   [ # 4 ]  
Total Posts:  5
Joined  2022-09-23

Thank you so much! In the time it took for me to reply, I was able to reach out and ask for a STEP file. This file type imported the mesh with welded surfaces and edges which was great. I might also add that some of the mesh didn’t import correctly, as pieces were missing. However, the engineer and I found that when he exported from Solidworks, there was an option hidden in the export options for “detach periodic surfaces” for some reason it’s on by default. When he unchecked it, it worked great. Now the model and mesh are in Cinema 4D with the welded surfaces.

Question.

Now that I have the model with welded surfaces, do you recommend putting each piece through the same method of retopo as you stated above? I did in fact follow your directions before I got the STEP file, and I came to the same result as you did which was great. There were some minor issues with the mesh, including misplaces edges, and bumps in the mesh - which are simple to fix. However this model has probably 80-100 pieces that are similar, or even more complex as that. Is there another way you’d recommend to retopologizing a complex model? Or is this simply where the hard work comes in, and I need to just fix it piece by piece. I just want to make sure I am not missing something here.

Thank you for all of your help!

Profile
 
 
Posted: 28 September 2022 10:50 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
Total Posts:  11946
Joined  2011-03-03

I’m glad you had success, kernstephen.

I would try to keep what is working and not apply this workflow from above in general.

The first choice should always be to get a clean model from Solidworks, with all parts and files.
• sldprt (parts)
• sldasm (assembly)

Find the best settings
https://help.maxon.net/c4d/2023.0/en-us/Default.htm#html/FSOLIDWORKSIMPORT.html?Highlight=solidworks

You can lower or improve with these settings the quality. All these import parameters will change what you get. Tesselation, for example, is a mighty parameter to be aware of, and it will define what you get.

There are options that a part is built only once and used many times. Perhaps that helps to replace those instead of just fixing them repeatedly.

https://www.cineversity.com/vidplaytut/c4d_r20_import_catia_step_iges_solidworks_jt_cad_files_in_cinema_4d

The retopologize work should be done when you can improve towards your targets. The idea of an ideal mesh has a lot to do with the targets, your idea of a clean mesh, and if it works for your visualization. (e.g., render times). This means you need to know what is important to you and if the underlying model has the potential to do so.

That said, without knowing anything about the material you just got and getting a general question. From my point of view, there is some trial and error. The method above works based on a precise balance for that specific model. Change a single parameter, and it might fall apart. This means it is an individual solution. Now take 100 pieces, and each has a different need. A one-stop retopologize might have very little to offer then.

My best wishes

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 03 October 2022 05:23 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  5
Joined  2022-09-23

Hi Dr.Sassi,

I’ve had much better luck using the import settings from the link you sent, so thank you for that.

As for retopo for the larger pieces, I applied the clean-up workflow you sent previously but it didn’t necessarily come out looking right. I wasn’t able to find the"On top of that set, the Remesher (ZRemesher) While Edge detection is set to Shading” option in the Remesher in cinema 4D. I assume it the verbiage for that changed with the UI update and figured it was either the “keep creases”, and/or angle options which I tried both. But still had super jenky topo. Next step for the larger parts is going to be importing in Zbrush and try it there.

Also now that I think about it, since this is going to be a vehicle where we only technically need to really see the wheels moving, I suppose all of the mesh doesnt even need to be retopo? Only the parts that need more complex materials for realism, as well as the parts to be animated. I think cinema 4D should be fine if the other parts have bad topo when it’s time to render, if they only have simple default diffuse color. Am I thinking about this correctly?

Thanks for all your help.

-Stephen

Profile
 
 
Posted: 03 October 2022 06:08 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
Total Posts:  11946
Joined  2011-03-03

Hi Stephen,

Thanks for the feedback.

As mentioned, the setup I shared is based on the individual object and results from finding a unique sweet spot. It wasn’t, though, as a standard setup that could work as a host without changing anything.

The files from mathematical CAD apps are not polygon based in their native state. I would say that one has to open a file to see what is delivered and to evaluate what settings are needed to come closer. What happens during import is, and I simplify here a lot: Think about a Spline circle; to define it, it uses a formula to create intermediate points. If you take those points away, you get just a square; if you add more, you get closer to an ideal circle.
Somewhere between is the sweet spot. A too-dense mesh is as unattractive as a very low-density one. Many factors are in the game here, and only you can decide what is needed and efficient. There is no “one size fits all”. But with some iteration, the results will be better, and with lots of them, your estimate will be more precise of what to do.

Another example would be a vector graphic converted into a pixel-based image. Roughly comparable.

Always do a render from the camera position you like to have in the final resolution; this should guide you.

To have to remeshing the result of a perfect mathematical description should be not needed.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 14 October 2022 03:03 PM   [ Ignore ]   [ # 8 ]  
Total Posts:  5
Joined  2022-09-23

Hi Dr.Sassi,

Apologies! That was not intended to be feedback. Was just sharing my progress on figuring this out which you’ve been very helpful at, so thanks again.

Thanks for the added context on how each model needs different attention and strategy to get it to look the way you need.

I have gotten to a great place in the process specifically from importing a large part of the model into Zbrush, and unwrapping UV’s with the UV master, and exporting it to Cinema4D. However I have encountered another issue with a texture I am creating. Happy to create a new thread if necessary since the topic is a bit different. I am trying to add a styrofoam texture to the model using RedShift nodes and plugging in a diffusion color node from a seamless texture image, and a normal map that I created using https://cpetry.github.io/NormalMap-Online/. The diffusion color looks great singularly, however when I add the normal map, it fails. When I apply a previously created successful wood texture, it doesn’t seem to have the issue. Do you have any recommendations on creating a styrofoam texture or how I can fix this? It looks like a phong angle issue, but I followed your advice above and broke the phong, and adjusted the angles and it didn’t help. I uploaded three images for reference and uploaded it through WeTransfer at https://we.tl/t-fP2PaN1Vk0. One with diffuse color only which looks correct, then the normal map all jenky, and lastly the wooden texture. 

Thanks again for any pointers,
Stephen

Profile
 
 
Posted: 19 October 2022 07:22 AM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
Total Posts:  11946
Joined  2011-03-03

OFF-TOPIC

Hi Stephen,

This is a tutorial help forum. To ask follow-up questions, please use the Q&A forum. I’m happy to dive into your question.

Normal maps need to agree with the use:
https://help.maxon.net/c4d/2023.0/en-us/Default.htm#html/MMATERIAL-ID_MATERIALGROUP_NORMAL.html#MATERIAL_NORMAL_REVERSEY
The colors of the Normal map are like vectors, and how they are used needs to be set correctly.

Standard Materials Explorations, here is an example of what Redshift 3D can do; scroll down to Displacement2
https://helloluxx.com/products/assets/redshift-essential-materials/

Have you considered some tiny amount of Subsurface Scattering?

I can work with project files (include texture), even with a simple example, but screenshots are not telling me a lot.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES member

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile