OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

[osgAnimation::TransformHardware]bug BonePalette indices ?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 315

PostPosted: Tue Aug 22, 2017 10:37 pm    Post subject:
[osgAnimation::TransformHardware]bug BonePalette indices ?
Reply with quote

Hi,
I spend a lot of time debugging osgAnimation::TransformHardware.
It appears that the bonepalette (mat4array uniform) is not correctly uploaded sometimes (even if I fill it with identity, i continue to have strange matrices in the shader)
I added a lot of stuff to debug it like methods to limit the size of the bonepalette but it seams not linked (the bug occurs for a mesh with only 2xmat4 uniform!!?)
I replaced the uniform with a UBO and all work now, but it still is very frustrating not to understand why the uniform is bad
Do anyone experience the same stuff?
I debug the call to glUniformMatrix4fv and all seams to be good at first glance
Could It be a driver issue?
NVIDIA 381.22 on a GT440

link to my test model https://drive.google.com/file/d/0BxIH-jcsgYDdbFNEd0VjZktDSm8/view?usp=sharing

Any tought would be welcome
Thanks






Thank you!

Cheers,
Julien


Last edited by mp3butcher (Julien Valentin) on Wed Aug 23, 2017 1:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 315

PostPosted: Tue Aug 22, 2017 11:51 pm    Post subject:
Re: [osgAnimation::TransformHardware]bug in osg::Uniform ?
Reply with quote

Err,
Sorry false alarm, I mess up my brain for nothing
Too tired to code

mp3butcher wrote:
Hi,
I spend a lot of time debugging osgAnimation::TransformHardware.
It appears that the bonepalette (mat4array uniform) is not correctly uploaded sometimes (even if I fill it with identity, i continue to have strange matrices in the shader)
I added a lot of stuff to debug it like methods to limit the size of the bonepalette but it seams not linked (the bug occurs for a mesh with only 2xmat4 uniform!!?)
I replaced the uniform with a UBO and all work now, but it still is very frustrating not to understand why the uniform is bad
Do anyone experience the same stuff?
I debug the call to glUniformMatrix4fv and all seams to be good at first glance
Could It be a driver issue?
NVIDIA 381.22 on a GT440

link to my test model https://drive.google.com/file/d/0BxIH-jcsgYDdbFNEd0VjZktDSm8/view?usp=sharing

Any tought would be welcome
Thanks






Thank you!

Cheers,
Julien
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11152

PostPosted: Wed Aug 23, 2017 7:32 am    Post subject:
[osgAnimation::TransformHardware]bug in osg::Uniform ?
Reply with quote

Hi Julien,

On 23 August 2017 at 00:51, Julien Valentin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Sorry false alarm, I mess up my brain for nothing
Too tired to code


Does this mean you've got things working?


Robert.

 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 315

PostPosted: Wed Aug 23, 2017 1:10 pm    Post subject:
Re: [osgAnimation::TransformHardware]bug in osg::Uniform ?
Reply with quote

Hello ol
Excuse for my incapacity to be more formal but I've hacked a lot osganimation so it's hard to be sure

But I just reproduce this strange bug, so there seams something wrong with uploaded vertexattrib:
I add a guard in the skinning VS
Code:
 if(matrixIndex < palettsize )

(palettsize==MAX_MATRIX) )
in computeAcummulatedNormalAndPosition func
And the render gets badder (so the test gets a false value)
It means that boneindex is wrong
(Note that with this guard using uniform or UBO gives the same result so the bug might definitly come from here and not from uniform as i originally state in the subject)

I add a vertexattribute check to test if the invcondition
Code:
 if (indexelement of a vaa>=palettesize && associated weight!=0) print stuff

on the ram side but it's never triggered ?!


Any idea?

robertosfield wrote:
Hi Julien,

On 23 August 2017 at 00:51, Julien Valentin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Sorry false alarm, I mess up my brain for nothing
Too tired to code


Does this mean you've got things working?


Robert.

 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 315

PostPosted: Wed Aug 23, 2017 2:04 pm    Post subject:
Re: [osgAnimation::TransformHardware]bug in osg::Uniform ?
Reply with quote

Okay I found it
It was simply due to stateset sharing among several RigGeometry's sourcegeometries

Given that fact the TransformHardware mod several times the same stateset..and give wrong result

Will make a patch in osgexport in order to handle this case

mp3butcher wrote:
Hello ol
Excuse for my incapacity to be more formal but I've hacked a lot osganimation so it's hard to be sure

But I just reproduce this strange bug, so there seams something wrong with uploaded vertexattrib:
I add a guard in the skinning VS
Code:
 if(matrixIndex < palettsize )

(palettsize==MAX_MATRIX) )
in computeAcummulatedNormalAndPosition func
And the render gets badder (so the test gets a false value)
It means that boneindex is wrong
(Note that with this guard using uniform or UBO gives the same result so the bug might definitly come from here and not from uniform as i originally state in the subject)

I add a vertexattribute check to test if the invcondition
Code:
 if (indexelement of a vaa>=palettesize && associated weight!=0) print stuff

on the ram side but it's never triggered ?!


Any idea?

robertosfield wrote:
Hi Julien,

On 23 August 2017 at 00:51, Julien Valentin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Sorry false alarm, I mess up my brain for nothing
Too tired to code


Does this mean you've got things working?


Robert.

 

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11152

PostPosted: Wed Aug 23, 2017 2:39 pm    Post subject:
[osgAnimation::TransformHardware]bug BonePalette indices ?
Reply with quote

On 23 August 2017 at 15:04, Julien Valentin < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Okay I found it
It was simply due to stateset sharing among several RigGeometry's sourcegeometries

Given that fact the TransformHardware mod several times the same stateset..and give wrong result

Will make a patch in osgexport in order to handle this case


Good to hear you've tracked it down. 

FYI, I'm not the author of osgAnimation and haven't used it other than to maintain bit of it when needed, so I'm easily able to jump in and know what is what - I have to sit down with the code and an example and work out what is going on and what is likely to have been originally intended. 


Robert.

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts [osganimation branch] Review, test, c... mp3butcher General 7 Thu Aug 31, 2017 2:08 pm View latest post
No new posts osganimation upgrade robertosfield Submission 1 Fri Oct 07, 2016 9:38 am View latest post
No new posts fix for osganimation::RigGeometry bou... mp3butcher Submission 6 Fri Jun 24, 2016 11:39 am View latest post
No new posts osganimation upgrade mp3butcher Submission 23 Thu Jun 23, 2016 3:00 pm View latest post
No new posts osgAnimation UpdateUniform adds robertosfield Submission 0 Tue Mar 01, 2016 3:16 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP