 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I am struggling with the following. Muddy water flowing out of an
estuary towards sea, eventually sinks down/mixes with sea water some
distance from the coast. The easy approach is shown in the image below:
two boxes, sliced by a plane, and filled with two different media each
(one absorption, one scattering).
I would prefer a more diffuse approach using a spherical pattern for
instance, but I am unable to come up with a working code that can do
that properly.
Any idea? Thanks!
Thomas
Post a reply to this message
Attachments:
Download 'mediatest2.png' (116 KB)
Preview of image 'mediatest2.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 24/04/2012 09:25, Thomas de Groot a écrit :
> I am struggling with the following. Muddy water flowing out of an
> estuary towards sea, eventually sinks down/mixes with sea water some
> distance from the coast. The easy approach is shown in the image below:
> two boxes, sliced by a plane, and filled with two different media each
> (one absorption, one scattering).
>
> I would prefer a more diffuse approach using a spherical pattern for
> instance, but I am unable to come up with a working code that can do
> that properly.
>
> Any idea? Thanks!
two words: Offset printing.
(in 3D)
It might be costly. Macro is a must have.
In details, use union/merge of spheres with fixed coordinates but
variables radius.
In the estuary, radius are such that spheres fills the whole space.
In the least yet perturbed sea, the radius become very small.
For sphere placements, use ABC or ABA compact spheres filling of space
(12 spheres around 1: 6 in same plane, 3 above, 3 below), rather than
cartesian grid. Tilt the placements by some rotations.
relative radius of spheres should be computed from the x,y position of
the center (you might also consider z if you like), relative your
gradient/pattern of diffusion between 100% estuary and the 100% sea.
To sum up:
1. create that object A (limit the spheres to the mixing zone).
2. create an object B, container of the mix.
3. B is filled with sea media
4. intersection of B & A is filled with estuary media.
5. part before B in estuary is filled with estuary media
6. part after B in sea is filled with sea media
(there might be a surface between 5/6 and B, so might be A and B must be
extended to one fill further in their direction)
(B is the whole flow, A is a squatter)
alternative with possible coincident surface issue:
difference { B A material{ Sea } }
intersection { B A material { Estuary } }
Tuning with the radius between the spheres coordinates.
--
Real software engineers work from 9 to 5, because that is
the way the job is described in the formal spec. Working
late would feel like using an undocumented external procedure.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Christian Froeschlin
Subject: Re: Transition between two medias
Date: 24 Apr 2012 06:58:43
Message: <4f968763@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> I would prefer a more diffuse approach using a spherical pattern for
> instance, but I am unable to come up with a working code that can do
> that properly.
are you looking for something like this:
#declare f_gradient_x_non_repeating = function
{
select(x,0,select(x-1,x-1,1))
// of course you can also construct something using
// f_spherical here depending on desired geometry
}
box
{
<-2,-1,0>,<2,1,1> hollow
pigment {color rgbt 1}
interior
{
media
{
method 3
absorption 10
density
{
function {f_gradient_x_non_repeating(x,y,z)}
translate -0.5*x
scale 2*x
rotate 45*z
color_map
{
[0.0 color Navy]
[1.0 color Khaki]
}
}
}
}
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Christian Froeschlin wrote:
note you will need to media statements, one to increase
the scattering and another to decrease the absorption.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Christian Froeschlin wrote:
> select(x,0,select(x-1,x-1,1))
and that was actually supposed to be
select(x,0,select(x-1,x,1))
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 24-4-2012 12:58, Christian Froeschlin wrote:
> are you looking for something like this:
>
> #declare f_gradient_x_non_repeating = function
> {
> select(x,0,select(x-1,x-1,1))
>
> // of course you can also construct something using
> // f_spherical here depending on desired geometry
> }
>
> box
> {
> <-2,-1,0>,<2,1,1> hollow
> pigment {color rgbt 1}
> interior
> {
> media
> {
> method 3
> absorption 10
> density
> {
> function {f_gradient_x_non_repeating(x,y,z)}
> translate -0.5*x
> scale 2*x
> rotate 45*z
> color_map
> {
> [0.0 color Navy]
> [1.0 color Khaki]
> }
> }
> }
> }
> }
Thank you both, Le_Forgeron and Christian. I feel Le_Forgeron's solution
to be rather complicated and I do not yet understand everything yet,
although it might be the best approach in the end.
Christians solution is elegant and promises to be my favourite choice.
Using my own water colours, and tweaking the code in the following way:
//=======================================================================
#declare Sea_col = srgb <0.51373, 0.70588, 0.70588>; //clear water
#declare Mud_col = srgb <0.74118, 0.71765, 0.41961>+<0.2, 0.2, 0>;
//muddy water
#declare Dist = 200; //determines the depth transparency of the
water column
#local FD = -(Dist/(6*25.4))/ln(0.58); //fade distance
#declare f_gradient_x_non_repeating = function {select(x,0,select(x-1,x,1))}
box {
<-3,-1,-1>, <3,1,1>
hollow
pigment {color rgbt 1}
finish {
conserve_energy
diffuse 0.2
ambient 0
reflection {0.01, 0.2 fresnel on metallic 0}
}
normal {crackle 0.15 scale <0.45,0.25,0.25>*2 turbulence 0.5 }
interior {
ior 1.33
media {
method 3
absorption 5
density {rgb 1/FD}
//next commented out to follow original fading on line above
/*density {
function {f_gradient_x_non_repeating(x,y,z)}
translate 0.25*x
scale 2*x
rotate 70*z
color_map {
[0.0 color Sea_col]
[1.0 color Mud_col]
}
}*/
}
media {
method 3
scattering {3, Sea_col}
density {
function {f_gradient_x_non_repeating(x,y,z)}
translate 0.25*x
scale 1*x
rotate 60*z
color_map {
[0.0 color Mud_col]
[1.0 color Sea_col]
}
}
}
}
}
//=======================================================================
This is going in the right direction! I have see how to tweak the
colours to obtain approximately my original water aspect.
Thomas
Post a reply to this message
Attachments:
Download 'mediatest2.png' (33 KB)
Preview of image 'mediatest2.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 24-4-2012 14:06, Thomas de Groot wrote:
>
> This is going in the right direction! I have see how to tweak the
> colours to obtain approximately my original water aspect.
>
Nice! Adding also some turbulence.
Thomas
Post a reply to this message
Attachments:
Download 'mediatest2.png' (34 KB)
Preview of image 'mediatest2.png'

|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 25 Apr 2012 04:22:30
Message: <4f97b446@news.povray.org>
|
|
 |
|  |
|  |
|
 |
And this is the final result, as seen from a tower on the island
offshore from Gancaloon.
Thanks Christian!
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (607 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 25 Apr 2012 04:38:44
Message: <4f97b814@news.povray.org>
|
|
 |
|  |
|  |
|
 |
... and a view from the other side.
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (993 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 25/04/2012 9:38 AM, Thomas de Groot wrote:
> .... and a view from the other side.
>
> Thomas
> .... and a view from the other side.
>
> Thomas
> .... and a view from the other side.
>
> Thomas
Is that the right image? The lower 3/5 is blank.
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 25 Apr 2012 06:57:43
Message: <4f97d8a7$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 25-4-2012 11:11, Stephen wrote:
> On 25/04/2012 9:38 AM, Thomas de Groot wrote:
>> .... and a view from the other side.
>>
>> Thomas
>> .... and a view from the other side.
>>
>> Thomas
>> .... and a view from the other side.
>>
>> Thomas
>
> Is that the right image? The lower 3/5 is blank.
>
No problem from my side. 1200x675 being the image ratio.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Stephen
Subject: Re: Transition between two medias: Final result
Date: 25 Apr 2012 07:14:47
Message: <4f97dca7@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 25/04/2012 11:57 AM, Thomas de Groot wrote:
> On 25-4-2012 11:11, Stephen wrote:
>>
>> Is that the right image? The lower 3/5 is blank.
>>
>
> No problem from my side. 1200x675 being the image ratio.
>
> Thomas
>
It is Thunderbird again.
It gives me three images now, two of them partial the third is a full image.
I like this view it shows the silt to advantage.
The paths remind me of Rune's Grass Tex.
And when are we going to get a view of the white palace or temple?
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 25 Apr 2012 10:35:59
Message: <4f980bcf@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 25-4-2012 13:14, Stephen wrote:
> It is Thunderbird again.
> It gives me three images now, two of them partial the third is a full
> image.
I was afraid so. Strange behaviour...
> I like this view it shows the silt to advantage.
Yes, I am rather satisfied with the silt. I shall probably tweak it a
bit more in the future, but for now it shows correctly enough for me.
> The paths remind me of Rune's Grass Tex.
Yes indeed. However it is just textures ;-)
> And when are we going to get a view of the white palace or temple?
You order; we serve.
Here is a view of the Temple Complex with the citadel in the back. I
have started working on the Temple textures. Extremely preliminary as
yet. Also the first stages of the sea harbour to the right where the
former temple of Poseidon challenges the sea.
Note the crude aspect of the "faked"urbanism in close up ;-)
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (1144 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
From: Christian Froeschlin
Subject: Re: Transition between two medias: Final result
Date: 25 Apr 2012 18:27:17
Message: <4f987a45$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Nice image, although the edge between mud and water
looks rather sharp to me considering all the trouble you
went through to make a smooth media transition ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 26 Apr 2012 02:40:07
Message: <4f98edc7$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 26-4-2012 0:27, Christian Froeschlin wrote:
> Nice image, although the edge between mud and water
> looks rather sharp to me considering all the trouble you
> went through to make a smooth media transition ;)
>
Correct! I have to look at this closer, but I think it is a matter or
scaling the transition. I have to charter a boat at sea first.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 26 Apr 2012 03:23:29
Message: <4f98f7f1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 26-4-2012 0:27, Christian Froeschlin wrote:
> Nice image, although the edge between mud and water
> looks rather sharp to me considering all the trouble you
> went through to make a smooth media transition ;)
>
I think this looks more acceptable. I scaled substantially along the
x-axis given the size of the water sphere in the first place.
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.png' (284 KB)
Preview of image 'gancaloon.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
> On 26-4-2012 0:27, Christian Froeschlin wrote:
> > Nice image, although the edge between mud and water
> > looks rather sharp to me considering all the trouble you
> > went through to make a smooth media transition ;)
> >
> I think this looks more acceptable. I scaled substantially along the
> x-axis given the size of the water sphere in the first place.
>
> Thomas
Looks awesome. :D
Can you do a high res?
Regards
D103
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 25/04/2012 3:35 PM, Thomas de Groot wrote:
>> And when are we going to get a view of the white palace or temple?
>
> You order; we serve.
>
I like it but the style is so different from everything else. Those
front towers could be from the Far East. The citadel is almost European.
> Here is a view of the Temple Complex with the citadel in the back. I
> have started working on the Temple textures. Extremely preliminary as
> yet. Also the first stages of the sea harbour to the right where the
> former temple of Poseidon challenges the sea.
>
> Note the crude aspect of the "faked"urbanism in close up ;-)
Understandable. I suppose the trick is to balance resources against what
detail is required. To model a whole city in detail would require more
than a typical home computer.
But when you do get to that depth of detail. Don’t forget the drainage
systems.
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 26 Apr 2012 08:10:40
Message: <4f993b40$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 26-4-2012 12:41, Stephen wrote:
> I like it but the style is so different from everything else. Those
> front towers could be from the Far East. The citadel is almost European.
The city being a kind of multicultural hub, architectural and cultural
influences come from different parts of the world. The Temple complex is
typically Indian (Nagara-style sakhara) to something more mixed
Indian/Chinese in front. To the right, the Poseidon temple is typically
Greek; the citadel in the back is based on a Mycenaean ground
plan/elevation (Tiryns) and the old palace will have Cretan elements. It
seems a bit extreme perhaps, but it shows the city as I dream it... ;-)
>>
>> Note the crude aspect of the "faked"urbanism in close up ;-)
>
> Understandable. I suppose the trick is to balance resources against what
> detail is required. To model a whole city in detail would require more
> than a typical home computer.
> But when you do get to that depth of detail. Don’t forget the drainage
> systems.
I am working on some alternatives. Maybe as some intermediate technique...
Drainage and water supply are still a big problem...
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 26 Apr 2012 08:23:28
Message: <4f993e40@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 26-4-2012 11:53, D103 wrote:
> Looks awesome. :D
>
> Can you do a high res?
>
Thanks! Here is a larger version
Thomas
Post a reply to this message
Attachments:
Download 'gancaloon.jpg' (118 KB)
Preview of image 'gancaloon.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot <tho### [at] degroot org> wrote:
>
> Drainage and water supply are still a big problem...
>
> Thomas
Well, what about these?
http://www.sakia.org/cms/index.php
http://en.wikipedia.org/wiki/Chain_pump
Both were used in regions similar to yours,
and can be wind or animal powered. :)
>> ------------------------------------------ <<
Thomas de Groot <tho### [at] degroot org> wrote:
>
> Thanks! Here is a larger version
>
> Thomas
>
Looks great, a very calm day obviously. ;)
The sea is so still...
The river/sea boundary is fairly convincing; but if I may criticise... :)
IMO the river water is a bit _too_ muddy. Maybe use less red, and a lighter
blue?
Also, you'd expect to see some sort of channel around the middle of the river;
the cliffs either side imply that the river is reasonably deep.
There is also a pool on the island the viewer is on. It looks very blue, but
surely couldn't be any deeper than a few feet?
Ok, I've finished nit-picking. ;)
I really like it, it's great. :D
Regards,
D103
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thomas de Groot
Subject: Re: Transition between two medias: Final result
Date: 27 Apr 2012 02:59:26
Message: <4f9a43ce$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
On 27-4-2012 4:40, D103 wrote:
> Thomas de Groot<tho### [at] degroot org> wrote:
>>
>> Drainage and water supply are still a big problem...
>>
>> Thomas
>
> Well, what about these?
>
> http://www.sakia.org/cms/index.php
>
> http://en.wikipedia.org/wiki/Chain_pump
>
> Both were used in regions similar to yours,
> and can be wind or animal powered. :)
Oh yes, I agree. The "big problem" for the city is that nothing has yet
been constructed ;-) The citizen are starting to riot...
Depending on need for particular scenes, these constructs may come into
existence some day. I do not expect to finish building the city within
my life time but all kind of little things will be added slowly over the
years.
>
> Looks great, a very calm day obviously. ;)
> The sea is so still...
Very calm. More movement and surf zones should be worked on in the
future, at least for suggesting the thing.
If I were to model a realistic sea surface I probably would use an
isosurface but that would slow down my overall render time and that is
not what I need presently.
>
> The river/sea boundary is fairly convincing; but if I may criticise... :)
Of course! All comments are always welcome :-)
>
> IMO the river water is a bit _too_ muddy. Maybe use less red, and a lighter
> blue?
That is a matter of debate (also with myself). The truth of course is
that this river is an impossibility in the present geographical setting:
in a microtidal environment like the Mediterranean it should build a
delta (Ebro, Rhone, Nile) instead of just flowing out of an estuary.
This means it looses its silt load somewhere else. I have ideas about
that of course... ;-) Fortunately artistic liberty is allowed...
About your comment: it could be less muddy, but lets say that in certain
times of the year there are stronger loads than in others, for instance
after the rainy season.
> Also, you'd expect to see some sort of channel around the middle of the river;
> the cliffs either side imply that the river is reasonably deep.
Not necessarily. The river *is* the channel, without much flats an the
sides.
>
> There is also a pool on the island the viewer is on. It looks very blue, but
> surely couldn't be any deeper than a few feet?
The sea water is probably too blue.
>
> Ok, I've finished nit-picking. ;)
Uff... [wipes sweat from brow]
Good comments!
>
> I really like it, it's great. :D
Thanks indeed!
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |