A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
1 of 2
1
Reversing Normals
Posted: 20 April 2018 07:27 PM   [ Ignore ]  
Total Posts:  156
Joined  2015-08-31

Hi Doc.  I’m working on a huge scene with tons of objects.  Some of the normals are reversed and it’s taking forever to locate and fix them all.  Do you know of a way to quickly locate and reverse all broken normals in a scene?  Thanks so much!

Mark

Profile
 
 
Posted: 20 April 2018 10:06 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Mark,

The tools for the normals, are either “Reverse” or “Align”.

With Align, the first polygon of the object will be used as reference. Anyway, if you use align first, and it is the opposition, then click on reverse, while all or none are selected (I prefer the selected method, as I can see the results instantly.)

To do this with a lot of polygon objects, please have a look at this screen capture:
https://www.amazon.com/clouddrive/share/S0zOapNSp1NzVNQ0pIoEaC9q7cldPqJgs6Gg9aDjTnu

Let me know if you have a follow up question, I’m happy to look into it. (And yes, sometimes objects are not just based one single connected mesh, that needs manual work, if they are all over the place)


All the best

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 21 April 2018 12:47 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  156
Joined  2015-08-31

Great video, Doc.  Thanks for sharing!  I look forward to trying this out on my monster-sized scene.  I’ll let you know how it goes.

Profile
 
 
Posted: 21 April 2018 12:50 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Mark.

When I read “MONSTER”, I might should add, Preference> Interface>Attribute Manager Selection Limit “…”, typically it is sufficient, but well, monster…

