Jump to content

(OSP)===[TASK]===Juggler


Radagast.
 Share

Recommended Posts

I was talking about the hands that he animated. Of course the ball will not. Sorry for the misunderstanding. Should the model have more bones ? Or separate meshes ?

I answered his question, he was asking about the ball, not the hands. It needs a separate mesh.

@Lion: ???

Link to comment
Share on other sites

I answered his question, he was asking about the ball, not the hands. It needs a separate mesh.

@Lion: ???

topic off enrique I'm saying is most important give animal like elephants more attack animation may be using the nose etc, death animation , if you prefer I open a topic of discuss as idea and if is approved can be open as art task.
Link to comment
Share on other sites

@Hephaestion : Here is the trick. Make three bones. Name them prop-bone001 prop-bone002 prop-bone003. Give them the animation you want. Make an xml with the new skeleton if needed.

Then Make another project in blender with the ball. After that, you will just have to put a ball in the xml at the positon of the prop.

  • Like 1
Link to comment
Share on other sites

@Hephaestion : Here is the trick. Make three bones. Name them prop-bone001 prop-bone002 prop-bone003. Give them the animation you want. Make an xml with the new skeleton if needed.

Then Make another project in blender with the ball. After that, you will just have to put a ball in the xml at the positon of the prop.

Wrong. Prop bones do not record animation.... :closedeyes:

Name them whatever you want but not "prop-". You'll need to add a skeleton.xml for the balls armature, and use the root to attach them, or whatever the center of the animation is.

  • Like 2
Link to comment
Share on other sites

ERROR: CXeromyces: Failed to parse XML file art/actors/props/units/juggling_ball.xmlERROR: CObjectManager::FindObjectBase(): Cannot find object 'props/units/juggling_ball.xml'
It doesn't find them. But I put it here:

0ad/binaries/data/mods/public/art$ find . | grep juggl./animation/biped/biped_juggling.dae./meshes/biped_juggling.dae./meshes/skeletal/biped_juggling.dae./meshes/props/biped_juggling_ball.dae./actors/props/units/juggling_ball.xml./actors/units/global/juggler.xml
First I have to do convert the prop animation to deform bones like you two explained.
Link to comment
Share on other sites

Wrong. Prop bones do not record animation.... :closedeyes:

Name them whatever you want but not "prop-". You'll need to add a skeleton.xml for the balls armature, and use the root to attach them, or whatever the center of the animation is.

lol :)

Link to comment
Share on other sites

Have made the animation almost seemless.

Balls have player colour.

