POV-Ray : Newsgroups : povray.binaries.animations : Hair test (WIP, MPEG1 352kb) : Re: Hair test (WIP, MPEG1 352kb) Server Time
8 Jul 2024 09:30:23 EDT (-0400)
  Re: Hair test (WIP, MPEG1 352kb)  
From: Tim Nikias
Date: 27 Jan 2005 01:20:12
Message: <41f8881c@news.povray.org>
> Looks very interesting. :)

Yup, thought so myself...

> How does this animation work with regard to the set of basic hairs? Is the
> set the same in every frame, or is a new set generated for every frame?

A new set for every frame. Because gravity always works downwards and the
wind doesn't, I have to recalculate the set, or the hairs will suddenly have
a different direction in which gravity pulls them.

> Do you think that gravity and wind affects hair in very different ways, or
> would it perhaps be possible to cheat and just use a single combined force
> vector that simulates gravity and wind at the same time?

If I'd actually simulate the hairs using springs or such, I would just pop
gravity and wind as a force onto the spring's joints and that'd be it. What
I'm doing though is to cut the hair into little parts and bend each on
slightly downward, no matter where it is pointing to, using vaxis_rotate
with an axis calculated by the cross-product of gravity-direction and
current hair-normal. This it is more straightforward and can be calculated
in one go without having to simulate several springs, whilst retaining the
same length for every section and thus the whole hair.
Wind is just added in an interpolated fashion: keep much of the original
direction of a section and add little wind, closer to the tip, there's more
wind added and less direction kept. To ensure the proper length I normalize
the sum and multiply it with the section's length.
The stiffness of the hair can thus be controlled with a value which limits
the angle between the original hair-direction and the new one when bending
it downward for gravity, and a parameter to modify the wind-addition.

I am thinking about scripting a real simulated hair though, for animation
projects.

Regards,
Tim

Offtopic- PS: I'll be running away from the clone in a few hours... :-)

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.