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.

Work in Progress / Plugin For Loading MilkShape objects In Dbpro

Author
Message
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 4th Oct 2011 06:24 Edited at: 5th Apr 2012 18:15
We currently developing a plugin for handling the loading of objects in DBPro. Also we have added some limb commands. So far we have 11 commands

SD Load Milkshape
Allows the loading of the .ms3d file. Make sure you clean the object in Milkshape before saving in MilkShape. Use the Tools>>Clean in milkshape.
Currently objects are loaded without animation,soon to be added.

SD Repair Hierarchy
Call this command after calling the load object command in Dbpro to repair the Parent/child relationships of the limbs of the object, which is a confirmed bug in Dbpro.

SD Set Limb Ambience
SD Set Limb Diffuse
SD Set Limb Emissive
SD Set Limb Specular
SD Get Limb Ambience
SD Get Limb Diffuse
SD Get Limb Emissive
SD Get Limb Specular
SD Set Limb Vertex Color


Download Here
http://www.stabinthedarksoftware.com/Downloads.aspx

The Dll requires the Microsoft Visual C++ libraries which can be downloaded at this link.

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5555

[img][/img]





[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 4th Oct 2011 20:28 Edited at: 4th Oct 2011 20:28
@ SITD,

Excellent.

If you can equally create plugin commands to export out to .ms3d file format (retaining limbs and animation) from within DBPro you have a seller in this, for certain.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 4th Oct 2011 22:22 Edited at: 4th Oct 2011 22:30
Important note groups in milkshape are loaded as seperate limbs in the order they are listed in milkshape. You can save the object in DBpro out to .dbo format.
Image above shows MilkShape objects loaded in DBpro with the native DBpro lights and shadows to show they are loaded in DBpro correctly.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 12th Oct 2011 06:47
Just wondering if anybody found this useful loading Milkshape directly in to DBPro. We are working on adding animation, but have been a little busy with our IDE.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 12th Oct 2011 07:48
@ SITDS,

I have found it v useful, owning Milkshape3D.

You've answered my potential query on animation - its inclusion would be v useful.

Could you expand a little upon what the "SD Repair Hierarchy" command does exactly vis-a-vis the DBPro Limbs structure?

Also, you're clearly v conversant with DBPro .dbo and Milkshape .ms3d file structure. Any chance of a plugin for Milkshape to import in .dbo objects? (doesn't hurt to ask)

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 13th Oct 2011 05:16 Edited at: 13th Oct 2011 05:18
Duffer,

Quote: "Could you expand a little upon what the "SD Repair Hierarchy" command does exactly vis-a-vis the DBPro Limbs structure?"


When loading an object using the “Load Object” command the parent relationship for limbs in a complex limb hierarchy are lost.

Group Entity (Limb 0)

Box1 (Limb 1) - Box2 (Limb2) - Box3 (Limb3)

Hierarchy
Using “Load Object”
Group Entity
Parent: -1
Child: 1
Sibling: -1

Box1
Parent: 0
Child: -1
Sibling: -1

Box2
Parent: -1
Child: -1
Sibling: 1

Box3
Parent: -1
Child: -1
Sibling: 2

After using “SD Repair Hierarchy”
Group Entity
Parent: -1
Child: 1
Sibling: -1

Box1
Parent: 0
Child: -1
Sibling: -1

Box2
Parent: 0
Child: -1
Sibling: 1

Box3
Parent: 0
Child: -1
Sibling: 2
You can use Matrix1 Utility Plug-ins “Get Limb” commands to get the limb relationships.

Quote: "Also, you're clearly v conversant with DBPro .dbo and Milkshape .ms3d file structure. Any chance of a plugin for Milkshape to import in .dbo objects? (doesn't hurt to ask) "


