|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
After looking at my Java books, tutorials and JBuilder for half a year
and doing nothing with it, I got inspired by the erosion thread in p.a-u.
Got myself Python and made a very simple, but deadslow, df3 erosion
script.
Rendertime for 20 images ~50 minutes.
The script, running via Pre_Frame_Command took ~9 hours to do its job.
I noticed a memory use getting higher and higher per frame, strange.
Looking in winNT's taskmanager, there are two processes MegaPov.exe. One
using 4664k and steady, one using 90848k (frame 20) and rising. Is this a
result of Pre_Frame_command?
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
Attachments:
Download 'Erode50.png' (38 KB)
Preview of image 'Erode50.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ingo wrote:
>
> After looking at my Java books, tutorials and JBuilder for half a year
> and doing nothing with it, I got inspired by the erosion thread in p.a-u.
> Got myself Python and made a very simple, but deadslow, df3 erosion
> script.
>
Looks very nice, what kind of calculation do you use?
> Rendertime for 20 images ~50 minutes.
> The script, running via Pre_Frame_Command took ~9 hours to do its job.
>
Looks awfully long, 9 hours for every frame or for the whole erosion?
BTW, what resolution does your df3 have (looks like at least 300^3)
I'm looking forward to the first "nature scene".
Christoph
--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann wrote:
>Looks very nice, what kind of calculation do you use?
Generate a "raindrop" with a force between 0 and 10.
Go to the first voxel in the first layer. If value of the voxel is 0, go
to the first voxel in the next layer (=z direction).
Reduce voxel and raindrop by two. Is there still some juice in the drop,
randomly choose a direction +x, -x, +y or -y. Go in that direction till
you hit a voxel that is not 0. Reduce voxel and drop by two. Do so until
raindrop is 0 or you move outside the df3.
Then generate a second drop, goto the second drop of the first layer etc.
Do so for all voxels in the layer. Then start all over again. Do this 20
times for each frame rendered.
>Looks awfully long, 9 hours for every frame or for the whole erosion?
For the whole erosion 20 frames.
>BTW, what resolution does your df3 have (looks like at least 300^3)
150^3
>I'm looking forward to the first "nature scene".
>
>
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ingo wrote:
>
> Generate a "raindrop" with a force between 0 and 10.
> Go to the first voxel in the first layer. If value of the voxel is 0, go
> to the first voxel in the next layer (=z direction).
> Reduce voxel and raindrop by two. Is there still some juice in the drop,
> randomly choose a direction +x, -x, +y or -y. Go in that direction till
> you hit a voxel that is not 0. Reduce voxel and drop by two. Do so until
> raindrop is 0 or you move outside the df3.
> Then generate a second drop, goto the second drop of the first layer etc.
> Do so for all voxels in the layer. Then start all over again. Do this 20
> times for each frame rendered.
>
Sounds like you do not need a 3d-array for that, shouldn't it also work on a
normal heightfield in a similar way, it would be similar to your method, but
like with only two possible values (0, 1) for each voxel.
Christoph
--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann wrote:
>Sounds like you do not need a 3d-array for that, shouldn't it also work
>on a normal heightfield in a similar way,
Yes/No, you can't make overhangs with a HF.
But more important, this is my first real attempt at programming something
(besides the occasional modifying a pre-recorded-office-vba-macro). The
DF3 format is simple but for HF's TGA's or PNG's have to be manipulated,
not up to that yet.
>it would be similar to your
>method, but like with only two possible values (0, 1) for each voxel.
Sorry, I don't understand the "only two possible values ..." part.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ingo wrote:
>
>
> Yes/No, you can't make overhangs with a HF.
> But more important, this is my first real attempt at programming something
> (besides the occasional modifying a pre-recorded-office-vba-macro). The
> DF3 format is simple but for HF's TGA's or PNG's have to be manipulated,
> not up to that yet.
If i understood your description right, your code does not generate any
overhangs.
BTW, TGA format also seems quite simple to me.
>
> >it would be similar to your
> >method, but like with only two possible values (0, 1) for each voxel.
>
> Sorry, I don't understand the "only two possible values ..." part.
>
> Ingo
>
Ok, that was just my own way of thinking. I meant you can not decrease the
value of a voxel by 2 in a heightfield (because there are no voxels :-). Forget
about it, i will try to work out some similar code for heightfields soon.
Christoph
--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann wrote:
>If i understood your description right, your code does not generate any
>overhangs.
By the randomly bouncing the drop around within one "layer" it should
happen. I'll have to work on it a bit/lot more.
>BTW, TGA format also seems quite simple to me.
I'll look into it.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <8F7FCD07Bseed7@204.213.191.228>, ing### [at] homenl (ingo)
wrote:
> Generate a "raindrop" with a force between 0 and 10.
> Go to the first voxel in the first layer. If value of the voxel is 0, go
> to the first voxel in the next layer (=z direction).
> Reduce voxel and raindrop by two. Is there still some juice in the drop,
> randomly choose a direction +x, -x, +y or -y. Go in that direction till
> you hit a voxel that is not 0. Reduce voxel and drop by two. Do so until
> raindrop is 0 or you move outside the df3.
> Then generate a second drop, goto the second drop of the first layer etc.
> Do so for all voxels in the layer. Then start all over again. Do this 20
> times for each frame rendered.
Hmm, I wonder how hard it would be to make it follow the contours of the
surface, and deposit material as well as removing it.
Another possible feature that should be a lot easier to implement: wind.
Instead of going straight down to the first voxel, allow the direction
to be skewed a little.
I can see other possibilities for variants of this algorithm: weathering
on an ancient building or statue, etc.
--
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ingo wrote:
>
> Christoph Hormann wrote:
>
> >Sounds like you do not need a 3d-array for that, shouldn't it also work
> >on a normal heightfield in a similar way,
>
> Yes/No, you can't make overhangs with a HF.
> But more important, this is my first real attempt at programming something
> (besides the occasional modifying a pre-recorded-office-vba-macro). The
> DF3 format is simple but for HF's TGA's or PNG's have to be manipulated,
> not up to that yet.
Since you did this in Python you can get Python Imaging Library from
here:
http://www.pythonware.com/products/pil/index.htm
It reads and writes PNG, JPG, BMP, it also read TGA, I think it's quite
a
nice module, very simple to use... I'm not sure if the latest version is
available for windows, but there is one version for windows.
/Peter
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Peter Toneby wrote:
>Since you did this in Python you can get Python Imaging Library from
>here:
>http://www.pythonware.com/products/pil/index.htm
got it a minute ago, thanks.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |