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 / Two textures on one .3DS object?

Author
Message
mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 11th Apr 2010 11:22 Edited at: 11th Apr 2010 11:22
I need know to how to apply two textures to one .3DS object. I'm asking this question in preparation for later when i finish my character so, No, I haven't tried it yet.

I need to apply one texture to my character and one texture to the sword but there both one object, Any help? Thanks!

---
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Apr 2010 11:28
In all programs, you can select differentes parts of an object and texture with several textures and not only two. What 3D program do you use?

cheers

I'm not a grumpy grandpa
mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 11th Apr 2010 12:37
Quote: "In all programs, you can select differentes parts of an object and texture with several textures and not only two. What 3D program do you use? "

I use 3DS max but i don't think you understand what i mean, My character, Takeo, Is fully UV mapped and rigged as one object, One texture. I'm going to make a sword for him as another object and, Therefor, Another texture. After i'm done with them i will import them in as one model, What i'm asking is how do i texture this one object with the character texture and the sword texture. Would i just use texture object then use it again? Thanks!

---
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Apr 2010 13:35
I have understood what you meant, and I repit that if you add another object to the main object a sword or whatever, you can add so many images(textures) to your model, and when you export Dbpro will be capable to texture your object with all images you had use in 3DsMax. 3DsMax, is the same program that I use.

In darkbasic Pro, you only have to load your model and Dbpro will load automaticaly all textures.If you want to apply a diferent texture to part of your modet...in this case the sword, you can do it as you have a model with to limbs

cheers

I'm not a grumpy grandpa
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Apr 2010 15:05
Usually the main issue is with re-texturing. I mean, if you have that sword as it's own limb with it's own texture then it'll be fine I'm sure - but you might not find it easy to change character textures etc if you do it that way - because when you have a bone animated character, limbs no longer allow you to retexture them.

What I would suggest is removing the sword and exporting your character, and then add just the sword object with code - glue it to the hand bone. As long as it's orientated correctly it should work just like your animation. Personally I don't see any gain in including the sword in the character model - why not have it so the character can have more than one sword, or different weapons even.

I would probably make a few weapons, a 1 handed and 2 handed sword, bow and arrow, staff, etc - and have each character animated with standard frames, so the same animation handling code would work on each character. Then you would have more options for weapons. Of course, it all depends on the sort of game you are making, the main hurdle in these types of games is the media, if you can handle the media, well the code that goes with that to get interchangable, several weapons is really not a big deal.