Making a .dbo import pluging for Milkshape is possible, we will look in to it in the near future.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 4th Nov 2011 04:45
We added 9 new commands for working with limbs of objects.
SD Set Limb Ambience
SD Set Limb Diffuse
SD Set Limb Emissive
SD Set Limb Specular
SD Get Limb Ambience
SD Get Limb Diffuse
SD Get Limb Emissive
SD Get Limb Specular
SD Set Limb Vertex Color

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
DevilLiger
19
Years of Service
User Offline
Joined: 21st Nov 2003
Location: Fresno,CA,USA
Posted: 5th Nov 2011 22:54
will it be able to save to .ms3d soon?

Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Nov 2011 13:27 Edited at: 7th Nov 2011 13:31
DevilLiger

I will assume that you want to save back out to milkshape, for a model that is in another format that you have loaded in DBPro.
Is that correct? We will add this, but we have to add animation first on loading milkshape objects then it will be easy to just reverse it to save back out.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
DevilLiger
19
Years of Service
User Offline
Joined: 21st Nov 2003
Location: Fresno,CA,USA
Posted: 9th Nov 2011 20:22
yes and thank you.

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 9th Nov 2011 23:10
@ Stab in the Dark software,

To be able to [load in and] save out milkshape objects retaining limb and animation would be fantastic...!

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Southside Games
12
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 22nd Nov 2011 20:01
I'll test this out when I can. is this why my tank model does not work? the turret rotates but the gun stays still.
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 3rd Dec 2011 22:20 Edited at: 5th Dec 2011 02:37
Example project for loading Milkshape objects and using Native DBPro lights and shadows.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Daniel wright 2311
User Banned
Posted: 3rd Dec 2011 22:31
This brings a whole new light on making games,if we are not restricted to just .x files for dirrect x then I belive gaming will go into a whole nother dirrection.

What you need to do? for all of us?

Do the same thing for 3ds max seans,make it to where we can load in whole 3ds max seans with lights and all and I would pay for it.

my signature keeps being erased by a mod So this is my new signature.
JLMoondog
Moderator
13
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 4th Dec 2011 01:30
This is actually an excellent idea. It's strange that it hasn't been done before as we see a lot of this pertaining to high end graphic programs and game engines.

BTW nice scene textures.

Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 4th Dec 2011 19:39 Edited at: 5th Dec 2011 03:25
We have researched 3Ds Max and the file formats which it can export a scene in.
The native “.max” format is a proprietary binary format and can not easily be imported by other software packages.
Other file formats which 3Ds Max can export a scene in can be more easily imported by other programs.
3ds max software can export to the collada file format using the open collada plugin.
The collada format can be exported and imported by many different 3d modeling programs.
We will investigate the possibility of loading the collada format in DBPro.


We are currently working on a command for importing Giles “.gls” files into DBPro.
We currently load the giles scene as one object with a limb hierarchy.
All entities are loaded and assigned a default place holder mesh.
Entities prefixes determine there color and size.
Attached is an example of our progress so far.



EDIT: The Scene was created in Giles which is a FREE program.
Here is the link for more info
http://www.frecle.net/index.php?show=giles.about

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Daniel wright 2311
User Banned
Posted: 4th Dec 2011 22:08
Quote: "Attached is an example of our progress so far.
"


this is way to cool, this is a usefull way to build a game for shure.I HOPE TO GET MY HANDS ON IT.

my signature keeps being erased by a mod So this is my new signature.
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 6th Dec 2011 16:02 Edited at: 6th Dec 2011 16:05
Daniel wright
We will be adding the command “SD Load Gls” to this dll as soon as we work out a few bugs.
 
Gile[s] allows the importing of these formats.
 
3dsMax ASCII scene export (.ase)
AC3D scene (.ac)
3ds studio scene (.3ds)
Direct X Mesh (.x)
Blitz 3D scene (.b3d)
 
One work flow that we have tested is to create parts of your level in MilkShape.
Export from MilkShape in the Blitz 3D format then import into Gile[s].
Then arrange your scene, create your entities, light map, and just load in DBPro.
Since we load the Gile[s] scene as one object it loads fast.
In DBPro you can query the names of limbs to manipulate the scene.  

