HAIR API
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/01/2007 at 14:19, xxxxxxxx wrote:
Thanks David now it working.
The rendering problem was becouse I still have used hairGuides->SetRoot(0,hroot,FALSE); probably with wrong HairRootData. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/03/2007 at 04:55, xxxxxxxx wrote:
Hello,
is there a way to access the actual polygons / points of a HairObject?
Thank you
P.S.: Are there any SDK Examples for Hair available by now?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/03/2007 at 07:20, xxxxxxxx wrote:
The new 10.102 update for Cinema 4D includes some Hair specific SDK examples (thanks David).
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/03/2007 at 05:11, xxxxxxxx wrote:
I still haven't found a way to access the actual (generated) polygons and points of HairObjects. I want to access them per frame since they are part of an animation (linked to a another mesh).
Any idea, how I could access theses points?
Furthermore I would like to access per frame the points of other objects driven by a skeleton. But when I advance time, the object's points don't change (so the animation seems to have no effect). Advancing the time of the skeleton doesn't change this.
BaseTime time; time.SetDenominator(doc->GetFps()); for(INT f=anim->getStartFrame(); f<=anim->getEndFrame(); f++) { time.SetNominator(f); doc->AnimateObject(object,time,ANIMATE_NO_PARTICLES); Vector* point_array=object->GetPointW();
Any suggestions?
Thank you
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/04/2007 at 08:46, xxxxxxxx wrote:
I am know able to access the points of a mesh animated by a skeleton by executing the following steps:
- animate whole skeleton hierarchy (including the mesh I want to export) using AnimateObject
- Current state to object on the animated hierarchy using SendModelingCommand
- GetPointW on the mesh to export in the newly created hierarchy, that know contains the animated points of this frameUnfortunately, this procedure doesn't work with clothes and hair...
Points of cloth and hair objects "attached" to my mesh in the skeleton hierarchy don't seem to advance in time.I'm still trying...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/04/2007 at 11:47, xxxxxxxx wrote:
Points of cloth and hair objects "attached" to my mesh in the skeleton hierarchy don't seem to advance in time.
That sounds exactly right. The points attached to the mesh aren't animated (!). They are *being* animated by the that to which they are attached. You have to apply the parent's global matrix to the points to retain the animation on them:
// Apply parent animation to points points = defd->GetPointW(); lpoints = points+pointCount; for (; points != lpoints; ++points) (*points) *= parent->GetMg();
This may not be the case for cloth and hair, but it looks suspiciously so.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2007 at 00:31, xxxxxxxx wrote:
Try the GetCache and GetDeformCache functions.
You have to test GetCache for NULL. If not NULL use the pointer of GetCache then for GetDeformCache.
if (pObject->GetCache()) pObject=pObject->GetCache();
if (pObject->GetDeformCache()) pObject=pObject->GetDeformCache();cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2007 at 07:41, xxxxxxxx wrote:
My HairObjects and ClothObjects aren't children of Meshes in the skeleton hierarchy, but linked to them via Guide Links and Belt Tags - as far as I can see.
- Null Object
-- Hair Object (Guide Link -> Head)
-- ...- Null Object
-- Cloth Nurbs Object
--- Pants (Belt Tag -> Body)
-- ...- Null Object
-- Skeleton Hierarchy
-- Body
-- Head
-- ...I animate the whole Null Object containing the skeleton hierarchy and meshes animated by it.
I tried the GetCache and GetDeformCache functions. Only with Cloth Nurbs Objects the GetCache functions returns a value not NULL, but GetDeformCache is always NULL...
I also tried to apply the global matrix of Body (created per frame via setcurrentstatetoobject and actually holding animated points) to the Pants object. But it had no effect...
Thank you for your patience.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2007 at 08:52, xxxxxxxx wrote:
If I apply the matrix of Body to the associated Cloth Object, only position, scale and rotation of the whole Body object are applied to the whole Cloth Object.
The single points aren't effected in their position - so this procedure doesn't seem appropriate. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/04/2007 at 06:49, xxxxxxxx wrote:
Finally it works for Hair! I just have to call
doc->SetTime(time); doc->AnimateDocument(NULL, TRUE, TRUE); EventAdd(EVENT_ANIMATE|EVENT_FORCEREDRAW);
and with current state to object I reveive the polygonized frame state of my hair object. No idea why it didn't work earlier...
Yet there's still the problem with clothes. In this case there seems to exist a difference between dragging the timeline in c4d manually (object state is visibly updated) and calling SetTime, AnimateDocument and EventAdd programmatically (object state doesn't change)