get a model out of truespace

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.

get a model out of truespace

Postby linklink8 » Wed Aug 31, 2005 10:46 am

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
linklink8
Gnoblar
 
Posts: 5
Kudos: 0
Joined: 30 Aug 2005

Postby Tyn » Wed Aug 31, 2005 12:44 pm

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
Tyn
Gremlin
 
Posts: 195
Kudos: 0
Joined: 19 Jul 2004
Location: England

Postby computerwhiz » Sun Dec 25, 2005 10:45 pm

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.
computerwhiz
Kobold
 
Posts: 37
Kudos: 0
Joined: 29 Nov 2004

Postby xavier » Mon Dec 26, 2005 12:06 am

Which version is it for?
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 9481
Kudos: 23
Joined: 18 Feb 2005
Location: Dublin, CA, US

Postby computerwhiz » Mon Dec 26, 2005 1:50 am

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.
computerwhiz
Kobold
 
Posts: 37
Kudos: 0
Joined: 29 Nov 2004

Postby xavier » Mon Dec 26, 2005 3:33 am

I have 5.2, I can take a look at it (won't be tonight, but in the near future).
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 9481
Kudos: 23
Joined: 18 Feb 2005
Location: Dublin, CA, US

Postby computerwhiz » Mon Dec 26, 2005 4:15 am

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.
computerwhiz
Kobold
 
Posts: 37
Kudos: 0
Joined: 29 Nov 2004

Postby xavier » Mon Dec 26, 2005 5:15 am

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. :)
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 9481
Kudos: 23
Joined: 18 Feb 2005
Location: Dublin, CA, US

Postby computerwhiz » Thu Dec 29, 2005 7:50 am

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.
computerwhiz
Kobold
 
Posts: 37
Kudos: 0
Joined: 29 Nov 2004

Postby xavier » Thu Dec 29, 2005 8:44 am

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).
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 9481
Kudos: 23
Joined: 18 Feb 2005
Location: Dublin, CA, US

Postby computerwhiz » Thu Mar 16, 2006 5:27 am

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.
computerwhiz
Kobold
 
Posts: 37
Kudos: 0
Joined: 29 Nov 2004

Postby xavier » Thu Mar 16, 2006 7:04 am

Nope, I am very much a TS novice... :(
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 9481
Kudos: 23
Joined: 18 Feb 2005
Location: Dublin, CA, US

Postby Kentamanos » Thu Mar 16, 2006 8:19 am

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).
User avatar
Kentamanos
Minaton
 
Posts: 980
Kudos: 0
Joined: 07 Aug 2004
Location: Dallas, TX

Postby computerwhiz » Thu Mar 16, 2006 11:26 pm

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.
computerwhiz
Kobold
 
Posts: 37
Kudos: 0
Joined: 29 Nov 2004

Postby xavier » Fri Mar 17, 2006 12:09 am

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.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 9481
Kudos: 23
Joined: 18 Feb 2005
Location: Dublin, CA, US

Postby computerwhiz » Fri Mar 17, 2006 12:34 am

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.
computerwhiz
Kobold
 
Posts: 37
Kudos: 0
Joined: 29 Nov 2004

Postby Kentamanos » Fri Mar 17, 2006 1:11 am

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.
User avatar
Kentamanos
Minaton
 
Posts: 980
Kudos: 0
Joined: 07 Aug 2004
Location: Dallas, TX


Return to Artists & Content Creators

Who is online

Users browsing this forum: No registered users and 10 guests