POV-Ray : Newsgroups : povray.binaries.images : Blobs as container Server Time
17 Nov 2024 06:24:05 EST (-0500)
  Blobs as container (Message 1 to 7 of 7)  
From: JC (Exether)
Subject: Blobs as container
Date: 14 Dec 2004 10:04:13
Message: <41bf00ed@news.povray.org>
Hi,

For my PovComp WIP, I'm trying to use blobs as liquid containers. I have 
made a little scene to illustrate the problem I have.
In this scene you see eight containers, on the right are two CSG 
containers to check if the problem appears. On the left you have 3 
series of blob container from deep on the right to shallow on the left.
They are all filled with liquid, first plane, the containers are filled 
with a semi sphere that is a little bigger than the hole (which is what 
I would like to do) and second plane, the liquid is 'differenced' to be 
a little bit smaller than the hole.

As you can see all the first plane blob containers have a line appearing 
at the contact between the liquid's surface and the container. And this 
line gets thicker as the slope is less steep.

Is this a bug ? Is it something I made wrong (I made the code available) 
? Is there any way to avoid it ?

Thanks for your help,

JC


Post a reply to this message


Attachments:
Download 'essai_fringe.jpg' (38 KB) Download 'us-ascii' (4 KB)

Preview of image 'essai_fringe.jpg'
essai_fringe.jpg

From: Alain
Subject: Re: Blobs as container
Date: 14 Dec 2004 19:56:28
Message: <41bf8bbc@news.povray.org>
JC (Exether) nous apporta ses lumieres ainsi en ce 2004-12-14 10:03... :

