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
   
 
Python PolyReduction = Wild Points
Posted: 09 April 2016 02:26 PM   [ Ignore ]  
Total Posts:  2
Joined  2014-01-16

Hi there,

Our team have created a bunch of script to automate importing CAD files into C4D. As it is well known, CAD files can be painful to work with, often heavy with unnamed objects.

At some point our script apply some heavy Optimization (2 cm) + a strong PolyReduction Deformer (90%).

So far we have experience 2 strange bug while doing those functions:

1-  The PolyReduction hang on some objects IF the Mesh Quality Factor is higher than 0. It seams like some bad polygon are throwing the deformer in an endless loop. As anybody had similar experience?


2-  The second problem is more problematic and more urgent, we sometimes have point that goes wild. It seems to be the results of the POLYREDUCTION function, but I cannot reproduce the result manually. If I take the same object, apply manually the optimization and than apply a PolyReduction NO points goes wild…

I suspect that C4D interface command are often more complex than a simple python function (probably multiple function bundled together) since we get different result with the interface and by pure scrip, as if C4D had some cleaning internal process…

For example, if I center the Axis of every object it seems to help some Object, but not All of them (Wild Points are still present)


Lastly we’ve just discovered that page:
https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d/C4DAtom/index.html?highlight=message#C4DAtom.Message

So none of our script contains “MSG_CHANGE”. Could this be the root of our problem? Can you give us a rule of a thumb when to use them? At each function that change the geometry? at the end only of the script?

And is there any other command that we have to use when changing the geometry by script?

Thank you for any help you can provide Smile

Profile
 
 
Posted: 09 April 2016 02:32 PM   [ Ignore ]   [ # 1 ]  
Total Posts:  2
Joined  2014-01-16

Hi,
I’ve made further test and it appears that it’s mainly the PolyReduction that mainly causes the problem. With a reduction Below 60% the problem goes away using the scripts, Higher the problem appears.

However no problem appears when doing the same step manually, even at 90% Reduction.

Profile
 
 
Posted: 09 April 2016 04:05 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Snoozy,

To optimize an imported file is certainly an individual problem, as I guess you import not the same file over and over again.

The fact that you can adjust the % parameter of reduction is a clear sign to be that something needs to be done on an observer side. This interaction is crucial for the quality you receive on the end. Ther is NO “one size fits all” option nor settings. 

Since you get good results with manual approaches, I can’t help you here at all; Certainly based on the fact that you haven’t shared at all any files (I do not ask in this case for files at all!, as this goes beyond what is Cineversity for.)
The right place to join for this is the Developer Site: The Plug In Café
http://www.plugincafe.com/forum/default.asp
I hope you will get the best support for your project there.


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