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 / Texturing an object made of many limbs?

Author
Message
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Aug 2010 01:32
I have managed to make an object out of many limbs, and it seems to be working fine with Sparky's collision, which was my biggest fear.

However, when I texture it, each limb receives the texture, instead of the texture covering the entire object as a single entity.

Can anyone tell me how I can texture this as if it were a single object?

Thanks.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Aug 2010 02:36
The texturing depends entirely on the UV coords - i.e. texture object and texture limb will have the same effect if you're using the same texture. So you need to think about how you've set up the UV coords. (This assumes I've understood you correctly. )
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Aug 2010 02:58 Edited at: 7th Aug 2010 02:59
I'll clarify a little.

I loaded 3 .X models and attached them as limbs to a dummy object. There are actually 300 of them making up this object.

Each limb of course has it's own UV.

So how do I remove the UV from all the limbs, and make just one UV set for the whole thing?

[edit]
If this gets to sticky I may change how I'm doing it, because it's dragging performance down slightly using an object with 300 limbs.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Aug 2010 12:55 Edited at: 7th Aug 2010 13:14
Quote: "So how do I remove the UV from all the limbs, and make just one UV set for the whole thing?"


What do you mean? Do you mean you want the UV data to be changed? If so, only you know the values you need.

Why do you want just one UV set?

Edit Perhaps you could illustrate your problem using an object made from say just three cubes. Then we can easily get on the same wavelength.
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 8th Aug 2010 01:22 Edited at: 8th Aug 2010 01:25
Ok. I'm taking 3 objects I made. One is just a flat plane, the second is a flat plane the same size with a hole in the middle, and the third is a cube the same size.

I'm assembling these together into a single object to make a game board that I then want to apply a single texture to the whole thing.

Right now, it applies the texture to each individual piece, and that is what I want to change, using DBP commands hopefully.

I'm doing it this way because I'm making a new board for each level by reading the level data from a text file, so they have to be built on the fly.

In the end it might be easier to just make a model in the modeling app for each board, but if this can work I would prefer it.



Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Aug 2010 01:54
Why don't you just work out the UV coords you need for each part of the model and use the vertexdata commands on each part to set the values you want?

Should be straightforward:

(U,V) = (0,0) is the top left corner of the texture
(U,V) = (1,0) is the top right
(U,V) = (0,1) is the bottom left
(U,V) = (1,1) is the bottom right.
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 8th Aug 2010 20:37
Never done that before, but ok.

Login to post a reply

Server time is: 2026-07-24 20:34:57
Your offset time is: 2026-07-24 20:34:57