 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Wind pattern code and reed stalk example
Date: 19 Sep 2014 08:45:31
Message: <541c256b@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Attached is my code. You have all latitude to make changes, experiment,
or expand.
Enjoy!
Thomas
Post a reply to this message
Attachments:
Download 'wind_pattern.zip' (75 KB)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
> Attached is my code. You have all latitude to make changes, experiment,
> or expand.
>
> Enjoy!
>
> Thomas
In the console there are a lot of lines:
File '/usr/share/povray-3.7/include/math.inc' line 232: Possible Parse Error:
Normalizing zero-length vector.
But, the render started.
Interesting work! :)
Post a reply to this message
Attachments:
Download 'wind_pattern.jpg' (86 KB)
Preview of image 'wind_pattern.jpg'

|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 20 Sep 2014 03:22:07
Message: <541d2b1f@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 19-9-2014 21:53, LanuHum wrote:
> In the console there are a lot of lines:
> File '/usr/share/povray-3.7/include/math.inc' line 232: Possible Parse Error:
> Normalizing zero-length vector.
I know but I don't know what to do about that. As far as I know I have
dealt with all zero-length vectors.
Anyway, they have no effect on the render.
>
> But, the render started.
> Interesting work! :)
Thanks! :-)
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
>
> Thanks! :-)
>
> Thomas
Thomas, anything I didn't understand in your files.
I would like to interpret it for Blender.
You can explain one after another, what it is necessary to do?
1 .
2 .
3 .
And so on :)
Thanks!
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 21 Sep 2014 04:27:59
Message: <541e8c0f@news.povray.org>
|
|
 |
|  |
|  |
|
 |
