Hardware skinning - strange effect

It shouldn’t be much faster, really. One is a hashmap lookup which amounts to a buffer access… the other is a method call and a buffer access. So both amount to a method call and an array lookup. I guess the hashmap version will also do an .equals() on the string (fast) so you might save one whole millisecond per hour or so.

JME does this automatically now. Only children with controls (or that indicate that they should if they are subclasses) have their updateLogicalState() called. And updateGeometricState was already only called if needed.

re: the updateLogicalState() thing, if you are (ill-advisedly) subclasses JME spatial classes then you will have to override a method that indicates that you want to participate in the optimization. This was to avoid backwards compatibility issues for anyone (ill-advisedly) subclasses these classes.

It’s even better than just not traversing children because it builds a list in the root node of just the nodes that need updates… doesn’t even do a scene graph traversal at that point.

The problem with early micro-optimization is that you end up down paths that are hard to undo when you either find out that they don’t matter or find out that there was a higher level optimization to do.

Oh…that’s an issue indeed.
Your workaround seems ok IMO.

I did not found any issues with my current Node’s subclass. Using this solution I can do more: pause animations and particle emitters globally. By enabling/disabling one node I can allow/block the execution of the whole branch’s controls. My pause uses that.

Yeah, JME handles “game time” very poorly. Hopefully we fix that someday. Requires quite a few hacks to work around it.

I did not found any decent solution for game time in JME so I wrote my own global game timer, it have the ability to pause/resume and can be serialized. It of course is not affecting the tpf parameter, which is used by all the scene but it does not have to. My game logic is separated from game scene, they are sending small messages to each other, game timer is able to send messages too, which are used as a ‘clock signal’ for game logic object.

Yeah, really JME should probably have a couple different ‘time sources’ for things like animation (and even user defined ones). Because maybe you do want to pause your game animation but not UI animation, etc… Requires lots of changes to this right… your solution is probably the best you can do with today’s code.

Juste for the records :

:smile:

More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity.
–William Wulf

We should forget about small efficiencies, say about 97% of the time: Premature Optimization is the root of all evil.
–Donald Knuth

The First Rule of Program Optimization: Don’t do it.
The Second Rule of Program Optimization – For experts only : Don’t do it yet.
–Michael A. Jackson

For the records, I use it with 0 value, to have acces to the bones’ coordinate at the current update, and it works well. No wonkiness :smile:

So - keep quoting and don’t optimize your code.

Up. Any idea about the HW skinning issue? Was anyone able to reproduce that using our model?

how do you import it in the engine BTW? With the blender loader or via Ogre export?

It was imported by the blender loader. The rest is as my team member said:

Up, any idea? Was anyone able to test our model?

We made another one from scratch, the issue was not present with the new one, but it would be good to know what we did wrong with the first one.

Some tests:


Any idea? Some problems in SDK importer?

well…tbh I still use ogre to import models as it’s the only reliable way to have proper skeletal animation into the engine.

So today we finally join to ogre exporter users. :wink:

But maybe your model can help @Kaelthas for the blender importer.
I know he’s working hard on this.

@FrozenShade
Is it possible for you to upload the model ?
Just as @nehon said - it would be useful for upgrading blender importer :wink:

It is there.

Hey @FrozenShade

I have tested the import on the robot and yesterday I made a fix which improved bones’ behaviour a little bit (in this model and several others :wink: ).

If you use the importer built from the master branch of the sources - you should be able to see the change :smile: