OBJ Sequence Import

Started by zachbeale, January 26, 2016, 01:28:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zachbeale

Hello,

I don't really understand Python yet, but I'm looking to import a sequence of about 330 OBJs I just finished processing in Zbrush, in order to create an animation.

I know it can be done, as I've seen that other keyshot users have done it, I'm just unable to find a script. Any help you can give would be greatly appreciated.

TpwUK

Here's my basic one, if you can get your head round python you can soon customised it to your needs

Martin

zachbeale

I remember coming across your facebook page while googling for this, so I think I know which video of yours this ended up being used for. Small internet.

This is pretty much what I need, but is there a way to bring the OBJs in, and sequence them, like in a timeline, so I can assign materials to them from within keyshot? Or will I need a script that renders each layer in keyshot (meaning each OBJ, I suppose) individually?

TpwUK

Quote from: zachbeale on January 26, 2016, 02:06:45 PM
I remember coming across your facebook page while googling for this, so I think I know which video of yours this ended up being used for. Small internet.

This is pretty much what I need, but is there a way to bring the OBJs in, and sequence them, like in a timeline, so I can assign materials to them from within keyshot? Or will I need a script that renders each layer in keyshot (meaning each OBJ, I suppose) individually?

If i remember rightly that script brings each obj one at once so no timeline support, but it's set so you import frame.000 to setup materials and then you run the script as it will retain the materials ready for frame.00x to frame.xxx ... Read through the script. I did do a more complex one but i can't find it on any of my drives so i think it got killed with a recentish hdd failure :(

Martin

zachbeale

Hmm, I see.

Maybe the overall effort would be simpler if the script was just going through a list of groups, within a larger group, and toggling each groups visibility then rendering. That way I can generate frames without a timeline.

As it stands, I've got each obj in keyshot as a separate group.

DriesV

#5
Attached is a script I made to render a sequence of bip or obj files.
It support retaining materials and updating animation frames (should any animations exist in the scene).

For both bip and obj, this script assumes that you import the first frame to do the material and scene setup.
The only input this script needs is a folder with sequenced bip or obj files. You specify 'bip' or 'obj' via a dropdown box.

Have fun!  :)

Dries

JMAHIEDDINE

Thanks a lot DriesV, could you please make a quick tuto video of how to implement this ?(or at least a series of step by step pictures).
I'm not very familiar with pyton script, so as many others, so it would really be much appreciated :)

I have a couple of questions thow :
- what if an object appear in the scene at a time, do we need to stop rendering the scene at this precise time and render the other part with the object in it ? (by this I mean render the first frame of the scene with the object and animate it by importating the obj sequence)
- Could it be possible to import the complete obj sequence directly, then create a bip file and start to apply materials?
- I never try to export obj sequence from maya, but is it possible to end up with very complex scene this way?

Thanks a lot for your time and sorry for all those questions. I'm just very enthusiast about it, as I'm stuggling with fbx files since a year now without much success.

cheers,
John

Solid

#7
Very nice script DriesV!

I have one question regarding the script. is there any way to increase the render quality of the images in the queue? The render quality is very low when i use the obj sequence import script.


Solid

The normals dont get calculated when this script imports the .obj. Is there a way to add that to the script somehow?

Solid

Add the following line    io['compute_normals'] = True    to the script and it will calculate the normals.