POV-Ray : Newsgroups : povray.object-collection : Problems with bubble.inc Server Time
21 Nov 2024 07:01:54 EST (-0500)
  Problems with bubble.inc (Message 1 to 4 of 4)  
From: mone
Subject: Problems with bubble.inc
Date: 2 Mar 2014 07:55:01
Message: <web.5313297c1f0c1bb0eaaefd950@news.povray.org>
Hi,

I need some nice bubbles for a nearly finished illustration, so I've checked out
the "Carbonated fluid bubble generator" from the objects collection.


I just dumped a camera and two area lights and a background into the scene (see
below) and added the lines with the example from the .inc file.

However, I can't find a single bubble in the rendered image (tried to fiddle
around with the camera position and lights abit, but still I don't see
anything).

Any suggestions, what could be the problem?

Thanks a lot,

Simone

--------

// perspective (default) camera
camera {
  location  <0.0, 2.0, -8.0>
  look_at   <0.0, 0.0,  0.0>
  right     x*image_width/image_height

}

// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source {
  0*x                 // light's position (translated below)
  color rgb 1.0       // light's color
  area_light
  <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  circular            // make the shape of the light circular
  orient              // orient light
  translate <40, 80, -40>   // <x y z> position of light
}




// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source {
  0*x                 // light's position (translated below)
  color rgb 1.0       // light's color
  area_light
  <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  circular            // make the shape of the light circular
  orient              // orient light
  translate <40, 80, 40>   // <x y z> position of light
}

 // set a color of the background (sky)
background { color rgb <0.4, 0.4, 0.4> }



#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)


Post a reply to this message

From: FractRacer
Subject: Re: Problems with bubble.inc
Date: 2 Mar 2014 08:04:35
Message: <53132c63$1@news.povray.org>

> // perspective (default) camera
> camera {
>    location  <0.0, 2.0, -8.0>
>    look_at   <0.0, 0.0,  0.0>
>    right     x*image_width/image_height
>
> }
>
> // An area light (creates soft shadows)
> // WARNING: This special light can significantly slow down rendering times!
> light_source {
>    0*x                 // light's position (translated below)
>    color rgb 1.0       // light's color
>    area_light
>    <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
>    4, 4                // total number of lights in grid (4x*4z = 16 lights)
>    adaptive 0          // 0,1,2,3...
>    jitter              // adds random softening of light
>    circular            // make the shape of the light circular
>    orient              // orient light
>    translate <40, 80, -40>   // <x y z> position of light
> }
>
>
>
>
> // An area light (creates soft shadows)
> // WARNING: This special light can significantly slow down rendering times!
> light_source {
>    0*x                 // light's position (translated below)
>    color rgb 1.0       // light's color
>    area_light
>    <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
>    4, 4                // total number of lights in grid (4x*4z = 16 lights)
>    adaptive 0          // 0,1,2,3...
>    jitter              // adds random softening of light
>    circular            // make the shape of the light circular
>    orient              // orient light
>    translate <40, 80, 40>   // <x y z> position of light
> }
>
>   // set a color of the background (sky)
> background { color rgb <0.4, 0.4, 0.4> }
>
>
>
> #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)

Hello,

The last line of your code declare only the object, you must call the 
object, add the following to your code:
object {bubbleGenerator}

Lionel.

-- 
Do not judge my words, judge my actions.

---

http://www.avast.com


Post a reply to this message

From: mone
Subject: Re: Problems with bubble.inc
Date: 2 Mar 2014 08:15:01
Message: <web.53132dfa8dbb84aeeaaefd950@news.povray.org>
>
> Hello,
>
> The last line of your code declare only the object, you must call the
> object, add the following to your code:
> object {bubbleGenerator}
>
> Lionel.
>
> --
> Do not judge my words, judge my actions.
>
> ---

 active.
> http://www.avast.com



Ah, I see. Now it works! Thank you very much, Lionel!


Simone


Post a reply to this message

From: Kenneth
Subject: Re: Problems with bubble.inc
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-2023 Persistence of Vision Raytracer Pty. Ltd.