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 / "Limb Material Name()" command for X file

Author
Message
pdq
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 30th Jun 2013 21:02
Is there a plugin to get the material name?

And I don't mean "limb texture name()"

Thanks.
pdq
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Jul 2013 03:00
Quote: "And I don't mean "limb texture name()""


Why use a plugin when limb texture name() works fine, and comes with Darkbasic Pro...it can give us the texture name of every limb in a loaded .x

I'm not a grumpy grandpa
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Jul 2013 03:10
I'm assuming you want the material name because it can contain variable texture names.

Quote: "Material material_1
{
1.0;1.0;1.0;1.0;;
11.3137;
1.0;1.0;1.0;;
0.0;0.0;0.0;;
TextureFilename
{
"case_1.png";
}
}"


Couldn't tell ya; I have no idea how you are going to do that without parsing the .X file manually.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Jul 2013 03:42
@Chris Tate

Yeah...this is a good way to check limb texture name, but if we want to automatically add a Dbo to a Dbo...let say we have a Dbo island, and we want to add a complete Dbo house with all its limbs...doors , windows, stairs and so on....we can make a function to make every limb into mesh and then add every mesh to the island, but now we need to load automatically each texture....the function check limb texture name to exist, and then load texture to apply to the new limb. I suppose this command could be usefull here.If we make a mesh from the whole house, we lose textures of it.

I'm not a grumpy grandpa
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Jul 2013 04:02
I use the limb texture name command in many features in my game; it's one of the most used limb functions in my game.

But as for the material, there is no command to get the directx material name as far as I can see.

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Jul 2013 04:26
I see....I jumped the gun again... he meant the material ?... that means the limb colour ??

I'm not a grumpy grandpa
pdq
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 3rd Jul 2013 17:25
Quote: "
Quote: "Material material_1
{
1.0;1.0;1.0;1.0;;
11.3137;
1.0;1.0;1.0;;
0.0;0.0;0.0;;
TextureFilename
{
"case_1.png";
}
}"
"


So I am looking for a function that returns "material_1"

Limb Texture Name() would return "case_1.png"
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 5th Jul 2013 07:03 Edited at: 5th Jul 2013 07:04
Quote: "I suppose this command could be usefull here.If we make a mesh from the whole house, we lose textures of it."
. In a situation like this I normally make a greater object oriented data structure. I say this for a lack of a better term.

I'll store all of the actual objects separately and in a separate file i'll store all of the object path names, their relative positions from a common center, the texture paths, and any other properties. Other things might include a shader, sensitivity to light or fog, culling, transparency mode, collision data. So it solves more than just this texture/mesh problem. For convenience I'll create an editor just to manipulate and save these object group files.

I'll call this complex structure a prop. It will then be a single placable object (in the loose sense) in a level editor. All I'm doing here is structuring all this stuff so the work is broken down into workable automatable parts. Then I don't have to worry about weird mesh conversions and file parsing that may be at the mercy of the format or style of the modeling editor exporting the file.

Standing back and looking at the bigger picture...

Login to post a reply

Server time is: 2026-07-06 18:36:27
Your offset time is: 2026-07-06 18:36:27