POV-Ray : Newsgroups : povray.advanced-users : Raindrops on bombshells Server Time
30 Jul 2024 06:29:46 EDT (-0400)
  Raindrops on bombshells (Message 1 to 10 of 10)  
From: Lummox JR
Subject: Raindrops on bombshells
Date: 22 Mar 2000 23:20:39
Message: <38D99CF0.6CFC@aol.com>
I'm trying to flesh out a scene which will have an unexploded bomb lying
in the mud in a rain storm. I've got a nice media for the background
rain, I think, and the scenery is starting to look good, but the bomb
will need to be in the foreground so it has to look like it's been
rained on. Right now I'm designing the bomb apart from the rest of the
scene.
The raindrops use the same isosurface function for the bomb head, but
also slightly modified so that they'll cover the cylindrical section
from 0 to y as well as the tip of the bomb which extends from y to y*2.
(The bomb extends from 0 to y*2, radius 0.5.) Noise is included in the
radius portion of the formula; the bumps that stick out past the bomb
itself are supposed to look like raindrops.
At one point I got the raindrops to look somewhat decent, but some quick
tweaking and they were all screwed up again. I found that when I render
this scene, the raindrops (more like squiggly pools of water) appear to
be more or less black instead of showing through to the chromed bomb
surface; more to the point, they looked like the rays that hit the water
were passing through the bomb completely. I put this in a union because
that made the most sense, but originally the raindrops and the bomb were
separate objects (which didn't work either). My thinking was that in a
union, the inner intersections would be accounted for and thus it would
look right--but perhaps something about the hollowness of the water
surface throws that off.

I'm sure this concept of putting raindrops on a surface is nothing new
under the sun, so if anyone has any insights that would help, I'd
appreciate it. It may be that I'm just going about this all wrong and
should try a different approach.

Lummox JR
------------
// Segment of testbomb.pov
...
// bozo(x,y,z) is an unclipped noise function, like noise3d()-0.5
// if(a,b,c) appears in MegaPOV and is defined as (a>=0)?b:c

#declare raindrops=intersection {
    isosurface {
        function {4*(sqr(x)+sqr(z)-cub(bozo(x*20,y*20,z*20)-0.35)*0.01)+
          if(y-1,-((y-3)*sqr(y-1)+1),-1)}
        accuracy 0.0001
        bounded_by {box {<-0.6,0,-0.6>,<0.6,2.1,0.6>}}
        }
    plane {-y,0}
    texture {
        pigment {color rgbt 1}
        finish {Shiny}
        }
    interior {ior 4/3}
    }

union {
    object {raindrops}
    merge {
        isosurface {
            // 4*(sqr(x)+sqr(z)=(1-(y-1))
            // 4*(sqr(x)+sqr(z)=(y-1)*(1-(y-1))+(1-(y-1))*(1-sqr(y-1))
            function {4*(sqr(x)+sqr(z))-((y-3)*sqr(y-1)+1)}
            accuracy 0.0001
            normal
            bounded_by {box {<-0.6,1,-0.6>,<0.6,2.1,0.6>}}
            }
        cylinder {0,y,0.5}
        intersection {
            merge {
                quadric {<400,0,4>,<0,0,0>,<0,1,0>,-1 translate z*0.25}
                quadric {<400,0,4>,<0,0,0>,<0,1,0>,-1 translate z*0.25
rotate y*120}
                quadric {<400,0,4>,<0,0,0>,<0,1,0>,-1 translate z*0.25
rotate -y*120}
                }
            merge {
                plane {-y,0}
                intersection {quadric {<-1,1,-1>,<0,0,0>,<0,-1,0>,0.25}
plane {y,0.5} plane {-y,0.5}}
                }
            bounded_by {cylinder {-y*0.51,y*0.751,0.751}}
            }
        }
    texture {
        Chrome_Texture
        pigment {
            function {if(-z,labelpigment(atan(-x/z)*0.5,y-0.75,1),0)}
            color_map {
                [0.1 color LightGray]
                [0.4 color rgb<1,0.9,0.1>]
                [0.6 color rgb<1,0.9,0.1>]
                [0.9 color Black]
                }
            }
        finish {
            ambient 0.3
            diffuse 0.7
            reflection 0.3
            brilliance 8
            specular 0.8
            roughness 0.1
            }
        }
    }


Post a reply to this message

From: Ken
Subject: Re: Raindrops on bombshells
Date: 22 Mar 2000 23:41:47
Message: <38D9A0DA.7484EA88@pacbell.net>
Lummox JR wrote:

