Cinema 4D

Converting NX CAD Data for motion graphics software

I work for Siemens PLM, makers of NX and Solid Edge software. Though I usually never post much about work, I thought this information may help others in the graphics / motion graphics realm, especially those who do adverts for Car companies and the like. NX can really handle some massive data, like 4GB assembly big. Cinema 4D, not so much. I love C4D, and is my package of choice for motion graphics. So the question is, how do you convert those massive assemblies into a workable model in your 3d package, such as Maya, 3ds, Modo or C4D? It’s all about doing the correct export and conversion process.

Get some conversion software

If you’re like me, it’s a good chance you subscribe to either 3D World or 3D Artist. You might see an ad every once in a while for PolyTrans / NuGraf by Okino software. While it’s PC only software, it’s probably the best conversion software out there, albeit with its quirks. *Mac fanbois (Which I am), just get a copy of VMWare or Parallels and suck it up. Before you can ever actually own a copy, Robert Lansdale will most likely want to speak with you, either by email or phone, to discuss your needs. He’s very serious about his CAD conversions and wants to make sure you’ll end up a happy customer. I purchased the NuGraf package with the Granite/PACK plug-in to handle STEP and IGS. As a side note, being a slight introvert, the communication made this a little uncomfortable for me, but nevertheless, I persevered through the conversation.

*Rat Hole*: Yes, Cinema 4D Visualize and Studio come with Okino importers (only on the PC version) but those importers are not nearly as fast/accurate as having the standalone version.

Break it up

So the first thing I do, when dealing with a massive assembly is break it up into somewhat manageable chunks, or sub assemblies. Usually if your receiving the data from a design team, it’s probably already broken up into manageable sections/sub assemblies. What’s a manageable section? That’s up to your machine. My 12 Core MacPro with 24GB of ram can handle about a 300MB assembly at a time, and can go a bit higher.

Export to STEP

For me, when exporting an assembly, I export to STEP 214 (As recommended by Robert). The command in NX is File->Export->Step 214… The kicker though is to export with the option “Export Assembly as External References” in the advanced tab of the export dialog. This will create a new .stp file for each part in your assembly. Make sure to set your export data to a fresh directory, otherwise you will pollute your data folder very quickly with files. You will thank me later in the process for telling you this. Typically, I check “Surfaces” and “Solids” as the model data to export. Sometimes with older data, the surfaces data can be unruly and your best bet may be to retopologize those parts in your main 3D system. I keep the tolerance at the default level, but if your doing high detail, you may want to experiment on what tolerance meets your needs.

Start the conversion process

You need to get the data into an intermediary format, to convert to your 3D package. Importing the data is pretty painless. Most likely you should choose the advanced import choice and read through the help section to see what the options mean. You should import only your main assembly file and the NuGraf/PolyTrans software is smart enough to load in all the reference links. If you tried to export your big assembly into one file instead of “Export Assembly as External References” this is where you will get bit in the ass. If the export is broken up into small chunks of references files, the software will relatively do a quick job. A 100-300MB referenced assembly will take about 20-30 minutes to chunk through. If not setup correctly, the program may take overnight, or worse, you’ll find a crash error in the morning. If you still find loading up the main assembly STP file to be too slow, the NuGraf/PolyTrans software also has the wonderful ability to do batch conversions. If you decide to do the batch conversion, you can export all the separate items to your preferred format, then you can batch open the separate files into once scene file with NuGraf by shift selecting the files. I have found this can sometimes provide a HUGE difference in dealing with lots and lots of parts. As I use collada for the export format, it could be the NuGraf/PolyTrans software has a much better engine for the collada format, rather than the Granite/PACK for .stp

Look out for the super slow conversions

Sometimes when doing a batch conversion (my preferred method) the Nugraf/PolyTrans software will sit, for what seems like an eternity. Sometimes it doesn’t really matter about file size, it just gets hung. This could either be an issue with what NX exports, or how the Granite/PACK reads certain STP files. As a workaround for those items that love to sit and hang, I do a second conversion of those individual parts by loading into another CAD program, exporting as STEP and seeing how the conversion software will handle it. For the most part, albeit slow, it usually fixes the problem. In a worse case scenario, I export to VRML from NX… blech.

Be realistic