In Gile[s] you can construct a limb hierarchy.
You can use the hierarchy to programmatically animate parts of your scene.
For example assign all the parts of an elevator to an entity then just move the entity.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Daniel wright 2311
User Banned
Posted: 6th Dec 2011 17:36
Quote: "In DBPro you can query the names of limbs to manipulate the scene."


So then If I place a character in the same sean, and this character has its own animations, would I still then be able to use this one object with its limbs? if so then all we need to do is create whole levels with our character where we want him,our enemys where we want them,and then code each linb for events?

my signature keeps being erased by a mod So this is my new signature.
Green Gandalf
VIP Member
17
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Dec 2011 18:14
Stab in the Dark software

I've sent you an email (well two actually - the first forgot the zip file ) containing a demo where your MilkShape loader messes up the UV mapping. I hope there's a simple explanation or solution as this plug-in looks really useful.
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 10th Dec 2011 23:34 Edited at: 10th Dec 2011 23:36
Green Gandalf,


We got your email and checked your example. There is a simple explanation,
before saving your model you need to clean the model with the clean tool in Milkshape.
It is located under Tools>>Clean.
There is another tool called Model Cleaner don’t use it.
We have found it does not work correctly.

We cleaned your model of the tree and it loaded ok.
We should have added this info to the top post sorry.

We are working on adding animation to the “SD Load MilkShape” command.
We found that it is easy to import a “.BVH” file into Milkshape and assign the vertices to the joints.
When we have it working 100% we will create a video tutorial on it.

Loading Gile[s] files will also be added soon.
You might be interested to try the exe example posted above.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
TheComet
15
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Dec 2011 00:04
What are the advantages of being able to load a MS3D file into DBP when Milkshape can just export it to a known format? Don't get me wrong, I think there is some great work behind this, I'd just like to understand what this is all about

TheComet

Green Gandalf
VIP Member
17
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Dec 2011 14:01
Stab in the Dark software

Thanks for looking at this.

I've sent you another email. In fact Tools/Cleaner does NOT work as desired for my model (it destroys the welding and gives a faceted model) whereas Tools/Model Cleaner DOES work (introducing just one minor seam). I've sent you the two versions of cleaned models to check. Thanks for suggesting the model cleaning tools. I hadn't thought of trying those.

TheComet

Quote: "What are the advantages of being able to load a MS3D file into DBP when Milkshape can just export it to a known format?"


My preferred format is .x but I can never get the simple x file exporters provided by MilkShape to work consistently (by which I mean I can never remember which particular set of options to tick - and MilkShape often crashes while using those exporters). I don't understand the other formats and since all the information you need is contained in the .ms3d file format why mess about with anything else? I think Stab in the Dark software is doing us all a big favour here.
Stab in the Dark software
Valued Member
19
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 11th Dec 2011 18:01
GreenGandalf,

We have been unable to duplicate the problem you encountered when using “Tools>>Clean”.
We tested the “TreeFork2Cleaned.ms3d” file, after welding all of the vertices and then going to
“Tools>>Clean” the vertex count went from 1728 vertices to 364 vertices and loads correctly in DBPro.

The “Tools>>Show Model Statistics” shows that your original model “TreeFork2.ms3d” file has 336 vertices
and when loaded in DBPro also displays 336. The “Tools>> Model Information V1.7” shows 364 vertices.

After welding all the vertices and then cleaning the “TreeFork2.ms3d” file both model statistics tools show 364 vertices.
When loading in DBPro the vertex count is also 364 and the model is loaded correctly in DBPro.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Green Gandalf
VIP Member
17
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Dec 2011 18:48 Edited at: 11th Dec 2011 19:05
Quote: "We have been unable to duplicate the problem you encountered when using “Tools>>Clean”."


Try the attached file which is my original object. That has 336 vertices and looks fine in MilkShape - but doesn't look right in DBPro.

