[osg-users] Hardware skinning computeBound() calculation

Julien Valentin julienvalentin51 at gmail.com
Tue Jan 30 10:26:20 PST 2018


Hi Steve
You say to have a transform scaling x0.1
so you want that shrink your rig...
But you seams not to want the initial bound to be shrink as well
I don't understand what you're doing?

If you want to compute correctbound of a HWskinned rig from the CPU  the solution is to merge both SoftWare and HW RigTransform and do the transform on the CPU and GPU independantly.
It's what is done in osgCal but in osg we've choose not to duplicate job so you'll have to write a custom RigTransform for it.
Perhaps I'll do it my self one day but I've always found a way to circumvent the problem with initial bound

Cheers



DrPowers wrote:
> I understand this completely and realize that compute bound will return something incorrect since the vertices are manipulated on the vertex shader.
> 
> I might have misrepresented my issue. 
> 
> Even if I set the initial bound to be something I believe is correct... lets say radius=20. The problem is that there are scale transforms in the parental scene graph somewhere that then shrink this radius down to radius=2.
> 
> Currently I traverse the node path and apply the inverse of the scale to the initial bound so that initially it is radius=200 and will then pass return it's way back up to result in radius=20.
> 
> My question is... is this the correct way of doing this? Is there a better way to compute the bound of the hardware skinned bounding box or am I doing this correctly??


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72889#72889







More information about the osg-users mailing list