An important thing to remember, is don’t go overboard on the import/export quality. I know we all want the best, but specifically with CAD data, the detail can be overwhelming. The bolts, the threads, etc are not created with shaders, they use actual geometry… ewwwww. If you try to be too overzealous in what you try to transfer, you will only become frustrated. Sometimes, I use a hybrid approach, using a very rough model (low polycount) for certain sections and only a high poly model for close ups.

Export

For me, it was recommended to export to Collada for the C4D import. Preferred exports will vary depending on your desired 3D package. I just go with the default export settings in NuGraf/PolyTrans and export out. Typically the models are now much smaller than the original and it’s just 1 .dae file. Sometimes I see as much as a 75% reduction in model size from the original NX data.

Import into Cinema 4D

If you’re using a mac, just open the new .dae file and start texturing. If you’re on a PC, as recommended by Robert, you’ll have to go to the preferences, go to the import/export section, and turn off the built in Okino importers.

Cleanup

At this point, you’ll have to most likely create more realistic materials and texturize your model. The only thing that every really comes through in the conversion process concerning materials is the color channel. If your materials all look washed out, it’s also a good chance that the luminance channel is turned on as well.

Xrefs

As a side note, while conventional thinking would tell you, you should have a master file, with all your sub assemblies as xrefs, I have noticed when working with these huge data sets in Cinema 4D, it can crush your system very quickly. I recommend merging all the assemblies into one file, rather than using xrefs. Your results may differ.

Conclusion

While working with massive data sets are usually a huge pain, (meaning slow, really slow or super sllllllooooooowwwww) hopefully this article will give you some tips on how to get a grip on what otherwise may be a hair pulling experience when dealing with CAD data from design/manufacturing agencies.

Categories:
{if TRUE}
(0) Comments
{/if}

OpenEXR passes from Cinema 4D to After Effects

So I'm still new to the whole OpenEXR format, but I like the whole concept of "All the layers in one file". That being said, here is another struggle I found working with 32-bit OpenEXR render from Cinema 4D and imported into After Effects CS6.

#1 The edges on a transparent / alpha on render passes were looking jagged and pixelated
#2 The depth pass was pure black

First, let me show you my settings out from C4D:

c4d settings out


OpenEXR B44 32-bit Multi-Layered file with a Straight Alpha channel. Also, I am NOT using Linear Workflow in Cinema 4D.

Now on the the fixes for the issues above:

#1 - Jaggies


There are two problems with seeing jaggies.

Part 1: When bringing in the OpenEXR files to After Effects, I had to first to re-interpret them. At first pass they are brought in as 'Premultiplied' alphas instead of 'Straight' as they were rendered out. Right click on your .exr file in the project pane and select 'Interpret Footage->Main…'

Part 2: The jaggies are because when using the "Create ProEXR Layer Comps" it sets the UnMult (or un-multiply) option to "On" in the EXtractoR plugin. For my settings since I'm rockin' the straight alpha, this needs to be off. You will need to preform this on any channel that has ANY level of transparency or alpha in it.

default unmult settings

Once you change the UnMult setting (and your alpha is interpreted correctly from above), you should also see the jaggies disappear instantly. Well, not instantly if you have a 4K .exr with 20 some layers inside. It takes me about 5 seconds to process.

unmult on

#2 - Depth Pass Issues


(Update 2012.7.24 - Since upgrading to 13.061, this particular issue has seemed to disappear)
Actually the depth pass isn't screwed up as I first initially assessed. It's very heavy towards the black side of things and with working in a 32-bit file, I'm guessing it took what C4D probably makes as an 8 Bit file and throws it into the 32-bit space. When I started working with my depth pass, it was straight black to my eyes. After creating 2 levels adjustments, I managed to get the depth layer close enough to where it should be. I would prefer an OpenEXR expert to email me the absolute math settings, but for my purposes it's close enough. I used the first levels adjustment to get a rough mix and used the second to dial-in the subtleties of the channel that I couldn't do without looking at a second histogram for reference. Have a look at the thumbnails below (which show the levels settings that worked for me) to see what I'm talking about.


before levels adjustment after levels adjustment


Hopefully you were searching on "AE OpenEXR Cinema 4D Jaggies / Alpha Channel" or something along those lines and found this post. Happy compositing.
Categories:
{if TRUE}
(3) Comments
{/if}

