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.

DarkBASIC Professional Discussion / Graphics on a 3D model

Author
Message
kingklw17
15
Years of Service
User Offline
Joined: 6th May 2011
Location:
Posted: 6th May 2011 18:24
Every time I try to texture my object, it turns the object the main color of the bitmap, but the actual bitmap wont go on it. Please tell me what I am doing wrong.


Thank you if you can help.
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 6th May 2011 23:51
Well, that's 99% this is because the UV data isn't how it is supposed to be. Try correcting it in your 3d editor.

-In.Dev.X: A unique heavy story based shoot'em ~25%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 7th May 2011 03:13
Usually .x files have their textures in the same directory as the file and load up with the object. They also should scale with no problems either. If you're not getting any texture loading with the object then check if the exporter is saving the textures with the file and also in the same directory. Some exporters will put the textures in separate directories.

Warning! May contain Nuts!
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 7th May 2011 07:42
Hi kingklw17, I would have to agree with Quel in that it is likely your model does not have any UV mapping data.
UV mapping is the process of defining which parts of an image "fill" each of the polygons in your model.
To test this try using a texture which is entirely white, all except the most upper-left pixel (0,0). I would expect your entire model to become which ever color you choose for this pixel, and that is why the model seems to become the "main color of the bitmap".
If that is indeed what is happening, then it is because every vertex in the model has UV coordinates of (0.0,0.0) and that specifies the upper-left corner of an image.

Login to post a reply

Server time is: 2026-07-11 02:36:59
Your offset time is: 2026-07-11 02:36:59