> At one point I got the raindrops to look somewhat decent, but some quick
> tweaking and they were all screwed up again. I found that when I render
> this scene, the raindrops (more like squiggly pools of water) appear to
> be more or less black instead of showing through to the chromed bomb
> surface; more to the point, they looked like the rays that hit the water
> were passing through the bomb completely. I put this in a union because
> that made the most sense, but originally the raindrops and the bomb were
> separate objects (which didn't work either). My thinking was that in a
> union, the inner intersections would be accounted for and thus it would
> look right--but perhaps something about the hollowness of the water
> surface throws that off.

Try upping the max_trace_level in global settings. That should help with
the black rain drops part of your problem.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Gail Shaw
Subject: Re: Raindrops on bombshells
Date: 23 Mar 2000 01:01:36
Message: <38d9b340@news.povray.org>
>The raindrops use the same isosurface function for the bomb head, but
>also slightly modified so that they'll cover the cylindrical section
>from 0 to y as well as the tip of the bomb which extends from y to y*2.
>(The bomb extends from 0 to y*2, radius 0.5.) Noise is included in the
>radius portion of the formula; the bumps that stick out past the bomb
>itself are supposed to look like raindrops.


Have a look at the megapov docs section 5.2.5.

<quote>

5.2.5. CSG-operation
[default MAX_TRACE = 1 ]

This is either an integer or the keyword all_intersections and it specifies

the object in a CSG, 1 is usually sufficient.

</quote>

Might help

Gail
********************************************************************
* gsh### [at] monotixcoza              * Reality.dat not found         *
* http://www.rucus.ru.ac.za/~gail/ * Attempting to reboot universe *
********************************************************************
* Document program code? Why do you think it's called code?        *
********************************************************************


Post a reply to this message

From: Bob Hughes
Subject: Re: Raindrops on bombshells
Date: 23 Mar 2000 01:47:29
Message: <38d9be01@news.povray.org>
Just a thought... any chance there could be coincident surfaces?  Maybe a zoomed
in view of one of the "wrong" places might show random pixelization if so,
although the textures might need to be more colorful to show that.

Bob

"Lummox JR" <Lum### [at] aolcom> wrote in message news:38D### [at] aolcom...
| The raindrops use the same isosurface function for the bomb head, but
| also slightly modified so that they'll cover the cylindrical section
| from 0 to y as well as the tip of the bomb which extends from y to y*2.
| At one point I got the raindrops to look somewhat decent, but some quick
| tweaking and they were all screwed up again. I found that when I render
| this scene, the raindrops (more like squiggly pools of water) appear to
| be more or less black instead of showing through to the chromed bomb
| surface; more to the point, they looked like the rays that hit the water
| were passing through the bomb completely


Post a reply to this message

From: Lummox JR
Subject: Re: Raindrops on bombshells
Date: 23 Mar 2000 22:10:49
Message: <38DADE16.E68@aol.com>
Ken wrote:
> Try upping the max_trace_level in global settings. That should help with
> the black rain drops part of your problem.

I thought of that, but with max_trace_level set to 100 I had the same
problem.

Lummox JR


Post a reply to this message

From: Lummox JR
Subject: Re: Raindrops on bombshells
Date: 23 Mar 2000 22:12:48
Message: <38DADE8D.4299@aol.com>
Gail Shaw wrote:
> [default MAX_TRACE = 1 ]
> 

> This is either an integer or the keyword all_intersections and it speci
fies

e using
> the object in a CSG, 1 is usually sufficient.

I thought that sounded good, but unfortunately it didn't work. With
max_trace set as high as it would go, there was no change.

Lummox JR


Post a reply to this message

From: Lummox JR
Subject: Re: Raindrops on bombshells
Date: 23 Mar 2000 22:18:29
Message: <38DADFE2.4AE9@aol.com>
Bob Hughes wrote:
> 
> Just a thought... any chance there could be coincident surfaces?  Maybe a zoomed
> in view of one of the "wrong" places might show random pixelization if so,
> although the textures might need to be more colorful to show that.

Well that's not really the problem. Although the surfaces overlap, the
raindrops surface passes sort of in and out--they shouldn't match up in
both position and surface normal at any point.
The problem is that rays are passing through one of the objects where
they shouldn't. There's no real explanation for it.

Lummox JR


Post a reply to this message

From: Lummox JR
Subject: Re: Raindrops on bombshells
Date: 23 Mar 2000 22:59:32
Message: <38DAE981.4E75@aol.com>
All right, I've taken the advice I could take and still nothing has
helped, so I'm posting the image to povray.binaries.images to help
illustrate the problem.
Max_trace hasn't helped, and max_trace_level I'd tried before the
original posting. The problem seems to be most pronounced at the edges
of the drops, but other than that it doesn't suggest anything.

Lummox JR


Post a reply to this message

From: Warp
Subject: Re: Raindrops on bombshells
Date: 24 Mar 2000 04:00:21
Message: <38db2ea5@news.povray.org>
Rays passing through the isosurface at sharp angles sounds like an
accuracy problem (it shouldn't be a normal bug since it has been fixed (?) ).
  Try increasing the accuracy of your isosurface.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Lummox JR
Subject: Re: Raindrops on bombshells
Date: 24 Mar 2000 19:38:21
Message: <38DC0BDD.6915@aol.com>
Warp wrote:
> 
>   Rays passing through the isosurface at sharp angles sounds like an
> accuracy problem (it shouldn't be a normal bug since it has been fixed (?) ).
>   Try increasing the accuracy of your isosurface.

Well, what do you know? It worked. I figured once two people started
giving me the same advice, they must be closer to the truth. The new
render comes out just fine.
Thanks a bunch, everyone, for your help.

Lummox JR


Post a reply to this message

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