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 / Gluing Multiple Limbs Together

Author
Message
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 20th Aug 2013 10:13 Edited at: 20th Aug 2013 11:03
I'm thinking about upping the detail level on some character models. Currently characters can swap clothing pieces like saints row or an mmo. Currently I use a combination of glue object to limb and remodeled versions of the character body to create a wide variety of customization.

Remodeling the character body sucks since if you try and tweak anything you need to tweak like every variant and version in the exact way. Not realistic. Glue object is great, you can slap hockey pads on to someone or stick a cane in their hand no problem. Except its real simplistic.

However it would be better if I could model a whole pair of pants or a skirt and link multiple limbs between the objects together. Glue multiple limbs to a body frame. Perhaps even hide or delete some of the body limbs being covered by the clothing. This would allow me to keep the body as one single standard file.

I haven't looked into this yet on my own, but I thought I\'d make a post and see if there\'s a smart way to doing this.

Thanks.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Aug 2013 10:52
It's been a long time, but I think these commands are the answer to creating hierarchical relationships between objects:

add limb
link limb


You'll need to texture the limb manually with its original texture (because you're adding it as a mesh and it'll lose its texture in the process), but that's the only downside. You can still use shaders and all of that good stuff afterwards.

If you don't require hierarchy, I suggest going with gluing the objects - it's the easiest way.

TheComet

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 20th Aug 2013 11:11 Edited at: 20th Aug 2013 11:12
I never use texturing built into object files, I always manually texture everything.

Are you saying that I need to convert a clothing object with its multiple limbs to a mesh and then add/link it to the characters body object?

You said the clothing piece will lose its texture and must be textured again. Does this mean it can continue to use a separate texture from the body object, or does this process cause the clothing to assume the body's texture?

Thanks.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Aug 2013 11:56 Edited at: 20th Aug 2013 11:58
Quote: "Are you saying that I need to convert a clothing object with its multiple limbs to a mesh and then add/link it to the characters body object?"


If you wish to build a hierarchy more complex than a single node, then yes. Otherwise, I'd suggest using "glue object to limb".

What exactly is the issue you're having with gluing? You said it's simplistic, could you perhaps explain more in-depth of what you mean by that?

Quote: "You said the clothing piece will lose its texture and must be textured again. Does this mean it can continue to use a separate texture from the body object, or does this process cause the clothing to assume the body's texture?"


My suggestion is you could load the clothing and accessories as a mesh to begin with, using the command load mesh (instead of load object). DBP will load the mesh without loading or linking any texture data, so when creating an object from the mesh, it'll just be white.

Adding a mesh to an existing object as a limb doesn't change this property, it will remain white. The only exception is if you texture the host object with a new texture after adding the limb, the limb will assume the texture of the host object.

You can however re-texture the limb with a different texture at any point in the future.

[EDIT] Do note that I am a little rusty, and you may have to do some simple tests to confirm.

TheComet

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 20th Aug 2013 12:28 Edited at: 20th Aug 2013 12:34
My intention is to add clothing to a character body and to have the clothing deform with the character body as it animates.

Such as adding a jacket as a single object to the characters body. If it were merely glued, then the jacket would not animate with the character. If it could be linked to multiple limbs of the character body, then it would.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Aug 2013 13:31
I see.

Well, here's some food for thought. What I found works quite well is using the command glue object to limb to glue things to "imaginary" limbs. For example, here is a pony from my game without wings, but the skeleton for wings is there and animated (marked in red). These limbs aren't visible, but you can attach things to them in DBP.



In the game, you can glue the wings on afterwards:



Another example for imaginary limbs, I needed a way to glue a smoke effect to one of my units, so I created the limbs for where they should be placed (marked in red):



The result:



The glued objects will rotate and translate along with the animation of the object.

TheComet

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 21st Aug 2013 08:06 Edited at: 21st Aug 2013 08:06
I'm effectively trying to link the wings as a single object to all of those wing limbs of the body so when the body animates, the wings will flap around precisely linked to the body's animated limbs.

To glue a single object to multiple limbs of another object, instead of just one limb. Linking limb to limb instead of entire object (limb zero) to limb.

Like giving the pony a full body suit and linking the suits limbs up with the knees feet neck torso etc limbs of the body.

I could split the pieces up and add them limb by limb but this would create very visible seams in the shading and lighting.

Thanks.

Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 21st Aug 2013 14:54 Edited at: 21st Aug 2013 14:56
How has the bone performance been when running the program?

I remember TheComet having issues with performance, and I am now experiencing them myself; having to export multiple levels of bone detail for each character. One bone structure that can create facial expressions, and another without; and another without bones for clothing and body scale.

When I first started I had this idea that providing clothing with their own bones would solve the problem; sharing the translation of the character object. But DBP cannot handle many bones; at least when in the camera frustum.

I am considering running tests simulating real cloth using a physics plugin, and attaching simple cloth manipulators on each bone. It will be a few months before I begin the test.

For static clothing, I am using a mixture of bump mapping and vertex shading to 'puff out' the bulky pronounced materials.

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 21st Aug 2013 17:32
Quote: "How has the bone performance been when running the program?"

I noticed that Enhanced Animations is a lot slower than the built-in animation system. It's faster for loading objects, and more convenient how it handles loaded animations.

150 people walking around with about 20 bones each and I start seeing 4-5ms just to update all of their animations. Particularly setting the animation speed of all things is horrendously slow. The player uses the same code as AI to animate walking and it's a variable walk speed. So every loop anyone walking has their walk speed set. I had to hack it up when switching to the plugin so that AI uses the default anim speed and skips being set. Dropped total animation update time to below 1ms.

Just my experience.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Aug 2013 17:48 Edited at: 21st Aug 2013 17:50
Quote: "I remember TheComet having issues with performance, and I am now experiencing them myself; having to export multiple levels of bone detail for each character. One bone structure that can create facial expressions, and another without; and another without bones for clothing and body scale."


You can process animations on the GPU by passing the skeletal matrices to a vertex shader. Runs a lot faster because the GPU designed for that kind of processing.

http://forum.thegamecreators.com/?m=forum_view&t=196055&b=1

Quote: "To glue a single object to multiple limbs of another object, instead of just one limb."


It's not possible to attach a mesh to a skeleton in DBP natively. I doubt someone has written a plugin for it either, so you're basically screwed.

The only thing I can think of is to animate the object you wish to attach, and make sure it's animation synchronizes with the object you're attaching it to. Then you can glue it to an imaginary limb.

TheComet

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 22nd Aug 2013 05:35
Quote: "It's not possible to attach a mesh to a skeleton in DBP natively. I doubt someone has written a plugin for it either, so you're basically screwed. "

I was thinking maybe one of ianM's plugins might have some advanced limb functions. Either way I will find a way to do this.

Quote: "The only thing I can think of is to animate the object you wish to attach, and make sure it's animation synchronizes with the object you're attaching it to. Then you can glue it to an imaginary limb."

If this was the built in animation I could write up a system to copy and rotate all the limbs. With enhanced animations it is a bit more complicated and slower. I considered this to be the worst way of doing this because of the overhead.

Login to post a reply

Server time is: 2026-07-07 05:39:23
Your offset time is: 2026-07-07 05:39:23