WeightTag smoothing
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/05/2012 at 23:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12-R13
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;---------
Is there any way to access the smoothing feature of the Weights Manager from a plugin (SDK)? If not, can you point me to references to algorithms or code that implements something relevant to performing this type of smoothing of the weight maps based on Strength and Distance?Thanks!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/05/2012 at 08:07, xxxxxxxx wrote:
I've accessed the weights manager through Python. But I haven't had a chance to convert it to C++ yet. It's something I was planning on doing at some point.
The most important thing to know is that you have to have the weight brush tool open at the same time. Or none of your code will execute in the weight manager.Here's a python example:
import c4d def main() : c4d.CallCommand(1019499) #Launch Weight Tool c4d.CallCommand(1025028) #Launch Weights Manager tool = doc.GetActiveToolData() tool[c4d.ID_CA_WEIGHT_TOOL_WEIGHTS_HIDE_ZERO] = 0 #Sets this checkbox option to off tool=doc.GetAction() tool=c4d.plugins.FindPlugin(tool, c4d.PLUGINTYPE_TOOL) #c4d.CallButton(tool, c4d.ID_CA_WEIGHT_TOOL_FN_CLEARWEIGHT) #Deletes the weighting on the selected joint c4d.CallButton(tool, c4d.ID_CA_WEIGHT_TOOL_MIRROR) #Executes the Auto Mirror button c4d.EventAdd() if __name__=='__main__': main()
For C++. The [] stuff needs to be converted to GetParameter()&SetParameter(). As well as the button codes.
If you do end up using this and converting it to C++. Please post an example in this thread.
That would save me the trouble of converting it myself.P.S.- Here's the .h file resources: ..\..\..\..\resource\modules\ca\res\description oolcaweight.h
-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/05/2012 at 06:47, xxxxxxxx wrote:
Hi Robert,
I asked the developers and no, there is no direct access to the smoothing feature of the Weights Manager.
Sorry, I can't point you to any resources. It is a fairly standard smoothing (points within distance, average, falloff). -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/05/2012 at 23:18, xxxxxxxx wrote:
Smoothing is one thing. Determining the surface geodesics for distance is another altogether. There are so many ways to do this (from Djikstra to Newton-Raphson to a different method for every paper that I find). For speed, an approximate shortest geodesic algorithm should suffice. Can you provide any hints on that by chance?
This is something new to me so please be kind.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/06/2012 at 02:06, xxxxxxxx wrote:
If exact geodesic distances are not crucial then I say go for Dijkstra's algorithm. If your mesh is reasonably well behaved then that should give you a decent approximation.
Another option could be to not use geodesics, but to consider 3D distances instead.
Best regards
/Filip