Making Multi-Layered OpenEXR files with Cinema 4D

With the recent release of Cinema 4D R13, there was one feature that I highly anticipated. That was the ability to write multiple channels into a single EXR frame. Why so important? Well, when you work with 4000+ frames for a sequence and use about 10 passes, that equates to 40,000 frames. Enjoy moving them from drive to drive or re-loading re-rendered assets. Instead, how about we work with just 1 file that contains all the different passes, such as ambient, diffusion, object buffers, etc.

So how do make an OpenEXR file that puts all the channels into one file? Great question! The answer wasn’t as easy as I thought it would be. As my workflow is always going to After Effects to composite the passes together, this is what my output dialog looked like:

As you can see the Multi-Layer file option is grayed out and not available. What gives? Well, it’s an easy enough of an answer, you need to turn off the Save Compositing Project file option if it’s turned on. If it is on, as mine always is, it won’t let you select the Multi-Layer File option. After disabling “Save” on Compositing Project File Section, you can see that you can now make a single OpenEXR with all your render passes:

You’ll just have to save the Compositing Project File 3D data separately. If you need further information about working with OpenEXR and After Effects, visit this article from Adobe. Happy rendering.

Update 2012.26.01

It was asked on twitter by Grischa Theissen @grischatheissen (who you should follow) what the best format to use for OpenEXR. Tim Clapham @hellolux (follow him too, as well as take classes on fxphd.com from him) responded that B44 is built for realtime playback according to official exr docs, and that he uses 16bit float for smaller files unless he really needs 32bit precision.

Categories:
{if TRUE}
(6) Comments
{/if}

Sure Target for Cinema 4D

SureTarget

Andrew Kramer over at videocopilot.net, one of the coolest sites for After Effects tutorials, has a free plugin called Sure Target. In a word, it is awesomeness. It lets you easily shift from 3D element to 3D element with nothing more than setting a few parameters and keyframes for a fluid movement from one object to the next. I’ve scoured the net looking for this very same thing for Cinema 4D to help improve my workflow. Alas, I couldn’t find anything that wouldn’t set me back 70+ bucks so I’ve written an xpresso/c.o.f.f.e.e. setup for Cinema 4D that is based off of the ideas of Andrew Kramer’s “Sure Target” and a variation from one of Tim Clapham’s camera rigs from Making it look great 6. Be warned, this is my first time programming c.o.f.f.e.e.  and I only spent a couple hours on it, so there are bound to be some bugs as I have not tested it with every object in Cinema 4D, and it currently only allows 10 objects. I highly suggest wrapping objects inside of nulls so you can have more control of the objects orientation. As I get some feed back (hopefully) I’ll put together a little FAQ and perhaps a demo and some improvements.

2010.04.04 Update: Now with dolly tracking
With my own personal projects I found the need for individual dolly tracking for each target (just like the original) so I added that functionality into Beta V2.

2010.05.08 Update: Now a release version and new video tutorial
Seems this sucker is getting updated about once a month.

Watch Tutorial | Download Sure Target for Cinema 4D (V1.3)
Download Sure Target Example Scene

Categories:
{if TRUE}
(8) Comments
{/if}

Improve Collision Detection in Cinema 4D

I’ve been working on some side projects trying to learn the latest Cinema 4D with MoDynamics, Maxon’s latest “kick-ass” feature for simulations of objects colliding. This is good for crumbling buildings, smashing through brick walls, and asteroid fields. On my latest attempt to have a bunch of objects fall from the sky to land on a floor, my results were somewhat unexpected. Objects were occasionally passing through each other (as well as the floor) as if they were not solid.

collision detection before and after

cinema 4d icon This problem will usually result if you have objects colliding with one another at high velocities. After much research on the subject, it comes down to one small solution to fix the problem. In your project settings (Menu, Edit->Project Settings) you’ll see a MoDynamics tab. Click on that item tab then choose the sub-tab of ‘Expert’. The magical setting to increase collision detection is ‘Substeps’. You should only increase this number until your particular collision issue goes away, as the more you increase this number, the longer your render times will be. This number decides how many calculations are done in between one frame for objects to detect one another.

Categories:
{if TRUE}
(1) Comments
{/if}