Page 1 of 1

Heeeeelp! :) Script for obj sequence.

Posted: 02 Mar 2018, 10:25
by gfeather
Hi There.

So I have been dealing with an issue trying to get Softimage XSI and Realflow to play nice. I unfortunately have XSI 7.01. If I had only had any version higher than this I wouldn't be having these issues.
Realflow doesn't have a plugin for Softimage XSI 7.01, or at least they aren't saying they do. I have a scene, it's been tracked in Syntheyes. The issue is Realflow doesn't read Alembic properly, and the camera settings as well as the orientation of the camera is wrong. About the only thing that is right is the translation. Realflow doesn't like to take animation from any other programs it seems, SO... I have been trying out other avenues.

I have found that I can import multiple objects using a script in Blender, so I have been outputting the mesh sequence in Realflow (OBJ) importing it into Blender, and then making that file a collada file and importing that in XSI,
Which sort of works. But here is the issue:

I need to find a fast way to animate the visibility of OBJ's that are in sequence. They import with names that are followed by 001 002 or 0001 0002 for each step. But of course when they come in they are all visible. So if I could animate the visibility on and off according to the number of the mesh (which should match the current frame) that would really speed things up. (otherwise I have to do it manually for 100's of frames.)

I also bought a copy of Maxwell Studio, which seems to be useless for me. it was advertised as a link for software that doesn't have plugins for Realflow, but the truth is it doesn't do animation either. Again, if it would accept a render via script from Softimage xsi, that would be great.

it does seem that you should be able to write a script for xsi that utilizes maxwell render.

There are no plugins for 7.01 to help me unfortunately. Multi-object import script only works for versions higher than mine. I have no way to purchase Softimage XSI 2015 unfortunately, which I really really wish I could. So any help would be wonderful.

Thanks!

Re: Heeeeelp! :) Script for obj sequence.

Posted: 02 Mar 2018, 11:40
by myara
Something like this ?

Code: Select all

# Python
xsi = Application
digits = 3
objs = xsi.ActiveSceneRoot.FindChildren('','polymsh')
for obj in objs:
    frame = int(obj.FullName[digits*-1:])
    xsi.SaveKey(obj.FullName +'.visibility.viewvis', frame, 1)
    xsi.SaveKey(obj.FullName +'.visibility.viewvis', frame +1, 0)
    xsi.SaveKey(obj.FullName +'.visibility.viewvis', frame -1, 0)
The digits part is how many digits is using your sequence's numbering. (001 = 3 digist, 0001 = 4 digits)
The rest of the code is creating 3 keys, a visible one, in the frame that correspond to the object's name, and make it invisible in one frame later and one before.
The "objs" variable is taking all the polygon meshes that are inside your scene.

I think Softimage 7 supports Python but just in case a JScript version

Code: Select all

//JScript
digits = 3
objs = ActiveSceneRoot.FindChildren('','polymsh')
for ( var i=0; i < objs.Count; i++ ) {
    var obj = objs(i)
    frame = parseInt(obj.FullName.substring(obj.FullName.length - digits))
    SaveKey(obj.FullName +'.visibility.viewvis', frame, 1)
    SaveKey(obj.FullName +'.visibility.viewvis', frame +1, 0)
    SaveKey(obj.FullName +'.visibility.viewvis', frame -1, 0)
}

Re: Heeeeelp! :) Script for obj sequence.

Posted: 02 Mar 2018, 13:21
by Draise
You just blew my mind.

Re: Heeeeelp! :) Script for obj sequence.

Posted: 02 Mar 2018, 19:44
by gfeather
Genius!

I thank you so much. I was not looking forward to keying every mesh manually :)
I even have time to go out for coffee now.

Re: Heeeeelp! :) Script for obj sequence.

Posted: 02 Mar 2018, 19:54
by gfeather
It works great for visibility, is there a way to make it do the same thing for renderability?
:)

Re: Heeeeelp! :) Script for obj sequence.

Posted: 02 Mar 2018, 19:56
by gfeather
If I just swap out view visibility for visibility.rendvis would that work?
Going to try that when I get back.

Re: Heeeeelp! :) Script for obj sequence.

Posted: 03 Mar 2018, 00:27
by kiwimation
This should do the trick.

I cant remember the difference between the two addons, they may be the same with a different name But I used this back in the XSI 7 days to get fluids from blender into XSI

I didn't create this, I cant for the life of me remember who did.
If anyone does can you put their name in this thread so they get credit.

https://www.dropbox.com/sh/h0k2gmnbbluw ... kZtaa?dl=0
objseq_q8c.jpg
objseq_q8c.jpg (35.47 KiB) Viewed 1670 times

Re: Heeeeelp! :) Script for obj sequence.

Posted: 03 Mar 2018, 14:04
by Hirazi Blue
IIRC this addon was written by Thiago Costa (which the "tc_" in the name seems to confirm). ;)
You can find it in the local backup of our Resource section also under the name Obj sequencer (RMB & Save As)
@rray - how do I link to specific entries in the resource section, to not have to link directly to the download?

Re: Heeeeelp! :) Script for obj sequence.

Posted: 05 Mar 2018, 01:54
by gfeather
Thanks, I will try that out as well.
It's a similar situation. Realflow - Softimage XSI.

Re: Heeeeelp! :) Script for obj sequence.

Posted: 09 Mar 2018, 23:20
by rray
@Hirazi Blue - not possible at the moment. The plan is to have a link to a forum thread for every plugin. About half of the plugins already have it, but for the others a new thread will have to be created automatically somehow.

The links you're asking for would go to these threads (they would show the plugin at the top like this one).

I'm a bit low on energy atm so this could take a while.. also it's tricky to create a temp solution because all those links would have to be changed later.