> Hi,
>
> For my PovComp WIP, I'm trying to use blobs as liquid containers. I 
> have made a little scene to illustrate the problem I have.
> In this scene you see eight containers, on the right are two CSG 
> containers to check if the problem appears. On the left you have 3 
> series of blob container from deep on the right to shallow on the left.
> They are all filled with liquid, first plane, the containers are 
> filled with a semi sphere that is a little bigger than the hole (which 
> is what I would like to do) and second plane, the liquid is 
> 'differenced' to be a little bit smaller than the hole.
>
> As you can see all the first plane blob containers have a line 
> appearing at the contact between the liquid's surface and the 
> container. And this line gets thicker as the slope is less steep.
>
> Is this a bug ? Is it something I made wrong (I made the code 
> available) ? Is there any way to avoid it ?
>
> Thanks for your help,
>
> JC
>
> ------------------------------------------------------------------------
>
>
>------------------------------------------------------------------------
>
>// Persistence of Vision Ray Tracer Scene Description File
>// File: ?.pov
>// Vers: 3.5
>// Desc: Radiosity Scene Template
>// Date: mm/dd/yy
>// Auth: ?
>//
>
>#version 3.5;
>
>#declare Radiosity=on;
>
>global_settings {
>  assumed_gamma 1.5
>  #if (Radiosity)
>    radiosity {
>      pretrace_start 0.08
>      pretrace_end   0.01
>      count 50           
>      nearest_count 5    
>      error_bound 0.9    
>    }
>  #end
>}
>
>#default {
>  texture {
>    pigment {rgb 1}
>    #if (Radiosity)
>      finish {
>        ambient 0.0
>        diffuse 0.6
>        specular 0.3
>      }
>    #else
>      finish {
>        ambient 0.1
>        diffuse 0.6
>        specular 0.3
>      }
>    #end
>  }
>}
>
>// ----------------------------------------
>
>camera {
>  right x*image_width/image_height
>  location  <0,3,-4>
>  look_at   <0,1,0>
>  angle 55
>}
>
>light_source {
>  <40,30,-45>       // light's position
>  color rgb <1, 1, 1>  // light's color
>}
>
>// ----------------------------------------
>
>plane { y, 0 }
>plane { y, -10 }
>
>#declare M_Water= material {
>        texture{
>            #declare SC=1/255;
>            pigment{rgbt <SC*57, SC*63, SC*66, 0.9>}
>            finish{ambient 0 diffuse 0.3 reflection {0,1 fresnel on} conserve_energy
specular 0.4 roughness 0.003 }
>        }
>        interior{
>            ior 1.34
>            fade_distance 1
>            fade_power 1001
>            fade_color rgbt <SC*37, SC*63, SC*45, 0.7>
>        }
>}
>
>// create a smooth blobby shape
>#declare RadiusVal   = 1.0; // (0 < RadiusVal) outer sphere of influence on other
components
>#declare StrengthVal = 1.0; // (+ or -) strength of component's radiating density
>
>#macro BBassin (thr, flat)
>blob {
>  threshold thr
>  sphere { y, RadiusVal, StrengthVal }
>  sphere { <0,1.5*flat,0>, RadiusVal*0.7*flat, -StrengthVal }
>  sphere { <0,1.2*flat,0>, RadiusVal*0.5*flat, -StrengthVal }
>}
>#end
>
>#local SBassin1 = difference {
>  sphere { <0,1,0>, 0.6 }
>  sphere { <0,1.5,0>, 0.5 }
>  sphere { <0,1.2,0>, 0.4 }
>}
>#local SBassin2 = difference {
>  sphere { <0,1,0>, 0.59 }
>  sphere { <0,1.5,0>, 0.49 }
>  sphere { <0,1.2,0>, 0.4 }
>}
>
>
>#declare Water = intersection {
>  sphere { <0,1.15,0>, 0.5 }
>  cylinder { <0,0.7,0>, <0,1.15,0>, 0.51 }
>}
>
>#local e=0.6;
>union {
>  object { BBassin (0.4, 1.0) }
>  object { Water material { M_Water } }
>  translate <e,0,-e>
>}
>union {
>  object { BBassin (0.4, 1.0) }
>  difference { object { Water } object { BBassin (0.39,1.0) } material { M_Water } }
>  translate <e,0,e>
>}
>union {
>  object { BBassin (0.4, 1.1) }
>  object { Water material { M_Water } }
>  translate <-e,0,-e>
>}
>union {
>  object { BBassin (0.4, 1.1) }
>  difference { object { Water } object { BBassin (0.39,1.1) } material { M_Water } }
>  translate <-e,0,e>
>}
>union {
>  object { BBassin (0.4, 1.2) }
>  object { Water material { M_Water } }
>  translate <-3*e,0,-e>
>}
>union {
>  object { BBassin (0.4, 1.2) }
>  difference { object { Water } object { BBassin (0.39,1.2) } material { M_Water } }
>  translate <-3*e,0,e>
>}
>union {
>  object { SBassin1 }
>  object { Water material { M_Water } }
>  translate <3*e,0,-e>
>}
>union {
>  object { SBassin1 }
>  difference { object { Water } object { SBassin2 } material { M_Water } }
>  translate <3*e,0,e>
>}
>
>  
>
You've been hit by a bad case of 
ray-misses-the-intersection-between-two-surfaces-and-hit-what's-behind!
Adding a different interior_textures to each examples give me 6 
differently coloured areas where you have black.
My render (raised the camera a bit, no radiosity, interior with ambient 1):

Alain


Post a reply to this message


Attachments:
Download 'essai_fringe.png' (86 KB)

Preview of image 'essai_fringe.png'
essai_fringe.png


 

From: JC (Exether)
Subject: Re: Blobs as container
Date: 15 Dec 2004 03:37:37
Message: <41bff7d1@news.povray.org>
Argh ...
Any hope I can lower these artifact (increasing precision ??) ?
At least you provided me with some kind of work around, I'll color the 
interior with something harder to see than black.

POVComp computer is mine !!!  ;-))

Thanks,

Alain wrote:
> JC (Exether) nous apporta ses lumieres ainsi en ce 2004-12-14 10:03... :
> 
>> Hi,
>>
>> For my PovComp WIP, I'm trying to use blobs as liquid containers. I 
>> have made a little scene to illustrate the problem I have.
>> In this scene you see eight containers, on the right are two CSG 
>> containers to check if the problem appears. On the left you have 3 
>> series of blob container from deep on the right to shallow on the left.
>> They are all filled with liquid, first plane, the containers are 
>> filled with a semi sphere that is a little bigger than the hole (which 
>> is what I would like to do) and second plane, the liquid is 
>> 'differenced' to be a little bit smaller than the hole.
>>
>> As you can see all the first plane blob containers have a line 
>> appearing at the contact between the liquid's surface and the 
>> container. And this line gets thicker as the slope is less steep.
>>
>> Is this a bug ? Is it something I made wrong (I made the code 
>> available) ? Is there any way to avoid it ?
>>
>> Thanks for your help,
>>
>> JC
>>
>> ------------------------------------------------------------------------
>>
> You've been hit by a bad case of 
> ray-misses-the-intersection-between-two-surfaces-and-hit-what's-behind!
> Adding a different interior_textures to each examples give me 6 
> differently coloured areas where you have black.
> My render (raised the camera a bit, no radiosity, interior with ambient 1):
> 
> Alain
> 
> ------------------------------------------------------------------------
>


Post a reply to this message

From: JC (Exether)
Subject: Re: Blobs as container
Date: 15 Dec 2004 04:39:53
Message: <41c00669@news.povray.org>
errr ...
What interior exactly did you change ? Do you have a code sample ?

JC

Alain wrote:
> JC (Exether) nous apporta ses lumieres ainsi en ce 2004-12-14 10:03... :
> 
>> Hi,
>>
>> For my PovComp WIP, I'm trying to use blobs as liquid containers. I 
>> have made a little scene to illustrate the problem I have.
>> In this scene you see eight containers, on the right are two CSG 
>> containers to check if the problem appears. On the left you have 3 
>> series of blob container from deep on the right to shallow on the left.
>> They are all filled with liquid, first plane, the containers are 
>> filled with a semi sphere that is a little bigger than the hole (which 
>> is what I would like to do) and second plane, the liquid is 
>> 'differenced' to be a little bit smaller than the hole.
>>
>> As you can see all the first plane blob containers have a line 
>> appearing at the contact between the liquid's surface and the 
>> container. And this line gets thicker as the slope is less steep.
>>
>> Is this a bug ? Is it something I made wrong (I made the code 
>> available) ? Is there any way to avoid it ?
>>
>> Thanks for your help,
>>
>> JC
>>
>> ------------------------------------------------------------------------
> You've been hit by a bad case of 
> ray-misses-the-intersection-between-two-surfaces-and-hit-what's-behind!
> Adding a different interior_textures to each examples give me 6 
> differently coloured areas where you have black.
> My render (raised the camera a bit, no radiosity, interior with ambient 1):
> 
> Alain
> 
> ------------------------------------------------------------------------


Post a reply to this message

From: Jellby
Subject: Re: Blobs as container
Date: 15 Dec 2004 16:03:56
Message: <41c0a6bc@news.povray.org>
Among other things, JC (Exether) saw fit to write:

> errr ...
> What interior exactly did you change ? Do you have a code sample ?

I guess it's the blobs' interior, but I didn't try it...

-- 

            / /\
Linux user / /  \
#289967   / / /\ \ PGP Pub Key
         / / /\ \ \ 0x01A95F99
        / /_/__\ \ \
       /________\ \ \
jellby \___________\/ yahoo.com


Post a reply to this message

From: Alain
Subject: Re: Blobs as container
Date: 17 Dec 2004 22:46:35
Message: <41c3a81b$1@news.povray.org>
JC (Exether) nous apporta ses lumieres ainsi en ce 2004-12-15 04:39... :

> errr ...
> What interior exactly did you change ? Do you have a code sample ?

The interior of each blob.

