Importing animations with varying vertex/polygon count

Importing animations with varying vertex/polygon count

Anonymous
Not applicable
2,116 Views
7 Replies
Message 1 of 8

Importing animations with varying vertex/polygon count

Anonymous
Not applicable

Hello everyone.

I'm currently exploring VRED to see if it fits in my pipeline.

 

Short version first:

Is there any way to import an animated object with vertex and polygon counts that change on every frame?

 

In may daily work it is a common challenge to render animations of objects with changing topology (usually meshed from volume or particle simulations).

Usually I use the alembic file format for exchange of such animations between software packages.

When I tried importing one of my alembics to VRED I got only the first frame of the animation.

 

Is there any other format that supports this?

Am I missing anything?

 

Any help with the matter would be highly appreciated.

Thank you all very much in advance for your time and consideration.

0 Likes
Accepted solutions (1)
2,117 Views
7 Replies
Replies (7)
Message 2 of 8

seiferp
Community Manager
Community Manager
What’s your source Application? Maya? Would Vertex Cache and FBX an alternative?
0 Likes
Message 3 of 8

Anonymous
Not applicable

Hello seiferp.

 

Thank you for your reply.

My source application is usually Houdini or Cinema 4d.
In the case at hand the file was exported from Houdini to alembic.

 

It was my understanding that vertex caches require consistent topology to work properly.

 

I just tried importing my animation as an fbx.

The animation actually plays, but completely messes up my phong shading (see picture):

broken_phong.JPG

 

Do you know of any way to counteract that behavior?

Thanks again.

0 Likes
Message 4 of 8

marcus_fritzen
Autodesk
Autodesk

Hi Julius,

 

FBX vertex cache should work. I will have a look at the alembic issue when I'm in the office tomorrow.

 

Cheers,

Marcus



Marcus Fritzen
Principal Engineer
0 Likes
Message 5 of 8

marcus_fritzen
Autodesk
Autodesk

Alright, we are handling the Alembic import with the FBX SKD, too. But it seems that it's not working as reliable as FBX. Regarding your issues with the normals, could you provide a simple demo file so that we can have a look at it?

 

Thanks,

Marcus



Marcus Fritzen
Principal Engineer
0 Likes
Message 6 of 8

Anonymous
Not applicable

Hello Marcus.

 

Thank you so much for looking into this!

I collected some files that should make my problem reproducible.

 

The attachment testshapes.zip  contains two files: testshape.abc  and testshape.fbx.

They were both exported from Houdini at 25 fps.

 

Please allow me to quickly walk you through my process. To help with this I put together a zip-file containing screenshots and animation previews: screenshots.zip

 

1) 01_testshape_preview.mp4  and 02_testshape_wireframe_preview.mp4 show how my animation looks in Houdini. Note that the Phong-shading is smooth and the polygon count is non-consistent.

 

2) 03_export_settings_alembic.JPG  and 04_export_settings_fbx.JPG show my export settings for the alembic file and the fbx file respectively.

My document's framerate is set to 25fps.

 

3) To test that my exports actually have the animation in them i imported both to Cinema 4D.

Both played the animation. However, while the alembic looks smooth as it is supposed to, the FBX does not have a smooth surface anymore.

I now believe that this is actually not a problem with the Phong-normals as it turns out that all polygons are disconnected for some reason.

This strikes me as odd as the Windows 10 Explorer actually displays the surface with smooth shading, however without animation.

Please see attachments 05_c4d_alembic.JPG, 06_c4d_fbx.JPG, 07_c4d_disconnected_polygons.JPG and 08_fbx_display_explorer.JPG for visual substanciation.

 

4) 09_VRED_import_alembic.JPG  and 10_VRED_import_fbx.JPG  show my import settings in VRED.

 

5) 11_VRED_alemic.JPG shows the imported alembic file in VRED with broken phong. The animation is not working.

 

6) 12_VRED_fbx_frame_0.JPG  and 13_VRED_fbx_frame_5.JPG  show the imported fbx file in VRED at frames 0 and 5 respectively. The animation is working but the shading is not smooth and non consistent.

 

 

I hope that gives you a good idea of my explorations so far.

Thank you, again, very much for your time.

 

Best regards

Julius

Message 7 of 8

seiferp
Community Manager
Community Manager
Accepted solution

Probably not what you are looking for but I used @Anonymous ´s MEL Script to export geometry for every frame in Maya and created an Animated Switch Node in VRED that toggles through every state.

$x=0;

//Adjust the loop for the length of your animation for( $i=0; $i<50; ++$i ) { string $filename = ("C:/Users/USER/Desktop/Frame" +$x+".obj"); currentTime (`currentTime -q`+1); file -op "" -typ "OBJexport" -pr -es $filename; $x++; };

 Cheers

Pascal

Message 8 of 8

Anonymous
Not applicable

Hello Pascal.

Sorry for not answering in the last week. I was out of office.

And thank you very much for your solution.

I'm not familiar with maya and mel but the sequence export is easy enough to replicate in Houdini.

I'm such a noob that i didn't know about the switch object 😉

You really helped me out a lot!

Best

Julius

0 Likes