Health, Ammo, and bacon and eggs!
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Apr 2010 15:34
If we have a mesh with bones and the object...let`s say a soldat, has a second object as a sword, having the soldat one texture and the sword a second texture, it works perfect in Dbpro.

If we want to texture from darkbasic with code, we can as well texture the limb sword with a second texture.


Quote: "I would probably make a few weapons, a 1 handed and 2 handed sword, bow and arrow, staff, etc "


Yeaah...tha´s right !!, but you can do exactly the same from darkbasic pro, just hiding limb and positioning some othe objects as a gun or whatever you like in the limb position x,y,z.

Perhaps Van B method of exporting the model in a single mesh and then add limbs works ok, but adding an extra limb to the model and offseting it if the model rise up the arm is more hard to code than if you add from your editor an extra limb at the end of the arm just to position weapon on this hidden object.when the model move the arm, the hidden limb goes with the arm without code to offset this limb.

So that´s a cuestion of the way we preffer doing things, as both work at the end

cheers.

I'm not a grumpy grandpa
mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 11th Apr 2010 15:48
Thanks guys! Well, I did alot of designs for weapons in my sketchbook but thought it would be easier just for one weapon. How hard is it to glue it to the hand? I would love to get a store into my game and allow the player to have lots of weapons, A inventory etc. But i thought it would be one of those really hard things. How would i go about doing this then? Thanks

---
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Apr 2010 16:02
I preffer to make in 3dsMax the model and finaly add an extra limb at the end of the hand and export to .x then in Dbpro,hide this extra limb and position your weapon on the coordinates of this hidden limb.

This could be done as well with glue object to limb....so both methods are ok to make your model hold a weapon.

cheers.

I'm not a grumpy grandpa
mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 11th Apr 2010 16:34
Thanks mate! So, I'm using a biped for my models bones, Would i just use one of the default objects with it? There's those 3 check boxes with "object 1" "object 2" etc. Would i use those as the extra limbs?

---
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Apr 2010 17:36
if you add bones to your model, and it is a model of a single mesh...when you export your model to .x your model will have a lot of limbs with it, so you just position the weapon on the limb that correspond to the right hand of your model.


Download this example with objects with a single mesh, and adding a sword from darkbasic code.

cheers.

I'm not a grumpy grandpa
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Apr 2010 17:40
In my experience, you can't hide a bone, you have to scale it to nothing, so if you use a weapon on the model, then you'd have to scale it down instead of hiding it.


Health, Ammo, and bacon and eggs!
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Apr 2010 18:38 Edited at: 11th Apr 2010 18:40
Quote: "In my experience, you can't hide a bone, you have to scale it to nothing, so if you use a weapon on the model, then you'd have to scale it down instead of hiding it."


You don`t have to hide bones because the system itself doesn`t display them.However we can hide limbs if we export objects with several limbs.When we scale a bone, the whole hierarchy will be affected somehow, so we can never scale bones to nothing if we don`t want to destroy the object.

@Van B
I am not discussing Van B... please download my example and just check what I say.

Down here, I show you all , what hapens when we scale bones to cero

cheers.



I'm not a grumpy grandpa
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Apr 2010 18:47
Your talking about 2 different animation systems.

If you export a bone animated model, it has no 'limbs', each limb is a bone, and a bone can relate to any vertex on the model, so it cannot be hidden.

What your example does is exactly what I suggested in my first post, export the model with no weapon, then add the weapon with code.

If you had a weapon on the exported model, then you could find out the limb number, and scale it to nothing, and because it would have no child bones, it would just scale the weapon itself. I've used this before to hide limbs on bone hierarchy models, like heads, whole legs etc for gib effects. If you imagine your screenshot, the guy on the left just got his arm blown off .


Health, Ammo, and bacon and eggs!
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Apr 2010 19:21
Quote: "If you export a bone animated model, it has no 'limbs', each limb is a bone"


Quote: "CHAFARI SAYS
rotate limb 72,11,0,0,-20+rota#*2
rotate limb 72,31,0,0,-20+rota#*2
rotate limb 72,32,0,0,30-rota#
rotate limb 72,12,5,0,-20+rota#


rotate limb 72,3,0,0,20-rota#*2
rotate limb 72,21,0,0,20-rota#*2
rotate limb 72,22,0,0,20+rota#
rotate limb 72,4,-5,0,-rota#

rotate limb 72,19,-20+rota#,0,0
rotate limb 72,18,0,-10+rota#/2,0"


You can call them limbs or bones . The systems reads bones as limbs:

Its gonna be a long long they !!. I repit you that bones no one hide them but system itself doesn`t display them...Not me

Quote: "CHAFAARI SAYS Perhaps Van B method of exporting the model in a single mesh and then add limbs works ok, but...."


I`m with you, that problably it is better to export the mothel as a single mesh...I`m not discussing that.

Quote: "then you could find out the limb number, and scale it to nothing, and because it would have no child bones"


Aaahaa...you are right...you just can scale to cero if it has no child...I`m with you.

Finally...yeaaah...I cut the arm of that guy just tu demostrate that if we scale limbs(bones) to cero, and it has a child limb, this one will blow off as well.

From time to time....I like those speeches


cheers.



I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-26 14:30:57
Your offset time is: 2026-07-26 14:30:57