Rendering all colors into textures?

Game Engines, Projects and more
Post Reply
slicer4ever
Petty Officer Second Class
Posts: 22
Joined: 29 Jun 2009, 03:02

Rendering all colors into textures?

Post by slicer4ever » 28 Sep 2009, 21:34

hello, i'm new to this forum, i've been using truespace for a while now and can model some things but i'm still fairly limited in what i can do.

now then onto my problem, i'm also a game developer in c/++, and i've written a .x format parser since .x format encompasses my needs, and i use openGL for rendering, upon writing the parser i determined that it would be easier to force all my models to contain a texture rather than allowing both to run seamlessly this was done for speed reasons and was the best choice, however i'm now at a point where i have two options

the first option is to use the exported model and determine if a material does not have a texture, if it doesn't then i will use it's given vertex colors and manually create a texture in memory so that each object does not go without a texture

the second option is the one i would rather go with, which is telling truespace to take any plain color materials and rather than in the .x format specifying a color to instead actually create a texture out of the color and then link to that texture as if i had used a plain color for a texture

if the latter option isn't possible then i'll simply go with the first, and i do hope i made my question clear, if not i can try explaining it better, and sorry if this is in the wrong section.


edit: i feel really stupid, i've been exporting with truespace 6 direct x implementation, which is what my parser is based on, i just realized the truespace 7.6 menu exports differently, meaning that my parser is now dependent on only truespace's direct x 6 implementation, so i'm going to have to write a parser for a diffrent format, the rsObj format looks nice but i can't find any specifications on it, any help appreciated

User avatar
tamtam
Petty Officer First Class
Posts: 43
Joined: 26 Aug 2009, 19:13

Re: Rendering all colors into textures?

Post by tamtam » 11 Oct 2009, 03:21

the second option is the one i would rather go with, which is telling truespace to take any plain color materials and rather than in the .x format specifying a color to instead actually create a texture out of the color and then link to that texture as if i had used a plain color for a texture
Couldn't you use the Bake Textures From Illumination button on the rendering menu in the model side, and apply the textures generated from that button in TS? It's easy: select your model in your scene, and make sure there is enough light from all sides of the model you want to export, with the material you want, applied in TS on the model. Then you must export your model too. I'm not sure if TS7.6 can export .x files from the Model side or Workspace side natively, but probably both sides could export .x files.

I hope I helped you.

User avatar
nigec
Master Chief Petty Officer
Posts: 561
Joined: 21 May 2009, 18:46

Re: Rendering all colors into textures?

Post by nigec » 11 Oct 2009, 13:37

You could have problems with bones animation from modelside but textures are ok, animation works fine from workspace but textures may not show, is DAE an option? that usually works

slicer4ever
Petty Officer Second Class
Posts: 22
Joined: 29 Jun 2009, 03:02

Re: Rendering all colors into textures?

Post by slicer4ever » 11 Oct 2009, 19:56

don't worry guys, i've figured out a solution to my problem=-), but thanks for the help

Post Reply