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 Discussion / Multiple Textures

Author
Message
Spotaru
18
Years of Service
User Offline
Joined: 3rd Dec 2006
Location: Over the next rise.
Posted: 11th Jun 2008 17:37
A DBC user has asked me how to load the free castle by Spotaru into DBC. I don't use DBC, so I don't know how to answer his question. When the model is loaded it's just white with no textures. I don't think Texture Object will work because the model has 23 different textures. Can anyone tell us how he can get the textures applied to the model?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 11th Jun 2008 19:47
Very difficult to say because you've supplied almost no imformation. A couple of things to consider, the image files (textures) have to be in the same folder as the .X file. All files referenced inside the .X file can only have a maximum of 8 characters for the name and 3 characters for the extension (graybrck.bmp for example).

It also depends on the 3d modeler used to make the castle. Was the castle textured originally? Were the correct export options used, etc.

Enjoy your day.
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 12th Jun 2008 03:35
I was the person who asked the question!
The textures were in the same folder as the model. I'm not sure if the textures were referenced in the .X file or not, although I was assuming that they were (apparently they're not). I have the .X file attached.

Attachments

Login to view attachments
Spotaru
18
Years of Service
User Offline
Joined: 3rd Dec 2006
Location: Over the next rise.
Posted: 12th Jun 2008 04:08
I built the castle model. refer to this thread:
http://forum.thegamecreators.com/?m=forum_view&t=121808&b=3

All textures are in the same folder as the download. Yes, the textures are referenced in the .x file. I didn't use the 8 character naming, because most programs and systems stopped having that limit many years ago. (maybe the problem, may not be, I don't know) If DBC still has this limit, just rename the textures and open the .x file with notepad and change the texture references to match.
The model loads with all textures in every program I own. Opens with all modelers, uv mappers, terrain editors, animators, renderers, DGDK, and DBPro. I don't own DBC, so I haven't a clue why it would be different. That's why I asked the question here.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 12th Jun 2008 09:56
It's 8 megs, a bit too large for me to want to download.

Quote: "I didn't use the 8 character naming, because most programs and systems stopped having that limit many years ago. (maybe the problem, may not be, I don't know) If DBC still has this limit, just rename the textures and open the .x file with notepad and change the texture references to match."


DBC is based on directx 7 and because of this I think the 8.3 convention is adhered to. Here's an excerpt from the LOAD OBJECT command description in the manual:

Quote: "If your model file contains texture information, you need to make sure the texture bitmaps are located somewhere within the same directory as your model file. You should also be aware that the X file format only supports bitmap texture filenames in the 8.3 format. This means your texture filenames should be truncated to its first eight characters and end with a '.bmp' extension."


Enjoy your day.
steveb
16
Years of Service
User Offline
Joined: 12th Jun 2008
Location:
Posted: 13th Jun 2008 01:44
To be able to load x models from different sources with textures in dbc i usually
go through the following routine.
1 make sure x file is in text format(can be changed using meshview)
2 put textures in same directory as model
3 rename textures to 8:3 format
4 convert jpg textures to bmp
5 load x file into wordpad (can handle bigger files than notepad)
6 first texture can be found by searching for "
7 do a search and replace on texture filenames replacing old texture references with new reference (for example "c:/model/house/b_brick_2.jpg" would become "brick.bmp"
8 save file as( a new file name would be wise)

This works for me

steve

Login to post a reply

Server time is: 2025-06-06 00:23:25
Your offset time is: 2025-06-06 00:23:25