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.

Dark GDK / getting the texture name

Author
Message
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 31st Oct 2005 02:11
Hey, I finally wrote the .dbo exporter for my map editor so now you can build a level out of whatever custom doodads you decide to throw in the directory and then when you export it combines them all into one .dbo object and saves them off.

Unfortunatly, all geometrically the world turns out perfect its not textured :/ I was talking to Mike about it and he says its to do with dbMakeMeshFromObject() not carrying over the texture data and may be addressed in the future - however it may not be for a while so I am advised to explore methods of manually texturing the level.
Now i can texture the limbs manually if i can get the name of the texture from the original .x that the limb mesh was made from (quite a mouthful, also its gonna get real complicated with objects that have more than one texture/limb inside them..) but I'm really not sure how to do this. dbLimbTextureName() sounds perfeccccccccct, but it only works with objects that were textured by db and not with pre-textured external models :/
it seems the only option i have is when im running through the map and making meshes which are then added as limbs to the combined map file to get the object's filename (easy, stored in the map data) and to open it up and manually parse it, find the name of textures and then manually load and apply them to the limb. Im not even sure where to start though, and for the sake of ease-of-use for a third party using the editor it should be able to parse binary and ascii .x files.. im not even sure if that IS the best way to do this. and no idea how to handle multiple textures in one object.

Any pointers or at least information on parsing .x files, if that is the way to go?

VR2
19
Years of Service
User Offline
Joined: 14th Mar 2005
Location:
Posted: 8th Nov 2005 12:12
Rather than bother with reinventing the wheel and writing your own X file parser, I'd recommend you check out the D3DX library that comes with the DirectX SDK - it has a static method called something like "::LoadFromXFile", whereby you can grab structured data from the x file, amongst which is the texture name of each "Material" found. You can also get all colour and alpha information from this method while you're at it, and any effect files, basically everything you ever wanted to know about an X file but were afraid to ask

Login to post a reply

Server time is: 2024-11-19 02:44:04
Your offset time is: 2024-11-19 02:44:04