Unfortunately still get the same error if I want to have a look at the merry-go-round prop (it's an armature only, no mesh, only armature + prop points parented to bones).

Here are the corresponding files:

0ad/binaries/data/mods/public/art$ find . -name '*juggl*' -o -name '*ball.*' -o -name '*merry-go-*'./skeletons/merry-go-round.xml./animation/biped/merry-go-round_vertical.dae./animation/biped/juggler.dae  #<-- working./meshes/props/ball.dae./actors/props/units/ball.xml./actors/props/units/merry-go-round.xml    #<-- gives error./actors/units/global/juggler.xml  
<skeletons>        <standard_skeleton title="merry-go-round skeleton" id="merry-go-round">                <bone name="root">                        <bone name="ball1"></bone>                        <bone name="ball2"></bone>                        <bone name="ball3"></bone>                </bone>        </standard_skeleton>        <skeleton title="merry-go-round skeleton" target="merry-go-round">                <identifier>                        <root>merry-go-round</root>                </identifier>                <bone name="root"><target>root</target>                        <bone name="ball1"></bone><target>ball1</target>                        <bone name="ball2"></bone><target>ball2</target>                        <bone name="ball3"></bone><target>ball3</target>                </bone>        </skeleton></skeletons>
merry-go-round.xml:

<?xml version="1.0" encoding="utf-8"?><actor version="1">  <castshadow/>  <group>    <variant frequency="100" name="Base">      <mesh>props/units/ball.dae</mesh>        <!--<decal width="4" depth="4" angle="0" offsetx="0" offsetz="0"/>-->        <textures><texture file="props/cape_black.png" name="baseTex"/></textures>      <animations>        <animation file="biped/merry-go-round_vertical.dae" name="Idle" speed="120"/>      </animation>      <props>        <prop file="props/units/ball.xml" attachpoint="ball1" />        <prop file="props/units/ball.xml" attachpoint="ball2" />        <prop file="props/units/ball.xml" attachpoint="ball3" />      </props>    </variant>  </group>  <material>player_trans.xml</material></actor>
It's important we find out how to add animations as a prop. We need it for the crumbling walls. Edited by Hephaestion
Link to comment
Share on other sites

Thx. There is also Channel -> Extrapolation -> Make cyclic (F-curve).

Yours is what I did, still as the balls rotate with different speed it's hard to have them all at the same location at the end without jumping around. Though I've now made it, at least for the beginning thism might suffice.

Link to comment
Share on other sites

This error was fixed, needed some object. Typically the next error was just waiting.

I figured the cause (no root bone found):

        // I can't see any proper way to determine the real root of the skeleton,        // so just choose an arbitrary bone and search upwards until we find a        // recognised ancestor (or until we fall off the top of the tree)
Valuable information in the code. I love open source. The code is the best Wiki.

Bones either have to be connected or the parent is not properly saved in the COLLADA merry-go-round_vertical.dae.

If bones have to be connected, then we obviously can't ever get my loose-bone animation ingame.

The complete function:

const Skeleton& FindSkeleton(const FCDControllerInstance& controllerInstance){        // I can't see any proper way to determine the real root of the skeleton,        // so just choose an arbitrary bone and search upwards until we find a        // recognised ancestor (or until we fall off the top of the tree)        const Skeleton* skeleton = NULL;        const FCDSceneNode* joint = controllerInstance.GetJoint(0);        while (joint && (skeleton = Skeleton::FindSkeleton(joint->GetName().c_str())) == NULL)        {                joint = joint->GetParent();        }        REQUIRE(skeleton != NULL, "recognised skeleton structure");        return *skeleton;}

=> I have to figure out if COLLADA saves my in blender set parent bone correctly. Or if I have to make them connected. (then I had to redo the animation it seems as bones move totally different then)

Edited by Hephaestion
Link to comment
Share on other sites

Have figured more. The .dae file contains the bones nodes as childs, see:

  <library_visual_scenes>    <visual_scene id="_" name="1">      <node id="Armature" name="Armature" type="NODE">        <translate sid="location">-5.55873e-4 0.06135082 4.854146</translate>        <rotate sid="rotationZ">0 0 1 0</rotate>        <rotate sid="rotationY">0 1 0 0</rotate>        <rotate sid="rotationX">1 0 0 0</rotate>        <scale sid="scale">1 1 1</scale>        <node id="root" name="root" sid="root" type="JOINT">          <matrix sid="transform">1 0 0 0 0 7.54979e-8 -1 0 0 1 7.54979e-8 -1.5 0 0 0 1</matrix>          <node id="ball3" name="ball3" sid="ball3" type="JOINT">            <matrix sid="transform">1 0 0 -0.5 0 1 0 0 0 0 1 -7.54979e-8 0 0 0 1</matrix>          </node>          <node id="ball2" name="ball2" sid="ball2" type="JOINT">            <matrix sid="transform">1 0 0 0 0 1 0 2 0 0 1 7.54979e-8 0 0 0 1</matrix>          </node>          <node id="ball1" name="ball1" sid="ball1" type="JOINT">            <matrix sid="transform">1 0 0 0.5 0 1 0 0 0 0 1 -7.54979e-8 0 0 0 1</matrix>          </node>        </node>      </node>      <node id="Icosphere" name="Icosphere" type="NODE">        <translate sid="location">0 0 0</translate>        <rotate sid="rotationZ">0 0 1 0</rotate>        <rotate sid="rotationY">0 1 0 0</rotate>        <rotate sid="rotationX">1 0 0 0</rotate>        <scale sid="scale">1 1 1</scale>        <instance_controller url="#Armature_Icosphere-skin">          <skeleton>#root</skeleton>        </instance_controller>      </node>    </visual_scene>  </library_visual_scenes>

In our code we use the hangle up towards root method to find the skeleton's root. I here propose an alternate method with respect to wazim's Collada tutorial:

[Parse the .dae file, then find the node] <library_visual_scenes> and for all the direct (immediate) children of the only <visual_scene> we have to find the <node> who has a children of type <instance_controller>, read the <skeleton> child of this <instance_controller> and that will give you the ID of the root node. Since we have added all the bones to the skin, we will only have one <skeleton> child of <instance_controller>. Now this node is our root of the skeleton and everything connected to this <node> is part of the skeleton.

While the above may be viable alternative, it's not said we have any benefit from changing our current solution. Any input of the 0AD team appreciated.

The problem for the Juggler indeed may be the connection issue. => Just testing what happens. <-- tested, to no avail

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...