Author Topic: OBJ Sequence Import  (Read 8754 times)

0 Members and 2 Guests are viewing this topic.

Offline zachbeale

  • Newbie
  • *
  • Posts: 4
OBJ Sequence Import
« on: January 26, 2016, 01:28:39 pm »
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.

Offline TpwUK

  • KeyShot Beta
  • Hero Member
  • *****
  • Posts: 2910
Re: OBJ Sequence Import
« Reply #1 on: January 26, 2016, 01:55:04 pm »
Here's my basic one, if you can get your head round python you can soon customised it to your needs

Martin

Offline zachbeale

  • Newbie
  • *
  • Posts: 4
Re: OBJ Sequence Import
« Reply #2 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?

Offline TpwUK

  • KeyShot Beta
  • Hero Member
  • *****
  • Posts: 2910
Re: OBJ Sequence Import
« Reply #3 on: January 26, 2016, 04:39: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

Offline zachbeale

  • Newbie
  • *
  • Posts: 4
Re: OBJ Sequence Import
« Reply #4 on: January 27, 2016, 08:57:32 am »
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.

Offline DriesV

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2412
  • Product Specialist at Luxion
Re: OBJ Sequence Import
« Reply #5 on: August 07, 2016, 11:14:06 am »
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
« Last Edit: August 07, 2016, 11:17:56 am by DriesV »

Offline JMAHIEDDINE

  • Newbie
  • *
  • Posts: 7
Re: OBJ Sequence Import
« Reply #6 on: August 25, 2016, 05:09:46 am »
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

Offline Solid

  • Newbie
  • *
  • Posts: 4
Re: OBJ Sequence Import
« Reply #7 on: September 07, 2016, 10:39:03 am »
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.

« Last Edit: September 20, 2016, 05:29:59 am by Solid »

Offline Solid

  • Newbie
  • *
  • Posts: 4
Re: OBJ Sequence Import
« Reply #8 on: September 08, 2016, 12:17:44 pm »
The normals dont get calculated when this script imports the .obj. Is there a way to add that to the script somehow?

Offline Solid

  • Newbie
  • *
  • Posts: 4
Re: OBJ Sequence Import
« Reply #9 on: September 09, 2016, 10:16:48 am »
Add the following line    io['compute_normals'] = True    to the script and it will calculate the normals.