My best wishes

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 21 April 2018 01:15 AM   [ Ignore ]   [ # 4 ]  
Total Posts:  156
Joined  2015-08-31

Just tried out your technique, Doc.  No luck.  Reverse Normals reversed all of the normals, but Align Normals (which I did first) didn’t do anything.  Any advice?

Profile
 
 
Posted: 21 April 2018 01:18 AM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Do you like to have an upload link, Mark, so I can see the file? To speed this up, I will just set one up and send it to your Private Messages Box here on Cineversity, ignore it if that is too much trouble. I will keep this file private, if not advice otherwise.

It is hard to say anything more without having a clue about the scene.

Yes, reverse should reverse all, that is at least a sign that something is working. Leaves to check what the Align didn’t do. I’m happy to take a look into it.

Cheers

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 21 April 2018 06:02 PM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for the file, Mark.


The creator of this model has certainly not taken care of normals. The problem here seems mostly to come from an sloppy way of mirroring elements. The second most part is given with merged objects, whereby a group of connected polygons is reverse to the other group of polygons.

The tools in C4D are Align, as I said, first polygon rules, or reverse. They are not suitable here for select all and click. Since the first one is often already off, or even worse, they are not connected groups in single objects. Sorry.

I did the first group, with 568 objects; It took me nearly half an hour to do that.

First I selected all objects from one main group, and selected all polygons, so I did not have to do it each time to see the normals.

Then I used to use the Viewport Solo Selection for the main work, as well as the short-cut S (while the mouse is in the viewport!). Clicking on an object, one can go down with the arrow keys in the Object Manager. The short-cuts for Align is U~A and for reverse it is U~R.
After a while I went to Windows> Customize> Customize Commands, and created a new palette with the functions I needed, S, U~A and U~R, to be faster. I stay in the rectangular selection to sort more problematic objects.

Not the most fun work, I know. So, if you can get hold of the creator, perhaps s/he has a version before mirroring parts, or a better version…

Here is a little clip, showing my workflow suggestion:
https://www.amazon.com/clouddrive/share/yAl5XJd9GkK0PfqME2AvZ8ne3Dm6FFvqs70sEhtV4PI

I googled if I could find something, but no luck, but honestly, I did not expected it. The only measurement combined polygon groups in a single object can have is the first polygon each time (same orientation) or that the origin (axis) could be used as evaluation (i.e., axis is inside.), but no luck. Since many objects are not “volumes” a clear inside and outside wasn’t even easy to evaluate for me while doing it manually.

All the best

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 21 April 2018 07:39 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: I tried to get faster with this, so I just used the option to combine with the script log/manager some steps. While using short-cuts “alt/option+[” as well as “alt/option+]”, for the following two mini scripts:

With this, I can most of the time stay in the Object manager and use the arrow keys to go down, while using shortcuts to get most of the work done. Often beolow second per object, which would make this a one hour session, except for some difficult parts.


# First script copy and replace anything in the script manager
import c4d
from c4d import documents, plugins
#Welcome to the world of Python

def main():
  c4d.CallCommand(12557, 12557) # Select Connected
  c4d.CallCommand(14041, 14041) # Reverse Normals


if __name__==‘__main__’:
  main()
  c4d.EventAdd()

# second script, needs to be separate from the first

import c4d
from c4d import documents, plugins
#Welcome to the world of Python

def main():
  c4d.CallCommand(13038, 13038) # Frame Selected Elements
  c4d.CallCommand(14041, 14041) # Reverse Normals


if __name__==‘__main__’:
  main()
  c4d.EventAdd()

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 21 April 2018 09:04 PM   [ Ignore ]   [ # 8 ]  
Total Posts:  156
Joined  2015-08-31

Doc, thanks as always for giving this so much effort!  I’m heading out of town to teach in Florida next week and will attempt to follow your instructions when I get back to work on this model the week after.  I’ve never worked with scripts so it looks a bit intimidating.  Hopefully I’ll be able to figure it all out.  If not, I may be back in touch for a little more hand-holding.

Thank you!

Profile
 
 
Posted: 21 April 2018 10:46 PM   [ Ignore ]   [ # 9 ]  
Total Posts:  156
Joined  2015-08-31

Doc, is there a way to temporarily disable all of my hundreds of texture tags so it’s easier to see what I’m doing when I work with the normals?

Profile
 
 
Posted: 21 April 2018 11:30 PM   [ Ignore ]   [ # 10 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Mark,

The script thingy, at least in the way it is above used, is pretty simple and perhaps in your muscle-memory in a few minutes. I will make a little screen capture. We have tutorials here, but I have the feeling some little things have changed.

Edit: here is the screen capture/edit.
Screen capture:
https://www.amazon.com/clouddrive/share/v2VFdrk9dbTrV91FDUdgleV4Ip4iH39HIPMYK352ddt
Note that I copy and paste the script from the script log to the script manager.

It is like recording your steps and repeat them. Perhaps some would call it a “macro”. The are huge options and tiny limitations, but in any way, if you have to click 3000 times or 9000 times, your arm will be grateful for any 1000 times less. grin

You can switch off textures in the Viewer> Options> Textures or N~Q

Have a great time in Florida

Cheers

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 21 April 2018 11:58 PM   [ Ignore ]   [ # 11 ]  
Total Posts:  156
Joined  2015-08-31

Cheers, Doc.  Thanks for everything you do!

Profile
 
 
Posted: 22 April 2018 02:13 PM   [ Ignore ]   [ # 12 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Mark.

What I notice is, that many object could be merged, e.g., the stairs, the dinosaur’s bones, etc. I guess one would end up with something below 100, perhaps even 50 objects. Will that help to solve the Normal problem, no.
Is there no way in your render application to texture both sides in the same way?

All the best

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 22 April 2018 03:36 PM   [ Ignore ]   [ # 13 ]  
Total Posts:  156
Joined  2015-08-31

Helpful thoughts as usual, Doc.  Thanks for taking the time and putting in the effort, my friend!

Profile
 
 
Posted: 22 April 2018 03:57 PM   [ Ignore ]   [ # 14 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for taking the time, Mark.

This morning I thought I have to stress test the suggestions that I made above. With the short cuts for the two mini scripts, here is a one minute capture (realtime). I have checked it with three main groups of the whole file.
https://www.amazon.com/clouddrive/share/NwNdRJ2YpDLfllutJRhek7DFEQiEhOTQ8GQN2P0KO6b
I have found that the “Frame and reverse “macro” is the fastest, even I have to use it often twice, be it keeps the fingers on the keys.

Enjoy your Sunday

 Signature 

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

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 22 April 2018 05:06 PM   [ Ignore ]   [ # 15 ]  
Total Posts:  156
Joined  2015-08-31

Right on, Doc!  Looking forward to putting all of this to the test when I’m back from Florida.

Profile
 
 
   
1 of 2
1