Jump to content

Can't have bone control dummy inside node reference


photo

Recommended Posts

Hi,

In 2.16.1, I need to adjust an existing skeletal animation.

I add a control node (dummy) on the bone with the "Create Dummy Hierarchy" button in the Bones panel of the skinned mesh, and then I can move/rotoate the dummy to adjust the animation. This works find... unless the mesh is part of a reference ".node" file. When saving the node, the control dummy reference is los, as you can see when the world is reopened:

image.png.d0b1a0fbab3642f73209035a0b605777.png

Worse, if I reassign the node, then the editor crashes when the world is saved.

Link to comment
4 hours ago, ipakseev said:

However, disappearing links inside the NodeReference is expected behavior

Sorry, I wasn't clear enough. The Dummy controlling the bone is also INSIDE the node reference, so it should be allowed. Can you confirm you also reproduce this? On is this only an incorrect manipulation on my side?

 

Link to comment

Sorry, I really misunderstood you. Yes, I reproduced this. It's also a bug. I've created a bug report about this behavior. 
Can you please elaborate on what you want to achieve? If this is the functionality you need, we will try to find a workaround depending on your goals.

Link to comment
On 3/1/2023 at 9:29 AM, ipakseev said:

Can you please elaborate on what you want to achieve?

We have some skinned mesh which base animation needs to be adjusted in regard of other objects. In this specific case, we have an animated mixamo human, seated and slightly moving its head and hands, and we needed to reposition its hands and legs so they wouldn't interfer with other elements and be more integrated with their surrounding (eg having the hand hovering over the correct section of a keyboard or pointing toward the correct direction).

It's easier to adjust the animation inside the editor than it would be to modify and rexport through Blender. Moreover, we can then adjust the animation with the Tracker tool or control it through other means in real time.

As the human is inside a CIGI entity, it has to be inside a node.

I guess the future animation and Tracker rehaul will help in the regard.

Link to comment

It is due to the fact that the reference to the binded node inside the meshskinned does not update for dynamic identifiers (inside the noreference e.g.)
as a result, it stores the id of the original node that was created the first time.

to avoid this problem, you can add a small component that will restore the id. For properties and components this problem is solved.

class BindNodes: public Unigine::ComponentBase
{
public:
	COMPONENT_DEFINE(BindNodes, Unigine::ComponentBase);
	COMPONENT_INIT(init);

	struct BindedNode: public Unigine::ComponentStruct
	{
		PROP_PARAM(Int, index);
		PROP_PARAM(Node, binded_node);
	};

	PROP_ARRAY_STRUCT(BindedNode, binded_nodes);

private:
	void init()
	{
		auto object = checked_ptr_cast<ObjectMeshSkinned>(node);
		if (!object)
			return;

		for (int i = 0; i < binded_nodes.size(); i++)
		{
			auto &s = binded_nodes[i];
			object->setBindNode(s->index, s->binded_node);
		}
	}
};

you need to add this component to the meshskinned and manually duplicate link for all binded nodes.

  • Thanks 1
Link to comment
×
×
  • Create New...