>
> JC
>
> Alain wrote:
>
>> JC (Exether) nous apporta ses lumieres ainsi en ce 2004-12-14 10:03... :
>>
>>> Hi,
>>>
>>> For my PovComp WIP, I'm trying to use blobs as liquid containers. I 
>>> have made a little scene to illustrate the problem I have.
>>> In this scene you see eight containers, on the right are two CSG 
>>> containers to check if the problem appears. On the left you have 3 
>>> series of blob container from deep on the right to shallow on the left.
>>> They are all filled with liquid, first plane, the containers are 
>>> filled with a semi sphere that is a little bigger than the hole 
>>> (which is what I would like to do) and second plane, the liquid is 
>>> 'differenced' to be a little bit smaller than the hole.
>>>
>>> As you can see all the first plane blob containers have a line 
>>> appearing at the contact between the liquid's surface and the 
>>> container. And this line gets thicker as the slope is less steep.
>>>
>>> Is this a bug ? Is it something I made wrong (I made the code 
>>> available) ? Is there any way to avoid it ?
>>>
>>> Thanks for your help,
>>>
>>> JC
>>>
>>> ------------------------------------------------------------------------ 
>>>
>>
>> You've been hit by a bad case of 
>> ray-misses-the-intersection-between-two-surfaces-and-hit-what's-behind!
>> Adding a different interior_textures to each examples give me 6 
>> differently coloured areas where you have black.
>> My render (raised the camera a bit, no radiosity, interior with 
>> ambient 1):
>>
>> Alain
>>
>> ------------------------------------------------------------------------
>
Sory for the late reply: compoter corruption :(
You need to use a texture in each object and follow it with an 
interior_texture. You can remove the default{} block completely. It 
seems impossible to add interior_texture in the default block.
Sample code:
union {
object { BBassin (0.4, 1.2) texture {
pigment {rgb 1}
#if (Radiosity)
finish {
ambient 0.0
diffuse 0.6
specular 0.3
}
#else
finish {
ambient 0.1
diffuse 0.6
specular 0.3
}
#end
interior_texture{pigment{rgb<1,0,0>}finish{ambient 1}}
}
difference { object { Water } object { BBassin (0.39,1.2) } material { 
M_Water } }
translate <-3*e,0,e>
}


Alain


Post a reply to this message

From: JC (Exether)
Subject: Re: Blobs as container
Date: 19 Dec 2004 16:59:19
Message: <41c5f9b7@news.povray.org>
Oki, thanks, I didn't know about this feature, cool :-)

JC

Alain wrote:

> JC (Exether) nous apporta ses lumieres ainsi en ce 2004-12-15 04:39... :
> 
>> errr ...
>> What interior exactly did you change ? Do you have a code sample ?
> 
> 
> The interior of each blob.
> 
>>
>> JC
>>
>> Alain wrote:
>>
>>> JC (Exether) nous apporta ses lumieres ainsi en ce 2004-12-14 10:03... :
>>>
>>>> Hi,
>>>>
>>>> For my PovComp WIP, I'm trying to use blobs as liquid containers. I 
>>>> have made a little scene to illustrate the problem I have.
>>>> In this scene you see eight containers, on the right are two CSG 
>>>> containers to check if the problem appears. On the left you have 3 
>>>> series of blob container from deep on the right to shallow on the left.
>>>> They are all filled with liquid, first plane, the containers are 
>>>> filled with a semi sphere that is a little bigger than the hole 
>>>> (which is what I would like to do) and second plane, the liquid is 
>>>> 'differenced' to be a little bit smaller than the hole.
>>>>
>>>> As you can see all the first plane blob containers have a line 
>>>> appearing at the contact between the liquid's surface and the 
>>>> container. And this line gets thicker as the slope is less steep.
>>>>
>>>> Is this a bug ? Is it something I made wrong (I made the code 
>>>> available) ? Is there any way to avoid it ?
>>>>
>>>> Thanks for your help,
>>>>
>>>> JC
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>
>>>
>>> You've been hit by a bad case of 
>>> ray-misses-the-intersection-between-two-surfaces-and-hit-what's-behind!
>>> Adding a different interior_textures to each examples give me 6 
>>> differently coloured areas where you have black.
>>> My render (raised the camera a bit, no radiosity, interior with 
>>> ambient 1):
>>>
>>> Alain
>>>
>>> ------------------------------------------------------------------------
>>
>>
> Sory for the late reply: compoter corruption :(
> You need to use a texture in each object and follow it with an 
> interior_texture. You can remove the default{} block completely. It 
> seems impossible to add interior_texture in the default block.
> Sample code:
> union {
> object { BBassin (0.4, 1.2) texture {
> pigment {rgb 1}
> #if (Radiosity)
> finish {
> ambient 0.0
> diffuse 0.6
> specular 0.3
> }
> #else
> finish {
> ambient 0.1
> diffuse 0.6
> specular 0.3
> }
> #end
> interior_texture{pigment{rgb<1,0,0>}finish{ambient 1}}
> }
> difference { object { Water } object { BBassin (0.39,1.2) } material { 
> M_Water } }
> translate <-3*e,0,e>
> }
> 
> 
> Alain


-- 
http://exether.free.fr/irtc (more IRTC stats !)


Post a reply to this message

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