If I select the whole object and use Tools/Clean then the object becomes faceted and has 1728 vertices. What do you get? The result for me is the “TreeFork2Cleaned.ms3d” file I sent you.

When I weld the vertices of that object as you suggest the vertex count falls to 305 - and the resulting model crashes DBPro with your plugin.

I can only get 364 vertices if I start from the attached original model and use Tools/Model Clean rather than Tools/Clean. I'm using MS1.8.5beta2 on one machine and MS1.8.5beta1 on the other. (The crash referred to above was using beta2.)

Perhaps someone else could test this model and help clarify these conflicting results?

By the way how did you weld the vertices? I merely had all four groups selected and used Vertex/Weld Together.

Edit **Correction**

Just tested this on my laptop which has MSbeta1. Tools/Clean does in fact produce 364 vertices on that machine and, as you say, the resulting object does load correctly in DBPro. So it seems something has been broken in the latest MilkShape beta.

Attachments

Login to view attachments
Daniel wright 2311
User Banned
Posted: 11th Dec 2011 18:53
No one answered my last question

my signature keeps being erased by a mod So this is my new signature.
Chris Tate
DBPro Master
14
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 11th Dec 2011 22:04 Edited at: 11th Dec 2011 22:07
Quote: "So then If I place a character in the same sean, and this character has its own animations, would I still then be able to use this one object with its limbs? if so then all we need to do is create whole levels with our character where we want him,our enemys where we want them,and then code each linb for events?"


Talking from a general standpoint; since I do not use MilkShape3d; I would say that your limbs can do most of what objects themselves can do. With enhanced animations, I believe you can animate limbs. Matrix1 also fills in alot of the holes in-terms of limb operations.

The only reason I avoid using limbs for major entities like characters and doors; is that certain plugins do not work with limbs; and limb expressions such as Limb Position XYZ and similar, are not as fast as object expressions. If you needed to operate on the level; your operations will affect all of the entities inside of it, unless an option is provided to skip child limbs.

It is down to how you organize your entity management system; but for me, I like to treat entities that depend upon another entity, as limbs; and entities that do not depend on anything, as objects.

If you wanted to convert limbs to objects; or back again, you can do so according to the name of the limb; or according to what parent limb they have; anything you can use in a conditional expression really. Limb names do not need to be used as just names.

Limbs can also contain references to properties; or can literally contain properties in the name. So a light bulb could contain a property such as -Light. Using string search, one could create a light at the position of the limb. The same applies to Physics, AI and Cameras; all of these things can be created at the location of certain limbs.

Finally, you can also place inner maps at the location of a limb; so you could produce rooms as seperate files, and place them at doors. When in the room; the outer map can be excluded whilst the character cannot see outside.

Things like this are handy because there is no need to explain much to the computer; just load it at the position of the limb.

Daniel wright 2311
User Banned
Posted: 11th Dec 2011 22:41
Quote: "Finally, you can also place inner maps at the location of a limb; so you could produce rooms as seperate files, and place them at doors. When in the room; the outer map can be excluded whilst the character cannot see outside.

Things like this are handy because there is no need to explain much to the computer; just load it at the position of the limb.
"


Thanks,makes sense,cant wait for the compleate version.

my signature keeps being erased by a mod So this is my new signature.
gwheycs62egydws
13
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 26th Dec 2011 20:55
hi

any chance you post and example of loading up the file from MilkShape 3d ?

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
13
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 26th Dec 2011 21:04
never mind ;oP

I found the example ;o)

to move side ways - is to move forward
Since a Strait line gets thin fast
DarkDISCUSSION
11
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 15th Jan 2012 04:06
How do I install this?

Monsters are Ready to spill their Dark Sercrets......
DarkDISCUSSION
11
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 15th Jan 2012 04:25
Never Mind, I figured it out.

Monsters are Ready to spill their Dark Sercrets......

Login to post a reply

Server time is: 2022-12-05 03:39:48
Your offset time is: 2022-12-05 03:39:48