Horde3D
http://horde3d.org/forums/

Negative morpher weights?
http://horde3d.org/forums/viewtopic.php?f=1&t=1026
Page 1 of 1

Author:  RatTyrant [ 11.12.2009, 13:08 ]
Post subject:  Negative morpher weights?

Greetings,

I have a small feature request for Horde3D developers. Namely, I'm working on a project involving morph target animation and our animation system sometimes needs to apply morph targets with negative weights. However, it appears that Horde3D's h3dSetModelMorpher clamps all negative weights to zero. Would it be possible to modify that behavior so that negative weights can be applied as well? I've briefly checked the engine source code and I believe this only necessitates changing a single line of ModelNode::setMorphParam (line 161 in egModel.h). Yet I realize this change is likely to cause problems with hypothetical animation code relying on that behavior, so it's perfectly understandable if developers are reluctant to implement it. What say you, developers?

Kind regards,
RatTyrant

Author:  MistaED [ 12.12.2009, 03:03 ]
Post subject:  Re: Negative morpher weights?

Unrelated to your issue but on the topic of morph targets I've been reading up on a technique which uses the GPU to do the processing by using a shader which reads the vertex relative difference in a texture (which is made offline) which a vertex shader could use as a lookup, and blends could be done as a texture blend http://www.imgtec.com/powervr/insider/demos/gremlin.asp this was featured in Shader X7 it's a shame I can't find any online info of this technique, perhaps it's in the powervr sgx sdk...

Could be interesting to look into as an alternative to horde's software morphs? *shrugs*

-Alex

Author:  marciano [ 14.12.2009, 00:58 ]
Post subject:  Re: Negative morpher weights?

RatTyrant, I never used weights outside the 0..1 range so far but if they make sense for a real world application, we can add support for them. We could add an engine option which determines if morpher weights should be clamped or really just remove the clamping altogether.

MistaED wrote:
Could be interesting to look into as an alternative to horde's software morphs? *shrugs*

If morph targets were the bottleneck, it would certainly make sense to look into specific optimization techniques like the one you proposed. But otherwise I would prefer a more generic solution like we have it now.

Author:  RatTyrant [ 14.12.2009, 12:47 ]
Post subject:  Re: Negative morpher weights?

MistaED wrote:
Could be interesting to look into as an alternative to horde's software morphs? *shrugs*

I've never had any performance issues with Horde3D's morphing implementation, but I expect hardware morphing will be added eventually. Personally I think the 79-joint restriction on hardware skinning is likely to become a bigger hurdle in the future, as it precludes some highly complex face and body rigs.

marciano wrote:
RatTyrant, I never used weights outside the 0..1 range so far but if they make sense for a real world application, we can add support for them. We could add an engine option which determines if morpher weights should be clamped or really just remove the clamping altogether.

Well, what we are doing is integrating Horde3D with an existing animation system that is based on MPEG-4 Face and Body Animation specification. The system maps facial animation parameters directly to morph target weights. Since MPEG-4 FBA specification uses both positive and negative parameter values (e.g. raise_*_eyebrow parameters control both raising and lowering of eyebrows), negative extrapolation is necessary in many cases. That doesn't make much sense from an artistic standpoint ("MPEG-4 FBA" and "not making sense" go together like peanut butter and jelly, as I discovered time and time again), as it would surely look better if there was a separate parameter and morph target for the opposite direction. But it is what it is, and if you could add support for negative weights, it would indeed be extremely helpful.

Author:  marciano [ 17.12.2009, 19:36 ]
Post subject:  Re: Negative morpher weights?

RatTyrant wrote:
Personally I think the 79-joint restriction on hardware skinning is likely to become a bigger hurdle in the future, as it precludes some highly complex face and body rigs.

Just as a note, this limit is easy to relax on SM 4.0 (d3d 10) hardware (GF 8, Radeon 2000).

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/