Can rsobj scripts be edited in the Link Editor?

Smart people ~ Great Scripts
Post Reply
User avatar
BNG
Chief Warrant Officer
Posts: 684
Joined: 16 Oct 2009, 03:26
Type the number ten into the box: 0
Location: Texas
Contact:

Can rsobj scripts be edited in the Link Editor?

Post by BNG »

Hi, I'm trying to get a handle on how rsobj scripts work and how to edit existing scripts to modify them. I'm able to open scripts in the L E window by left clicking the orange triangle. In this case on Clinton's doom3 MD5 Mesh Export script displaying the script text in the L E window. Can this layout be modified (with permission of course) to change things around a bit for the purpose of attempting to create an XSI exporter variant of Clinton's MD5 exporter? Or is it necessary to do this modification in a different application like MS C++ Visual Studio? I noticed that if I try to save or load a script the only option is to save it as a file with an XML extension. What precisely are we looking at when we view the text layout listed under the Methods Tab in the TS L E? Also, how is this text layout relevant to the actual exporter? Thanks.
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: Can rsobj scripts be edited in the Link Editor?

Post by froo »

Hi BNG.
I have not looked at the MD5 exporter but, I would suggest this.
Make a copy of that RsObj as a backup, in case you need to start from scratch.
You will most likely want to do this repeatedly, as you go along, creating
incremental versions. For example:

XSI_07022011.RsObj
XSI_07032011.RsObj

etc.

Clinton is most likely getting all the information you need **From** trueSpace:
triangle streams, vertex streams, vertex index streams, UV info, etc.

He is re-forming this data into structures which fit the MD5 format. Your task, then,
is to re-form the data into structures which BZII understands.

I would suggest this.
Load an object (say, a cube, since the geometry is very simple, and you can see how the data
is re-formed in the MD5 format).
Run Clinton's script, and load the MD5 file. Observe what it looks like.

Then, make a minor change to the output generated by his script.
Somewhere in his file :: write type statements, there will be constant strings, maybe a header
that says: 'MD5 exported by Clinton' or something. Change a piece of that to something else,
save the script, then re-run, and again observe the results.

That will give you an idea as to what is going on with the script.
Yeah that is really simple but at least it helps you discover where data is being written to the file.

We all gotta start somewhere!
User avatar
BNG
Chief Warrant Officer
Posts: 684
Joined: 16 Oct 2009, 03:26
Type the number ten into the box: 0
Location: Texas
Contact:

Re: Can rsobj scripts be edited in the Link Editor?

Post by BNG »

Thanks very much Froo. I will try as you suggest. I'm guessing I'll have to do quite a bit of slow progression changes to the existing script and see what develops from the original script and make small changes as I go along. I think that I'll stick with a simple textured cube with a few simple frames of animation. Something like a rotating textured cube. I know how to do all these things inn Truespace already. The key will be translating the file output to the old version 1 XSI ASCII text format that BZII uses. Animation support is important, but if I can only get static models working that's a good start. Later on I should have enough to see where the animation part can get possibly added.

If this works out then I'll try modifying an import script to create an XSI model importer, but that's just too far off to fret over at this point. As I said before this all is just a personal project, and I'm still trying to create a bit more interest on the BZII forum for using Truespace as a viable modeling option. I don't know everything about TS, so if I can get someone else over there to help by installing Truespace then it would help me get feedback from another BZII modder that will help me see things from an independent perspective. It's not absolutely necessary, but useful for help see things from another persons take on understanding TS better.
I'll post my progress if I make any headway on the project.
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: Can rsobj scripts be edited in the Link Editor?

Post by froo »

Sounds good BNG.
There are ways, in script, to step through the animation frames. But that should wait
until you get the geometry exported.
Remember, Clinton's script already exports the tS data to the MD5 format. So focus
on that area of the scripts: where the data is being written to the file. That's where
you will be making most of your changes, to export to XSI 1 format.
User avatar
BNG
Chief Warrant Officer
Posts: 684
Joined: 16 Oct 2009, 03:26
Type the number ten into the box: 0
Location: Texas
Contact:

Re: Can rsobj scripts be edited in the Link Editor?

Post by BNG »

I'm amazed with all this scripting stuff. Caligari did good with extending this awesome functionality for it's 3rd party developers. I just hope that I can make sense of it all. I envy you guys that have already grasp how to compile scripts in one form or another. It must be pretty satisfying when you see your hard work beginning to take shape.
Post Reply