|
|
|
|
|
|
| |
| |
|
|
From: Hugo Asm
Subject: Half success with water (DivX 5.05, 274kb file)
Date: 22 Sep 2003 10:37:28
Message: <3f6f0928@news.povray.org>
|
|
|
| |
| |
|
|
I hope people have the DivX codec. I tried with mpg1 but it wasn't as
effective in compressing these images.
The experiment can be broken down to:
1) Generating waves
2) Having wind in a box, or maybe not...
GENERATING WAVES:
This is Christoph Hormann's code for realistic ocean waves. The catch is, I
made it into a map that tiles seamlessly. The water you see in this
animation could fill a larger area simply by repeating the map. This is
useful to save memory and rendering time. In this case the map is small
(128*128 pixels) but that's because I didn't need more to fill the box.
So it's not necessary anymore to use a slow isosurface, or a height_field
with an insane resolution, to fill a lake or an ocean. Though, the ocean is
still going to need a whole lot of HF objects.
There will be some visible repeats (although it's seamless it does degrade
the quality) but with good settings, I don't think it's too bad.
The waves also loop over time, as you may have noticed this animation loops
nicely. The purpose is that the map can be pre-rendered and used in
animations with any length. This saves a lot of parsing-time too, generating
the maps.
WIND IN A BOX:
I'm not successful in simulating wind in a box. I also didn't implement any
interaction with the walls but I thought, it might not be necessary in such
a simple case. Turns out, it is necessary. As Christoph said, his code is
not suited for small amounts of water. I just haven't found a good
alternative.
Regards,
Hugo
Post a reply to this message
Attachments:
Download 'CH_water-seamless.avi.dat' (274 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Looks good
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
From: Tim Nikias v2 0
Subject: Re: Half success with water (DivX 5.05, 274kb file)
Date: 22 Sep 2003 18:40:29
Message: <3f6f7a5d@news.povray.org>
|
|
|
| |
| |
|
|
Looks great! The waves seem to move towards
the lower of the screen, so they might even
work for a little stream of water. And interaction
with objects... If this would export to 2D-Grids
of positions to be parsed into meshes, then the
displacement could be layered over the data
from my LSSM, and voila! Great water effects!
--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: no_lights (@) digitaltwilight.de
> I hope people have the DivX codec. I tried with mpg1 but it wasn't as
> effective in compressing these images.
>
> The experiment can be broken down to:
> 1) Generating waves
> 2) Having wind in a box, or maybe not...
>
>
> GENERATING WAVES:
>
> This is Christoph Hormann's code for realistic ocean waves. The catch is,
I
> made it into a map that tiles seamlessly. The water you see in this
> animation could fill a larger area simply by repeating the map. This is
> useful to save memory and rendering time. In this case the map is small
> (128*128 pixels) but that's because I didn't need more to fill the box.
>
> So it's not necessary anymore to use a slow isosurface, or a height_field
> with an insane resolution, to fill a lake or an ocean. Though, the ocean
is
> still going to need a whole lot of HF objects.
>
> There will be some visible repeats (although it's seamless it does degrade
> the quality) but with good settings, I don't think it's too bad.
>
> The waves also loop over time, as you may have noticed this animation
loops
> nicely. The purpose is that the map can be pre-rendered and used in
> animations with any length. This saves a lot of parsing-time too,
generating
> the maps.
>
>
> WIND IN A BOX:
>
> I'm not successful in simulating wind in a box. I also didn't implement
any
> interaction with the walls but I thought, it might not be necessary in
such
> a simple case. Turns out, it is necessary. As Christoph said, his code is
> not suited for small amounts of water. I just haven't found a good
> alternative.
>
>
> Regards,
> Hugo
>
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 19.09.2003
Post a reply to this message
|
|
| |
| |
|
|
From: Hugo Asm
Subject: Re: Half success with water (DivX 5.05, 274kb file)
Date: 22 Sep 2003 19:24:01
Message: <3f6f8491@news.povray.org>
|
|
|
| |
| |
|
|
> Would you please publish your source?
Sure. It's late night now but tomorrow I will post it.
Hope you'll find it useful.
Regards,
Hugo
Post a reply to this message
|
|
| |
| |
|
|
From: Hugo Asm
Subject: Re: Half success with water (DivX 5.05, 274kb file)
Date: 22 Sep 2003 19:39:40
Message: <3f6f883c@news.povray.org>
|
|
|
| |
| |
|
|
> Looks great!
Thanks.
> If this would export to 2D-Grids of positions
> to be parsed into meshes, then the displacement
> could be layered over the data from my LSSM, and voila!
> Great water effects!
That's what I've been thinking about too. :o) But I'm not sure how to
combine this. I would like to see the walls bounce off the waves caused by
the wind. This could add realism to the scene. But if the waves are layered
on top of the LSSM so they are two separate systems, there are no objects to
cause the LSSM to react in this scene. On the other hand, I don't know if
the LSSM will behave as expected when given such a complex "waveform" ?
And I don't dare to mention parsing time.
Regards,
Hugo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
That looks ultra realistic. nice.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Posted at: povray.binaries.scene-files
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Did I mention I was stupid? I used the Generate_Maps.pov source you
posted, generated 100 height fields using the command line parameters
you suggest, and then went on to modify Christoph Hormann's heightfield
example to use one of the generated maps (Generated_Maps001.png).
So far so good. But it doesn't tile seamlessly. Obviously I am doing
something wrong and could use a hint/push in the right direction.
Thank you for your patience. I really like this and want it to work.
The attached image shows the height field rendered with a simple white
pigment, and illustrates the gaps between adjacent maps.
Hugo Asm wrote:
> Posted at: povray.binaries.scene-files
>
>
Post a reply to this message
Attachments:
Download 'waves.jpg' (73 KB)
Preview of image 'waves.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Noo noo you're not stupid. :o) I've realised the problem and fixed it.
The gap is caused by the way, height_field's are stitched together. Your map
is actually seamless - to the eye, looking down on an orthographical view of
the map. But for height_field's to link properly, the last row of pixels and
the last column of pixels, has to be an exact copy of the first row, and the
first column. I've taken care of this now.
I post the updated code again at p.b.s-f.. You will have to render the maps
again (sorry) and now, you need to use "squared" resolutions. In other
words, resolutions such as 256*300 is not going to work, but 256*256 should
do fine, or 300*300. Image width should be the same as image height.
(Of course, this rule only apply to the pre-rendered maps.. not afterwards,
when you use the maps.)
Good luck!
Hugo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
As an animation nut I think the ability to tile in 3-space and loop
seamlessly over time are wonderful features. The fact that your code
supports both for an arbitrary function is amazing. Thank you for
writing and sharing this!
Your code is working perfectly now and I plan to make extensive use of
it. Thanks again.
Hugo Asm wrote:
> Noo noo you're not stupid. :o) I've realised the problem and fixed it.
>
> The gap is caused by the way, height_field's are stitched together. Your map
> is actually seamless - to the eye, looking down on an orthographical view of
> the map. But for height_field's to link properly, the last row of pixels and
> the last column of pixels, has to be an exact copy of the first row, and the
> first column. I've taken care of this now.
>
> I post the updated code again at p.b.s-f.. You will have to render the maps
> again (sorry) and now, you need to use "squared" resolutions. In other
> words, resolutions such as 256*300 is not going to work, but 256*256 should
> do fine, or 300*300. Image width should be the same as image height.
>
> (Of course, this rule only apply to the pre-rendered maps.. not afterwards,
> when you use the maps.)
>
> Good luck!
> Hugo
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |