POV-Ray : Newsgroups : povray.newusers : Media or CSG error? Server Time
2 Nov 2024 01:21:29 EDT (-0400)
  Media or CSG error? (Message 1 to 3 of 3)  
From: Soace Munky
Subject: Media or CSG error?
Date: 15 Oct 2004 23:35:43
Message: <4170970f$1@news.povray.org>
Since I'm new to both, its hard to destinguish. Im trying to experiment 
with media by placing a smoke-filled glob inside water.

#declare Media =
media {
	emission 0.05
	intervals 1
	samples 5
	method 3
}
difference {
box {<-4,-1,-1><4,1,1>
      material {water}
     }
isosurface {
         function { f_sphere(x, y, z, 1.2) + f_noise3d(x+X, y+Y, z+Z) }
         contained_by {sphere {< 0, 0, 0>, 1}}
       	interior { media { Media } }
             }
hollow
}

I dont see anything... My guess is that I cant set up proper parameters, 
or I defined the CSG setup wrong for media.
Any help greatly apprecited.


Post a reply to this message

From: Mike Williams
Subject: Re: Media or CSG error?
Date: 16 Oct 2004 02:15:44
Message: <ycTvoFAByLcBFwpd@econym.demon.co.uk>
Wasn't it Soace Munky who wrote:
>Since I'm new to both, its hard to destinguish. Im trying to experiment 
>with media by placing a smoke-filled glob inside water.
>
>#declare Media =
>media {
>       emission 0.05
>       intervals 1
>       samples 5
>       method 3
>}
>difference {
>box {<-4,-1,-1><4,1,1>
>      material {water}
>     }
>isosurface {
>         function { f_sphere(x, y, z, 1.2) + f_noise3d(x+X, y+Y, z+Z) }
>         contained_by {sphere {< 0, 0, 0>, 1}}
>               interior { media { Media } }
>             }
>hollow
>}
>
>I dont see anything... My guess is that I cant set up proper parameters, 
>or I defined the CSG setup wrong for media.
>Any help greatly apprecited.

The problem is that you haven't made the isosurface transparent, so you
can't see the media inside it. Either add a transparent texture to the
isosurface itself or move the "material {water}" so that it applies to
the whole CSG rather than just to the box.

In this particular case you seem to be able to get away without using
"all_intersections" or "max_trace" in the isosurface, but I suggest
setting a sensible value for max_trace anyway.

To get rid of the little holes in the isosurface, set an appropriate
value for max_gradient.

#declare Media =
media {
  emission 0.05
  intervals 1
  samples 5
  method 3
}
difference {
  box {<-4,-1,-1><4,1,1>}
  isosurface {
    function { f_sphere(x, y, z, 1.2) + f_noise3d(x+X, y+Y, z+Z) }
      contained_by {sphere {< 0, 0, 0>, 1}}
      max_trace 4               // for isosurface CSG
      max_gradient 1.6          // to prevent holes
    interior { media { Media } }
    }
  material {water}              // applies to box and isosurface
  hollow
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Soace Munky
Subject: Re: Media or CSG error?
Date: 17 Oct 2004 20:29:37
Message: <41730e71$1@news.povray.org>
Thats what I thought it was...I think I figured it out now. I thought 
that if texture{} wasnt specified, for some reason it would be nonexistant.
This leads to another question, however. What to do with the texture of 
the bubble... gonna attept to look this up.
thaks for the advice!


Post a reply to this message

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