get a model out of truespace

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
linklink8
Gnoblar
Posts: 5
Joined: Tue Aug 30, 2005 1:48 pm
Contact:

get a model out of truespace

Post by linklink8 »

I'm a Truespace user , I made some search on the forum , it looks like there is no solution for exporting a model out of truespace to mesh file ?

Anyone has gone thru this ?

Thanks

Link
Tyn
Gremlin
Posts: 195
Joined: Mon Jul 19, 2004 11:40 pm
Location: England
Contact:

Post by Tyn »

Really? What did you search for? I found it by just searching "Truespace" (although I did admittedly only search because I remembered the thread ).

http://www.ogre3d.org/phpBB2/viewtopic. ... =truespace

HTH.

Edit: Actually, reading it, it looks like it could be still in the works, sorry. Prehaps you could help out? I've only used Truespace once like 4 years ago, I can't really remember what you can export with it, but if you could export it to a format to load in Blender, you could get it to a .mesh from there.
"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams

http://www.spacecolonization.net
2080: Space Colonization
computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz »

Hello. I am the developer of the Truespace plugin. Yes, it's still under development...and development is going pretty slow.

I primarily program business programs, and about a year ago I got interested in 3D programming. I've been using TrueSpace for about 7-8 years now for animations.

You can try out the plugin, but it's far (really far) from perfect. It will export out a mesh, but the normals are all wrong.
There are 10 kinds of people that understand binary....those who do....and those who don't.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Which version is it for?
computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz »

It's for version 5.2 (since that's what I have), but it probably could compile against version 6 libraries. I did fiddle around with version 3's libraries, but it takes a bit of tweaking to get it to work with TS3. But with all versions, it will still have the problem with the normals not calculating out correctly.
There are 10 kinds of people that understand binary....those who do....and those who don't.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

I have 5.2, I can take a look at it (won't be tonight, but in the near future).
computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz »

Wow...I guess it's been a while since I worked on the code...the normals work fine...just that they're all smoothed (I must have fixed it...) Also...apparently I had to zoom out on OgreMeshViewer, because it was zoomed in too far, and cutting off some of the corners of my objects (and it made me think it was the normals that were messed up.) Gotta hate stupidity errors...lol.

Well, now that I have the code in front of me again, I'll start looking into getting materials to export...since that will make the plugin much more interesting to use.

xavier: If you happen to have any experience with using joints, bones, and skeletons within Truespace, could you let me know? That's the only thing I have yet to learn. And, if you happen to have a sample of a model with a skeleton, could you send it my way?
There are 10 kinds of people that understand binary....those who do....and those who don't.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

I don't yet; I mostly use Blender when I do model, but Caligari was begging me to buy this thing for $89 so I did. Some of the modellers on my team use it so I figured I might as well. ;)

I plan to dive into it sometime shortly after the new year, but I've actually had no specific experience with it yet. Reason I said I'd take a whack at the exporter is because I'd have to soon anyway. :)
computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz »

I have some great news folks. It appears you can get a lot done when you actually have some free time. I got the plugin working a bit better...and it somewhat exports materials!!!!! Here is a screenshot directly from OgreMeshViewer:

Image

(The monkey is from one of the free 3D sites...just in case you wondered.)

I'll be committing the code soon. The only problem with the updated code is that it's two-stage. First, you use the plugin to export two files. Then, those two files have to go through a separate program that I wrote that reorganizes the xml file so that the materials can be applied. But, at least it can export!!!

All vertices are still smooth...I'm working on it.
There are 10 kinds of people that understand binary....those who do....and those who don't.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

I noticed the creation of the exporter directory in the CVS mailing list tonight...lucky you ;)

When I get a chance I'll help test out and perhaps even help develop the thing if you want (at least for 5.2).
computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz »

Hey xavier,

Did you happen to take a look at the exporter? I know it's kinda awkward having to do two separate processes to get the exported objects, but I'm primarily a .NET developer (used to be a C++ man...but then I found the Framework...and it changed me...don't know if for good or bad yet...lol.) Too bad Caligari hasn't came out with a wrapper for their API that works with .NET....

Do you happen to know how joints, bones and IK work? I'm completely a novice when it comes to that.
There are 10 kinds of people that understand binary....those who do....and those who don't.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Nope, I am very much a TS novice... :(
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

computerwhiz wrote:I'm primarily a .NET developer (used to be a C++ man...but then I found the Framework...and it changed me...don't know if for good or bad yet...lol.)
It's not a bad transformation...until you decide to go the back the other way! ;). Been doing C# for about 4 years now, but did C++ for several years quite a while back. Getting used to C++ again is taking me a bit :).

I'm not familiar with with TrueSpace, but what exactly are your options?

It sounds like you used an existing plugin that exports an XML file and then wrote a .NET program to convert this XML to something usable (XML in .NET is fun stuff :)). Is this existing plugin a DLL? Do they provide the source code to it or have an SDK for writing these plugins?

If the plugins are DLLs, I would guess the EASIEST way to go from an unmanaged DLL to a managed .NET assembly would be to expose your assembly as a COM object. C# to C/C++ usually just uses the interop stuff, but going the other way seems easier via COM in my opinion.

My brother owns a copy of TS, I think version 6... I keep trying to convert him to XSI (which is what I use to create my awesome programmer art).
computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz »

Well, I used sample code from Caligari to get started, then expanded from there. The plugin is a DLL written in C++, and it's not a COM object...just a DLL with pre-determined functions in it that Truespace knows how to load. The main reason why I did the 2nd part in .NET is because .NET has collections, and they're a pain in the arse to implement in C++ (What can I say...I'm a lazy programmer...lol.)
There are 10 kinds of people that understand binary....those who do....and those who don't.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

A bit OT here...I'd have to say that depending on the STL container you used, iterable collections in C++ are no more difficult than in C#. You can even leverage the Microsoft Dictionary COM object if you want lookup-table collections.
computerwhiz
Kobold
Posts: 37
Joined: Mon Nov 29, 2004 8:51 pm

Post by computerwhiz »

Bah! I forgot about the dictionary object...I used to use that back in my VBScript programming days...lol. Thanks xavier.

Maybe sometime in the near future I'll look into doing that. I have another project coming up for school...designing a RTS game using neural networking...should be interesting. (Now I'm waaay off topic...lol.)
There are 10 kinds of people that understand binary....those who do....and those who don't.
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

computerwhiz wrote:The plugin is a DLL written in C++, and it's not a COM object...just a DLL with pre-determined functions in it that Truespace knows how to load.
Just to be clear on what I was saying if you ever decide to come back to this:

The easiest way I've seen to go from a straight DLL interface to something calling .NET code is having that DLL interface call a COM object. Turning your assembly into a COM object is pretty easy. Then you just have the straight DLL plugin essentially forward those calls to the COM object (which is written in .NET).

I've used that approach on a couple of projects which required a DLL interface. It allows you to write all of the heavy lifting in C# and create a super simple C++ wrapper around COM calls to your C# assembly.
Post Reply