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 / Object texture path

Author
Message
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 19th Sep 2009 21:16
When you load an object with the command "load object", it's often loaded with its texture if it has one.

My question is how you do to know the texture path after you load an object?. there is some kind of variable that gets filled?
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 19th Sep 2009 21:35 Edited at: 19th Sep 2009 21:36
The texture has to be in the same folder as the model, otherwise you have to texture the model yourself. So by loading the model, you already have the path, it's the one that you used to load the model.

Rudolpho
19
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 19th Sep 2009 22:45
Is that really so, I believe the model files may indeed link to subfolders / absolute paths for the textures?

Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 20th Sep 2009 00:13
Quote: "The texture has to be in the same folder as the model, otherwise you have to texture the model yourself. So by loading the model, you already have the path, it's the one that you used to load the model.
"


Yes,
but we usually don't know the texture filename and I have to open many file types. What i need is the full path name.

Quote: "Is that really so, I believe the model files may indeed link to subfolders / absolute paths for the textures?"


I have to dig in each file type for the texture path or Darkbasic stores it in in some variable?.
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 20th Sep 2009 12:12 Edited at: 20th Sep 2009 12:12
Quote: "I have to dig in each file type for the texture path or Darkbasic stores it in in some variable?"


You can use the command limb texture name(obj, limb) to retrieve filenames.
To get the full path, you have to concatenate this filename to the directory of the object.

Sven B

Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 20th Sep 2009 15:01
Thank you so much. That was what I was searching for and couldn't find .

This is for AV, have you checked it?.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 28th Sep 2009 15:55 Edited at: 28th Sep 2009 15:55
Hi,
I used the command you said to me successfully but run into one problem.

When I load .x objects. The texture is found in limb 2 and in texture stage 1.

Why it isn't in the root limb 0?. Why limb 2 (Maybe because on how the object was build)?.
Textures stages in DBPRO start in 1?

Thank you so much.

AlfaX
Butter fingers
19
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 28th Sep 2009 16:54
Texture stages in DB start at 0.
Unless you are using dark lights on the meshes in which case your Diffuse switches to 1

How many limbs does your mesh has, are we talking about a static mesh with no skeleton, or an animated character?

I want robotic legs.
Alfa x
18
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 28th Sep 2009 17:12 Edited at: 28th Sep 2009 17:20
I tried with different objects.
The first one has 3 limbs.
Limbs 0,1,2.
The second one had more than 3 limbs (Didn't look for the exact number).
Both are .x objects made in blender and optimized with Direct X DxOps to binary.
Both objects have the same behaviour limb 2, texture stage 1. Texture stage 0 is empty when I use limb texture name(obj, limb).
I'm not using Dark Lights (yet, I plan to use it in the near future)


All the objects I tried are animated. Didn't try non animated .x objects.

Thanks you so much
Butter fingers
19
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 28th Sep 2009 19:25
I'm not on a computer with DB at the moment, but I'll do some tests when I get home.

I want robotic legs.

Login to post a reply

Server time is: 2025-06-24 05:49:32
Your offset time is: 2025-06-24 05:49:32