Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Help me, Model coloring!

Author
Message
AlphaDog123
12
Years of Service
User Offline
Joined: 23rd Dec 2011
Location:
Posted: 23rd Dec 2011 22:07
I don't know why, but when I load a model into my game that I have made it is always just a grey color. In all of the examples I have looked at the best I can figure out is I need to load an .x file and it should load the model with coloring but it doesn't. Could someone help me with this.

I know it is really probably a simple concept, but I can't seem to figure it out. I would appreciate some quick answers.

Thanks,
AlphaDog123
nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 24th Dec 2011 08:44
The grey colour is the default textureless/colourless state for any new objects created/loaded in DBPro's engine. Was your model "coloured" with a texture or just a straight-up coloured when you created and saved it? This may effect which option to choose, anyway:

Try using the extra parameters when loading the object, ie:


If this doesn't work and it's only a colour you want, you can always use DBPro native commands to re-colour it.

72 97 112 112 121 32 72 111 108 105 100 97 121 115 32 112 112 108 33

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 24th Dec 2011 16:45
Hi AlphaDog123, and welcome to the TGC forums.

Coloring an object (model) can be easily done by coding the following:



Note, ObjectNum is the number of your object. This code will color it red. You can help the color to show up better by using the following:





AlphaDog123
12
Years of Service
User Offline
Joined: 23rd Dec 2011
Location:
Posted: 24th Dec 2011 19:28
Thank you for you coment, but I was looking at the miko loading example in DBP, and I think I found my problem. I didn't see that it loaded the ".TGA" file as well. I copied the tutorial files, and omitied that one and miko turned out grey.
Thank you for the other information though it will be helpful in the future.

New question, does anyone know how to save a ".TGA" File?

Thank you for your time,
Alpha
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 24th Dec 2011 22:32
Quote: "Was your model "coloured" with a texture or just a straight-up coloured when you created and saved it?"

We need to know the answer to this question.

If you straight-up coloured it in the editor then you should be able to just load it in and the colouring should appear.

If you applied a texture to the object (so used an external image) then you'll need to atleast have that image file in the same folder as your .x model. If that still doesn't work then you may have to load the image into the program as well and use the TEXTURE OBJECT command.

I've attached a small project to demonstrate this.

With .tga's I believe the modeller/graphical editor needs to create those. So it might be an option in your modeller.

Attachments

Login to view attachments
AlphaDog123
12
Years of Service
User Offline
Joined: 23rd Dec 2011
Location:
Posted: 25th Dec 2011 03:55
It was a texture not a single color. I think that I understand now. Thank you all.

Login to post a reply

Server time is: 2024-11-25 07:11:49
Your offset time is: 2024-11-25 07:11:49