sample c++/c#/Java code

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

sample c++/c#/Java code // New Users

1  |  

Post by lconklin // Apr 16, 2007, 4:53am

lconklin
Total Posts: 1
I am looking for some sample code or tutorial on getting a model out of TS and into some Code. (How do you move art out of TS and into code)


I am trying to build a screen saver and wish to develop a model in TS and than export it out of TS into my code. Any suggestions or links would be appreciated.

Post by TomG // Apr 16, 2007, 5:12am

TomG
Total Posts: 3397
You would need to start with the code and work backward.


Find some code that displays 3D models and use that to build your viewer. Most likely for this, the X format might be a good one to use (since DirectX is most likely how you will display your model).


Then model in tS, and export to X format. X format does have many variations and flavors so the export is a trickier issue than it might be with something more stable like OBJ (you could try and search in your language of choice and see if there is something to load OBJ for that language).


You may need the gamePak to get the latest X format export for tS, or you may find the native X format in tS good enough.


HTH!

Tom


EDIT - BTW the code to display it would be the same no matter where it came from - ie if you are loading and displaying an X format model, check the language you plan to use for the code to do that; or check to see if the code has routines to load OBJ if you want to use that format. That is the main part of what you will need to do, check the language you are using for routines to load and display 3D formats. After that it is mostly just a matter of saving out from tS to that format :)

Post by Asem // Apr 16, 2007, 5:46am

Asem
Total Posts: 255
Like TomG said you can use the x format if you have the directx sdk which is fairly easy to do when using it but that depends on the graphics sdk you are using if by chance it's opengl then you have to code an obj loader and to my surprise there isn't really a good one for free and most developers I see say to just code it yourself which I'm not saying the .obj format isn't easy to understand though and may be the best solution for later projects as you can add support for certain things that are particular to that format.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn