POV-Ray : Newsgroups : povray.object-collection : Problems with bubble.inc : Re: Problems with bubble.inc Server Time
29 Jan 2023 19:45:29 EST (-0500)
  Re: Problems with bubble.inc  
From: Kenneth
Date: 3 Mar 2014 07:55:01
Message: <web.53147b0b8dbb84aec2d977c20@news.povray.org>
"mone" <mon### [at] alienenterprisesde> wrote:

>
> #include "bubble.inc"
> // Example from bubble.inc file
> #declare bblTexture = texture {finish {ambient 0.3 diffuse 0.1 reflection 0.25
> specular 1 roughness 0.001} pigment {color rgbf <1,1,1,0.7>}}
> #declare bubbleGenerator =
> mBubbleGenerator(0,0.9,0,0,6.5,0,2.4,2.7,0.0005,0.0006,70,bblTexture)

The #declare is not really necessary (even though the author of the bubbles code
suggests it.) You can instead just place this in your scene:

mBubbleGenerator(0,0.9,0,0,6.5,0,2.4,2.7,0.0005,0.0006,70,bblTexture)

.... with no object{...} wrapper. This is because, inside the bubble #macro, the
bubbles are in a union{...}. So the macro itself is like an already- #declared
'object', waiting to be used. (However, if you want to translate or scale the
bubbles in your scene, then an object wrapper would be necessary.)

I had not worked with this macro before; it's very interesting and produces a
nice result. But the two values fBblHeightRngS and fBblHeightRngE seem to be
somewhat non-intuitive.


Post a reply to this message

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