OK. How about this?
1. This technique uses the normals read at random locations on a
height_field to calculate the bending angle and orientation of reed
stalks as if they were blown by the wind.
2. Any height_field might do. However, a wave pattern is often observed
when watching corn or reed fields, so a height_field based on a ripple
or wave pattern will be most effective.
3. The first step is the creation of an image_map showing such a wave
pattern. This is done by setting parameter Mapping to 'on'. The code
provides a selection of settings but anything can changed until you get
an image satisfying to you. When this is indeed the case, you can set
parameter Mapping to 'off'.
4. Before going on, you will need one or more sets of reed stalks. Those
stalks need to be articulated following the Inverse Kinematic (IK)
procedure. This sounds more complicated than it is in reality when using
a modelling program. Just remember that each section of the stalk is
rotated /at the origin/ *and* /at its base/ and nested hierarchically
from extremity to base.
5. Now build a height_field using the wave pattern image_map. Play in
particular with the vertical scale of the height_field as this
influences the normals and hence the /strength/ of the wind to some degree.
6. To determine the random locations on the height_field, VRand_In_Obj()
is used as basis for the trace() function. This means that /any/ object
can be used to select the points. This can be useful to model irregular
reed fields with open patches of water for instance. In the provided
example, a simple box is used. The object can have any size but is only
effective when situated over the height_field of course.
7. A parameter WindStrength is provided to control the impact of the
wind on the bending of the reed stalks. Small amounts will already have
important effects, so be careful with this.
8. Provide the number of locations you need for filling the reed or corn
field.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
> OK. How about this?
>
Thanks, I will understand.
I doubt that I will be able to study it. :(
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 21 Sep 2014 10:25:25
Message: <541edfd5$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 21-9-2014 15:41, LanuHum wrote:
> Thomas de Groot <tho### [at] degroot org> wrote:
>> OK. How about this?
>>
> Thanks, I will understand.
> I doubt that I will be able to study it. :(
Don't hesitate to ask if in doubt, though.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
> On 21-9-2014 15:41, LanuHum wrote:
> > Thomas de Groot <tho### [at] degroot org> wrote:
> >> OK. How about this?
> >>
> > Thanks, I will understand.
> > I doubt that I will be able to study it. :(
>
> Don't hesitate to ask if in doubt, though.
>
> Thomas
Thanks!
Problem in English which I don't know.
I translate your messages, using an online translator of an intenet.
Therefore it is difficult to understand even an overall picture:
Why HF how HF influences mesh is used is a secret.
I still will try to study example.
Probably, time is necessary to understand.
I will ask questions if I will be able to start understanding though something.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 22 Sep 2014 03:19:34
Message: <541fcd86$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 21-9-2014 17:39, LanuHum wrote:
> Therefore it is difficult to understand even an overall picture:
> Why HF how HF influences mesh is used is a secret.
I think those are basic concepts, also in Blender?
The /normal/ of a point on a surface is the vector /perpendicular/ to
the surface (see also the Docs: paragraph 2.3.5.2). Using trace() you
can get the normal at a certain point. Knowing the normal, you can
calculate the angle it makes with a horizontal plane, or the angle it
makes with another vector around an axis.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
> On 21-9-2014 17:39, LanuHum wrote:
> > Therefore it is difficult to understand even an overall picture:
> > Why HF how HF influences mesh is used is a secret.
>
> I think those are basic concepts, also in Blender?
>
> The /normal/ of a point on a surface is the vector /perpendicular/ to
> the surface (see also the Docs: paragraph 2.3.5.2). Using trace() you
> can get the normal at a certain point. Knowing the normal, you can
> calculate the angle it makes with a horizontal plane, or the angle it
> makes with another vector around an axis.
>
> Thomas
Thomas,thanks.
I started understanding your mechanism.
But, I had an idea to use means of Blender (force field : wind) to do without
excess mathematical calculations.
Wind is applied to particles, but there is no realistic bend
It is necessary to find only the solution of a realistic bend of a trunk of a
plant also means of Blender
Post a reply to this message
Attachments:
Download 'force_field_wind.jpg' (99 KB)
Preview of image 'force_field_wind.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 22/09/2014 18:07, LanuHum wrote:
> Thomas,thanks.
> I started understanding your mechanism.
> But, I had an idea to use means of Blender (force field : wind) to do without
> excess mathematical calculations.
> Wind is applied to particles, but there is no realistic bend
> It is necessary to find only the solution of a realistic bend of a trunk of a
> plant also means of Blender
Just a suggestion LanuHum,
Can Blender apply wind to cloth?
Can you create a stalk as a "cloth" with only 2 degrees of freedom and
very stiff?
If so then you can apply "wind" to the "clothified"* stalk.
*Using Poser terminology.
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Stephen <mca### [at] aol com> wrote:
>
> Just a suggestion LanuHum,
> Can Blender apply wind to cloth?
Yes.
> Can you create a stalk as a "cloth" with only 2 degrees of freedom and
> very stiff?
> If so then you can apply "wind" to the "clothified"* stalk.
I don't think that such option will be real for a large number of triangles. The
scene will be very heavy.
I am inclined to use only data, to process and write down the file
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Stephen
Subject: Re: Wind pattern code and reed stalk example
Date: 22 Sep 2014 15:40:49
Message: <54207b41@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 22/09/2014 20:13, LanuHum wrote:
> Stephen <mca### [at] aol com> wrote:
>>
>> Just a suggestion LanuHum,
>> Can Blender apply wind to cloth?
>
> Yes.
>
>> Can you create a stalk as a "cloth" with only 2 degrees of freedom and
>> very stiff?
>> If so then you can apply "wind" to the "clothified"* stalk.
>
> I don't think that such option will be real for a large number of triangles. The
> scene will be very heavy.
> I am inclined to use only data, to process and write down the file
>
>
Fair enough. It was just a thought.
Keep up the good work. :-)
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 23 Sep 2014 03:17:08
Message: <54211e74@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 22-9-2014 19:07, LanuHum wrote:
> Thomas,thanks.
> I started understanding your mechanism.
> But, I had an idea to use means of Blender (force field : wind) to do without
> excess mathematical calculations.
> Wind is applied to particles, but there is no realistic bend
> It is necessary to find only the solution of a realistic bend of a trunk of a
> plant also means of Blender
>
Ah yes, that is an idea. Like Stephen suggested, something Poser also
does. Only thing indeed is the bending.
It seems to me, looking at your image, that the rate of bending should
be inverted. What I mean is this: Now, the angle goes from high at the
start to gradually low towards the top, producing a concave-up bending
shape. Could you /invert/ the calculation for this? Thus making a
convex-up bending shape?
Alternatively, can you make the wind power in Blender to increase upwards?
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
>
> Ah yes, that is an idea. Like Stephen suggested, something Poser also
> does. Only thing indeed is the bending.
>
> It seems to me, looking at your image, that the rate of bending should
> be inverted. What I mean is this: Now, the angle goes from high at the
> start to gradually low towards the top, producing a concave-up bending
> shape. Could you /invert/ the calculation for this? Thus making a
> convex-up bending shape?
>
> Alternatively, can you make the wind power in Blender to increase upwards?
>
> Thomas
If to use sphere_sweep probably it is possible to reach desirable result of a
bend.
It is necessary to study influence of several wind modifiers for increase in
wind power from above.
If the result is effective then it is necessary to think of leaves. :)
Post a reply to this message
Attachments:
Download 'force_field_wind_render.jpg' (95 KB)
Preview of image 'force_field_wind_render.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Now there are a lot of modifiers
Post a reply to this message
Attachments:
Download 'wind.blend.jpg' (375 KB)
Preview of image 'wind.blend.jpg'

|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 24 Sep 2014 03:59:42
Message: <542279ee$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 23-9-2014 19:34, LanuHum wrote:
> Now there are a lot of modifiers
>
This is looking very good! Exactly how I think it should be.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
>
> This is looking very good! Exactly how I think it should be.
>
> Thomas
I develop leaves :)
Post a reply to this message
Attachments:
Download 'wind_with_leaves.jpg' (104 KB)
Preview of image 'wind_with_leaves.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 24/09/2014 17:16, LanuHum wrote:
> Thomas de Groot <tho### [at] degroot org> wrote:
>>
>> This is looking very good! Exactly how I think it should be.
>>
>> Thomas
>
> I develop leaves :)
>
You do it well. Bravo!
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Stephen <mca### [at] aol com> wrote:
> >
> > I develop leaves :)
> >
>
> You do it well. Bravo!
>
> --
>
> Regards
> Stephen
It only scheme (plan).
In high resolution it won't look good.
Besides, I used manual editing. For animation automatic process is necessary.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 24/09/2014 20:08, LanuHum wrote:
> Stephen <mca### [at] aol com> wrote:
>>>
>>> I develop leaves :)
>>>
>>
>> You do it well. Bravo!
>>
>> --
>>
>> Regards
>> Stephen
>
> It only scheme (plan).
> In high resolution it won't look good.
> Besides, I used manual editing. For animation automatic process is necessary.
>
Yes
Proof of concept?
It can be done.
I have not used Forces nor animation in Blender, yet. Sounds like fun. :-)
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 25 Sep 2014 03:24:02
Message: <5423c312$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 24-9-2014 18:16, LanuHum wrote:
> Thomas de Groot <tho### [at] degroot org> wrote:
>>
>> This is looking very good! Exactly how I think it should be.
>>
>> Thomas
>
> I develop leaves :)
>
Look at that! You did it!
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: kurtz le pirate
Subject: Re: Wind pattern code and reed stalk example
Date: 27 Sep 2014 09:23:07
Message: <5426ba3b$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Le 20/09/2014 09:21, Thomas de Groot a écrit :
> On 19-9-2014 21:53, LanuHum wrote:
>> In the console there are a lot of lines:
>> File '/usr/share/povray-3.7/include/math.inc' line 232: Possible Parse
>> Error:
>> Normalizing zero-length vector.
>
> I know but I don't know what to do about that. As far as I know I have
> dealt with all zero-length vectors.
because sometimes <Norm> is equal to <0.000, 1.000, 0.000>
then, you caculate VerAng with :
#local VerAng = VAngleD(<Norm.x, 0, Norm.z>, Norm);
first parameter become <0.000, 0.000, 0.000>
VAngleD use vnormalize that is not defined for a null vector.
and you get :
Possible Parse Error: Normalizing zero-length vector.
you can, for exemple, correct this by adding smalls values to <Norm>
#if ((Norm.x = 0.0) & (Norm.z = 0.0))
#local Norm = <0.0001, Norm.y, 0.0001>;
#end
> Anyway, they have no effect on the render.
no visible difference in fact :)
---
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Wind pattern code and reed stalk example
Date: 27 Sep 2014 10:26:05
Message: <5426c8fd$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 27-9-2014 15:23, kurtz le pirate wrote:
> because sometimes <Norm> is equal to <0.000, 1.000, 0.000>
> then, you caculate VerAng with :
> #local VerAng = VAngleD(<Norm.x, 0, Norm.z>, Norm);
>
> first parameter become <0.000, 0.000, 0.000>
>
> VAngleD use vnormalize that is not defined for a null vector.
>
> and you get :
> Possible Parse Error: Normalizing zero-length vector.
>
>
> you can, for exemple, correct this by adding smalls values to <Norm>
> #if ((Norm.x = 0.0) & (Norm.z = 0.0))
> #local Norm = <0.0001, Norm.y, 0.0001>;
> #end
>
Simple and effective indeed. Thank you. I had difficulty in visualizing
what was exactly happening.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
LanuHum wrote on 24/09/2014 18.16:
> Thomas de Groot <tho### [at] degroot org> wrote:
>>
>> This is looking very good! Exactly how I think it should be.
>>
>> Thomas
>
> I develop leaves :)
>
Very nices!
;-)
Paolo
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |