POV-Ray : Newsgroups : povray.binaries.scene-files : Wind pattern code and reed stalk example Server Time
18 Apr 2024 14:03:42 EDT (-0400)
  Wind pattern code and reed stalk example (Message 1 to 10 of 25)  
Goto Latest 10 Messages Next 10 Messages >>>
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)

From: LanuHum
Subject: Re: Wind pattern code and reed stalk example
Date: 19 Sep 2014 15:55:01
Message: <web.541c89c0825f35c27a3e03fe0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> 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'
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

From: LanuHum
Subject: Re: Wind pattern code and reed stalk example
Date: 20 Sep 2014 10:05:00
Message: <web.541d885c825f35c27a3e03fe0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> 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

From: LanuHum
Subject: Re: Wind pattern code and reed stalk example
Date: 21 Sep 2014 09:45:01
Message: <web.541ed590825f35c27a3e03fe0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> 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] degrootorg> 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

From: LanuHum
Subject: Re: Wind pattern code and reed stalk example
Date: 21 Sep 2014 11:40:01
Message: <web.541ef117825f35c27a3e03fe0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 21-9-2014 15:41, LanuHum wrote:
> > Thomas de Groot <tho### [at] degrootorg> 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

From: LanuHum
Subject: Re: Wind pattern code and reed stalk example
Date: 22 Sep 2014 13:10:01
Message: <web.5420573b825f35c27a3e03fe0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> 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'
force_field_wind.jpg


 

Goto Latest 10 Messages Next 10 Messages >>>

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