Hardware skinning patch is in and tested

http://hub.jmonkeyengine.org/forum/topic/mostly-complete-patch-hardwaregpuvertex-skinning-aka-matrix-palette-blending-for-jme/
Thanks to @ghoust we now have working hardware skinning!
It was tested to work on the Desktop with Intel HD Graphics, and NVIDIA video cards, and also on Android with PowerVR GPU.
I could not see any FPS difference on Android, its probably due to the fillrate of the lighting shader being the bottleneck

monkey dance

6 Likes

Thank you The Fearless Leader and Remy!

I love you guys!

I’ll adapt ShaderBlow for the hardware skinnig soon too.

@Momoko_Fan Just a question about android. Did you use android emulator on a Desktop for testing?

And another question: will GPU skinning work automatically or i should switch it in my code on?
I ask, because i would like to test it. :slight_smile:
Thanks.

Woop awesome, I noticed you said there is no performance increase with lighting material, the perblue guys used unshaded, can you confirm an increase with unshaded on android? If so, then it will still be very useful

@mifth I remember briefly looking through nehons initial commit when he did it, and I think its now automatically turned on by default, and if it fails it reverts back to software skinning.

@wezrule said: I remember briefly looking through nehons initial commit when he did it, and I think its now automatically turned on by default, and if it fails it reverts back to software skinning.

Cool. Thank you!

@mifth said: @Momoko_Fan Just a question about android. Did you use android emulator on a Desktop for testing?
I use both actual device and emulator. For the emulator I have GPU and CPU acceleration turned on (via Intel Atom image). I also have an Android device that I use for testing, it has a PowerVR GPU.
@mifth said: And another question: will GPU skinning work automatically or i should switch it in my code on? I ask, because i would like to test it. :) Thanks.
It is not enabled by default at the moment. You have to call SkeletonControl.setHardwareSkinningPreferred(true), since the default is false. The reason why its still disabled is that not all shaders have been ported to work with it.
1 Like

I made some tests and the performances are pretty impressive.
I use a scene with a black background with several Oto models playing a random animation.
on desktop :
25 Otos + hws on : 2130 fps
25 Otos + hws off : 190 fps
100 Otos + hws on : 630 fps
100 Otos + hws off : 45 fps
400 Otos + hws on : 160 fps
400 Otos + hws off : 11 fps

on android (asus eee pad transformer) :
25 Otos + hws on : 20 fps
25 Otos + hws off : 5 fps (and constant GCing…)
100 Otos + hws on : 5 fps
100 Otos + hws off : 0 fps

I noticed some issue when deactivating hw skinning and activating it back. On desktop the animations are wrong, and on android it staled my tablet and it ended up rebooting :p.
Not a big issue, that’s not a common use case.

EDIT : also tested on my nexus 4 and perfs are slightly better (6 to 35 fps) with 25 Otos

4 Likes

Super cool!

Oh wow, that’s a massive improvement! Soon wewill be the ones looking down on God and saying a big “fuck you!”. Good job guys, these macro optimsations are sweet, more please :slight_smile:

I think you want to be a little more careful about your comments about God. Similar things were said about the Titanic. I guess a few people have forgotten that.

Yes! And don’t forget about huge asteroids which visited our planet some times. They burned 90% of living forms here.

@alfinete said: I think you want to be a little more careful about your comments about God. Similar things were said about the Titanic. I guess a few people have forgotten that.

Sorry, my bad

400 Otos + hws on : 160 fps… zomg… what rune editor was used? Because that looks like magic.

NB: I don’t think the asteroids burned the living forms. Mostly, it was the dust that doomed the big animals.

@loopies said: 400 Otos + hws on : 160 fps... zomg... what rune editor was used? Because that looks like magic.

NB: I don’t think the asteroids burned the living forms. Mostly, it was the dust that doomed the big animals.

Yep it was mostly large amounts of dust in the upper atmospheric layers for months, that killed the plant live mostly, leading a collapse of the whole system.

@Empire Phoenix said: Yep it was mostly large amounts of dust in the upper atmospheric layers for months, that killed the plant live mostly, leading a collapse of the whole system.
@loopies said: 400 Otos + hws on : 160 fps... zomg... what rune editor was used? Because that looks like magic.

NB: I don’t think the asteroids burned the living forms. Mostly, it was the dust that doomed the big animals.

Yes! HW skinnig is really cool!

depends on the distance. And where he would hit.
[video]https://www.youtube.com/watch?v=WuYpdOJmiN8[/video]

Seriously…WTF guys?

No more talk about religion and asteroids please. There are plenty of other forums around for that sort of discussion. Keep it jME-related.