Author Topic: CAD / NURBS surfaces vs clean topology  (Read 11253 times)

2017-12-07, 18:52:49
Reply #15

pokoy

  • Active Users
  • **
  • Posts: 1862
    • View Profile
Conclusion: If you want to render CAD meshes in a clean way without normal issues, always disable the Shadow Terminator fix.

(At least for now, let's see if that can be fixed)

2017-12-07, 18:53:14
Reply #16

Shawn Astrom

  • Active Users
  • **
  • Posts: 244
    • View Profile
The geometry conversion out of MOI is fantastic and works wonders for getting clean meshes from .STEP or other CAD formats. The problem is Corona or at least the Cinema 4D plugin is not reading the vertex normal tag in Cinema correctly IMHO.

Every other renderer I've used for these CAD files translates the normal shading correctly, Arnold, Redshift, Vray, and both Physical and ProRender inside of Cinema render these meshes without artifacts.

Can someone post a Corona render of the .obj file I provided to show that Corona can, in fact, render the geometry correctly? If this is the case than we know that it is something wrong with C4D Corona plugin... Thanks, everyone looking into this and testing it out :)

- Shawn

2017-12-07, 18:56:08
Reply #17

Shawn Astrom

  • Active Users
  • **
  • Posts: 244
    • View Profile

Thank you Pokoy! This is what I needed to see! I think you have found the issue! I'll see if I can turn off the shadow terminator in C4D but I'm not sure if that is possible at the moment...

Thanks again this is wonderful!!!

- Shawn



Sorry but it's really the shadow terminator fix, at least in Max.

Have a look at the attched images (apparently we can't use attached images in the posts):

CAD_Geometry_Viewport.jpg - This is how it looks in Max. Actually, there's a problem with how Max reads the MoI object. It retriangulates n-gons and will mess up holes, at least for Max you should always export OBJ with tris&qads from MoI. But still, normals are perfect.

CAD_Geometry_Terminator_Fix_OFF.jpg - Rendered with Shadow Terminator set to OFF (value = 1, not 0 as one would assume)

CAD_Geometry_Terminator_Fix_ON.jpg - Rendered with Shadow Terminator set to ON. Say hello to normal artifacts.

In C4D though, it could be that explicit normals are recalculated, I think this would happen if Corona assumes the Phong tag automatically. To be sure, you should disable the Shadow Terminator fix and see if it helps. If it doesn't help you'll have to talk to the devs to see if they handle explicit normals correctly in C4D.

2017-12-07, 19:26:45
Reply #18

lacilaci

  • Active Users
  • **
  • Posts: 749
    • View Profile

2017-12-07, 19:27:59
Reply #19

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
Well well, so is this a bug then?

Yep it's a bug in the terminator handling that is in the Core and thus appears both in Max and C4D

2017-12-07, 19:32:30
Reply #20

pokoy

  • Active Users
  • **
  • Posts: 1862
    • View Profile
Well well, so is this a bug then?
According to Ondra it's a limitation, or better a side effect of the terminator fix. Unfortunately it's not feasible to exclude arbitrary objects form the fix as it's a global thing. I'll try to point him to this thread and see what he says.

2017-12-07, 19:33:49
Reply #21

pokoy

  • Active Users
  • **
  • Posts: 1862
    • View Profile
Well well, so is this a bug then?

Yep it's a bug in the terminator handling that is in the Core and thus appears both in Max and C4D
Ok then - so it is possible to fix? That would be fantastic.

2017-12-07, 19:41:56
Reply #22

Shawn Astrom

  • Active Users
  • **
  • Posts: 244
    • View Profile

Here is a new test setting the Terminator to 1 in Cinema 4D. This is great news for me! This will work for the time being for my CAD assets!!!

Thanks, guys so much for the help!

- Shawn

2017-12-07, 19:56:21
Reply #23

pokoy

  • Active Users
  • **
  • Posts: 1862
    • View Profile
Glad it worked! There's nothing more frustrating than hitting a wall on something one would expect to be trivial.

If a fix is possible I'd be super happy to get it. Right now it's like with a blanket that's too short - it's either cold shoulders or cold feet :D

2017-12-07, 20:00:24
Reply #24

Shawn Astrom

  • Active Users
  • **
  • Posts: 244
    • View Profile
Yeah, for now, this is great for me! I'll be interested to see how this effects other good quad based geometry though... I'm going to have a play around some more with some other files...

Thanks again!!!!!

- Shawn


Glad it worked! There's nothing more frustrating than hitting a wall on something one would expect to be trivial.

If a fix is possible I'd be super happy to get it. Right now it's like with a blanket that's too short - it's either cold shoulders or cold feet :D

2017-12-13, 08:59:15
Reply #25

lacilaci

  • Active Users
  • **
  • Posts: 749
    • View Profile
Alright,

So here's my "first" surface/nurbs modeling attempt.

It's a philips air purifier, I was doing it by just a handful of pictures and rough overal dimensions so not technicaly precise at all.

I think best way of exporting and sharing such model would be split by material so that it can be shaded very quickly, I did all the details in the mesh so no textures..

I still haven't found best way to tesselate the mesh. One big problem is that even though I model to catiaV5 tolerances I absolutely have to close even a 0.002mm gap otherwise it will screw up tesselation and depending on where it happens it might show up in rendering pretty badly.

I explored most of the recommended options of export/tesselation and sadly since I put some insanely small fillets in there every option fails in different way unless I blow up polycount to sky(then everything works, of course).

So, the question is now, ho many poly is too much :D? What angers me the most, is that low-poly is not really an option since the mesh will break terribly in that case.

Anyways, if you find any use for this object, go ahead: https://we.tl/gVVW2OCnQw

2018-01-10, 15:42:25
Reply #26

lacilaci

  • Active Users
  • **
  • Posts: 749
    • View Profile
Continuing with my suffering/learning nurbs modeling...

Is there anyone who knows how to meaningfully UV map cad models?

I mean, those models always have nicely unwrapped patches by default, however not sure how to create continuous UV across patches that are not welded and are not flat so simple projection would not work.

Basicaly I guess what I need is to know if I can sort of align and keep aligned edges of UV shells/islands while unwrapping... :/