The Hair examples in the SDK
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/09/2011 at 15:30, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;---------
This is embarrassing. I can't figure out how to use any of the hair examples.
I've used the hair module a lot in the past(but it's been a while). But these examples have me stumped. And there's no instructions in them on how to use them.-The Collider example does not do any colliding with my other hair objects.
-The Generator example makes a column of hairs. But when I edit the attributes it doesn't change.
And what the heck is the link filed supposed to do?When I add a polygon to it. Nothing happens.
-Etc...I'm trying to learn how to use the HairGuides helper class. And the examples seem to have lots of code in there that I can learn from. But first I need instructions on how to actually use these plugins.
What obvious thing am I missing?-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2011 at 10:52, xxxxxxxx wrote:
Hy Scott,
it really is a mess with those examples. You always have to analyze the code first, to understand what it does.
>> The Collider example does not do any colliding with my other hair objects.
To figure out what it does, I checked the code. After a while it was clear, it does affect Hair in the scene. While trying to understand what happens, I found the variable "pr", which came from the Collision Hook. So I checked the API: (Yes, embarrassing, if you find "Explanations" like this in the docs) :
typedef HrCollision(BaseDocument* doc, BaseList2D* op, HairObject* hair, HairGuides* guides, HairGuideDynamics* dyn, const Vector& bmin, const Vector& bmax, Real t1, Real t2, Real pr, Vector* oldpnt, Vector* newpnt, Vector* vel, Real* invmass, LONG pcnt, LONG cnt, LONG scnt)_<_h4_>_
Collision hook.
...
Real t1
> First t value.
Real t2
> Second t value.
Real pr
> Pr value.
...So, no information at all. Collision Hook is all there is ... much info to digest.
Anyway, if you put the collider (look at it as a collision plane) underneath some hairs, they will for example bounce off the plane if you increase the bouncing.
>> The Generator example makes a column of hairs. But when I edit the attributes it doesn't change.
That is because the elements in the GUI are not linked, they are just there... You can see it in the code, no Descriptions used to read out those values.
Do not forget, that you can always Debug the plugin. Like that, you can figure out pretty fast why its doing something or not and you can start guessing what parameters could represent
Always check the code and try to understand "what it could do" thats at least how I proceed. The API concerning Hair is badly documented. A lot of power in the API, but no non trial-and-error access, its a pity ...
Cheers,
maxx -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2011 at 11:40, xxxxxxxx wrote:
Thanks Maxx,
I'm glad I'm not the only person who think those examples are strange and hard to understand.I did eventually notice that I had to have the time scrubber running to see what some of the things did. But those generator attributes were completely baffeling me.
I'm new to the whole hair coding stuff in the SDK. and I'm just looking for an entry point into learning how to use the various hair functions and the helper class. And those examples sure don't make it easy.
-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2011 at 08:22, xxxxxxxx wrote:
I agree the Hair lib docs and examples could need some love. I will see if this can be addressed eventually.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2011 at 09:10, xxxxxxxx wrote:
I agree the Hair lib docs and examples could need some love.
... and some comments
Cheers,
maxx