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 / Multiple Textures on a .x model?????

Author
Message
Newbie12321
13
Years of Service
User Offline
Joined: 2nd Jul 2011
Location:
Posted: 3rd Jul 2011 15:39
hi i have made a terrain and now i would like to have a few 'enemy' bases around the place and i want it so the roof is a different color to the walls and the outside of the base is brick, and inside it like concrete floor, can this be achieved????
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 3rd Jul 2011 20:11
Yes. Here is an example. It also includes Sparky's Collision, so if you don't have it, you can't compile it. Just look at the code and run the executable to see what I've done to accomplish this.
Movement is controlled by the mouse movement. Mouse scroll back to zoom out. Up/Down key for foreward/back.

The fastest code is the code never written.

Attachments

Login to view attachments
Newbie12321
13
Years of Service
User Offline
Joined: 2nd Jul 2011
Location:
Posted: 4th Jul 2011 06:00
uhhh....i have a look but i can't find that code where u r actually applying the texture to the house when do u do this??
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 4th Jul 2011 07:47
When I created the "house" in 3dsMax, I assigned them there. I exported to a .x file in the media directory. The .x file has the textures assigned to the mesh so when GDK loads it, it also loads the textures and assigns them. This method is not something you would want to use if you had different objects using the same texture because it would be a waste of memory to load each of the textures more than once. To do it manually, do dbTextureLimb(...) on each of the limbs of the mesh and it will come out fine. The bigest problem is knowing which "limb" is which. You can assign unique names to each object within the scene (in 3dsMax) and then loop through the limbs in GDK:


The fastest code is the code never written.
Newbie12321
13
Years of Service
User Offline
Joined: 2nd Jul 2011
Location:
Posted: 5th Jul 2011 17:06
Muhahahaha, thank you i got it working with cartography shop, apparently it does it automatically i just make my level and texture the face and export it and it gives me images as well thanks alot

Login to post a reply

Server time is: 2024-11-19 09:40:13
Your offset time is: 2024-11-19 09:40:13