POV-Ray : Newsgroups : povray.general : Difference Small objects and Glass Cube Server Time
15 Nov 2024 11:14:53 EST (-0500)
  Difference Small objects and Glass Cube (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: nomail
Subject: Difference Small objects and Glass Cube
Date: 11 Sep 2004 17:05:01
Message: <web.41436796cff0a9d21858e3680@news.povray.org>
Hi to all
I wolud like to make a scene with many (about 10000 objects (spheres).
Those spheres will be in union like one object: a that object will be in
difference with box:
difference { // CSG001
  box { // Cube001
    <-1, -1, -1>, <1, 1, 1>
  }
  object { CSG002 }
  ....
So question is box will be "made of glass": what is smallest size of spheres
used in object that produce visible effect when differenced from cube.
Thanks for any reply.


Post a reply to this message

From: Warp
Subject: Re: Difference Small objects and Glass Cube
Date: 11 Sep 2004 17:27:24
Message: <41436dbc@news.povray.org>
nomail@nomail wrote:
> I wolud like to make a scene with many (about 10000 objects (spheres).
> Those spheres will be in union like one object: a that object will be in
> difference with box:

  Slightly beside the point, but be aware that unfortunately that's one
of the slowest form of CSG in POV-Ray (ie. one of the most pathological
cases with regard to rendering speed).
  There are several tricks to work around this speed problem and which
give the same result, but I don't remember specifics right now.

> So question is box will be "made of glass": what is smallest size of spheres
> used in object that produce visible effect when differenced from cube.

  That would depend on the resolution of the rendered image and the size
of the sphere on this image, plus a ton of other things. There's no
specific answer to that question.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: nomail
Subject: Re: Difference Small objects and Glass Cube
Date: 11 Sep 2004 17:50:00
Message: <web.414372bb8f309b731858e3680@news.povray.org>
>   Slightly beside the point, but be aware that unfortunately that's one
> of the slowest form of CSG in POV-Ray (ie. one of the most pathological
> cases with regard to rendering speed).
>   There are several tricks to work around this speed problem and which
> give the same result, but I don't remember specifics right now.
>   That would depend on the resolution of the rendered image and the size
> of the sphere on this image, plus a ton of other things. There's no
> specific answer to that question.

If you remember or if you have some link with theme like this : i would like
if you shared it :)
Thanks any way.


Post a reply to this message

From: Alain
Subject: Re: Difference Small objects and Glass Cube
Date: 11 Sep 2004 19:13:04
Message: <41438680$1@news.povray.org>
nomail@nomail nous apporta ses lumieres ainsi en ce 2004-09-11 17:01... :

>Hi to all
>I wolud like to make a scene with many (about 10000 objects (spheres).
>Those spheres will be in union like one object: a that object will be in
>difference with box:
>difference { // CSG001
>  box { // Cube001
>    <-1, -1, -1>, <1, 1, 1>
>  }
>  object { CSG002 }
>  ....
>So question is box will be "made of glass": what is smallest size of spheres
>used in object that produce visible effect when differenced from cube.
>Thanks for any reply.
>
>
>  
>
A trick that may work:
do an union of your spheres and the box, and give each spheres an 
interior with an ior of 1 or less and an ior of 1.5 to the box.
There won't be actual holes in the box, but it will looks like 
holes/bubbles in a clear block.
I'll try it myself.

Alain


Post a reply to this message

From: Mike Williams
Subject: Re: Difference Small objects and Glass Cube
Date: 12 Sep 2004 01:42:21
Message: <4IECcXAvB+QBFw5+@econym.demon.co.uk>
Wasn't it Warp who wrote:
>nomail@nomail wrote:
>> I wolud like to make a scene with many (about 10000 objects (spheres).
>> Those spheres will be in union like one object: a that object will be in
>> difference with box:
>
>  Slightly beside the point, but be aware that unfortunately that's one
>of the slowest form of CSG in POV-Ray (ie. one of the most pathological
>cases with regard to rendering speed).
>  There are several tricks to work around this speed problem and which
>give the same result, but I don't remember specifics right now.

Read all about the problem, and a couple of tricks for getting round it,
on my pages 
<http://www.econym.demon.co.uk/holetut/index.htm>
<http://www.econym.demon.co.uk/holetut/holes2.htm>

Since you're working with simple shapes (box and sphere), the isosurface
method might code quite nicely.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Warp
Subject: Re: Difference Small objects and Glass Cube
Date: 12 Sep 2004 05:47:18
Message: <41441b26@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> <http://www.econym.demon.co.uk/holetut/index.htm>
> <http://www.econym.demon.co.uk/holetut/holes2.htm>

  That's an excellent tutorial about this problem.
  Perhaps worth inclusion in the Q&T site (http://tag.povray.org/povQandT/)
if you are interested...

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: nomail
Subject: Re: Difference Small objects and Glass Cube
Date: 12 Sep 2004 10:40:00
Message: <web.41445ea98f309b731858e3680@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Mike Williams <nos### [at] econymdemoncouk> wrote:
> > <http://www.econym.demon.co.uk/holetut/index.htm>
> > <http://www.econym.demon.co.uk/holetut/holes2.htm>
>
>   That's an excellent tutorial about this problem.
>   Perhaps worth inclusion in the Q&T site (http://tag.povray.org/povQandT/)
> if you are interested...
>
> --
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -

I read you tutorials but that is not what I want. If you can click on the
next link: http://www.bathsheba.com/crystalsci/lorenz/ and sow what kind of
picture I want to make. I also read about using glowes (MEGAPOV): or using
simple picture with alpha chanell..
Have you any other idea?


Post a reply to this message

From: andrel
Subject: Re: Difference Small objects and Glass Cube
Date: 12 Sep 2004 10:54:48
Message: <414462C0.6010104@hotmail.com>
nomail@nomail wrote:

> Warp <war### [at] tagpovrayorg> wrote:
> 
>>Mike Williams <nos### [at] econymdemoncouk> wrote:
>>
>>><http://www.econym.demon.co.uk/holetut/index.htm>
>>><http://www.econym.demon.co.uk/holetut/holes2.htm>
>>
>>  That's an excellent tutorial about this problem.
>>  Perhaps worth inclusion in the Q&T site (http://tag.povray.org/povQandT/)
>>if you are interested...
>>
>>--
>>#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
>>[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
>>-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
> 
> 
> I read you tutorials but that is not what I want. If you can click on the
> next link: http://www.bathsheba.com/crystalsci/lorenz/ and sow what kind of
> picture I want to make. I also read about using glowes (MEGAPOV): or using
> simple picture with alpha chanell..
> Have you any other idea?
> 
If that is what you want, a box with a lot of bubbles as a difference is
overkill. It will take a lot more time without changing the
visualization compared to just adding them together. The bubbles will be
so small that you won't notice any refraction.

>


Post a reply to this message

From: Slime
Subject: Re: Difference Small objects and Glass Cube
Date: 12 Sep 2004 13:12:46
Message: <4144838e$1@news.povray.org>
> I read you tutorials but that is not what I want. If you can click on the
> next link: http://www.bathsheba.com/crystalsci/lorenz/ and sow what kind
of
> picture I want to make. I also read about using glowes (MEGAPOV): or using
> simple picture with alpha chanell..
> Have you any other idea?

Unless you're going to be looking at this thing really close up, I would
suggest using a box-like object filled with scattering media.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Mike Williams
Subject: Re: Difference Small objects and Glass Cube
Date: 12 Sep 2004 15:51:28
Message: <c8NLBFAPhKRBFw2T@econym.demon.co.uk>
Wasn't it andrel who wrote:
>
>
>nomail@nomail wrote:
>
>> Warp <war### [at] tagpovrayorg> wrote:
>> 
>>>Mike Williams <nos### [at] econymdemoncouk> wrote:
>>>
>>>><http://www.econym.demon.co.uk/holetut/index.htm>
>>>><http://www.econym.demon.co.uk/holetut/holes2.htm>
>>>
>>>  That's an excellent tutorial about this problem.
>>>  Perhaps worth inclusion in the Q&T site (http://tag.povray.org/povQandT/)
>>>if you are interested...
>>>
>>>--
>>>#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
>>>[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
>>>-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
>> 
>> 
>> I read you tutorials but that is not what I want. If you can click on the
>> next link: http://www.bathsheba.com/crystalsci/lorenz/ and sow what kind of
>> picture I want to make. I also read about using glowes (MEGAPOV): or using
>> simple picture with alpha chanell..
>> Have you any other idea?
>> 
>If that is what you want, a box with a lot of bubbles as a difference is
>overkill. It will take a lot more time without changing the
>visualization compared to just adding them together. The bubbles will be
>so small that you won't notice any refraction.

If none of the bubbles touch the surface of the box, then I think you
can you can get the refractions correct by making a union of the bubbles
and giving them a material{} that's the same as the box except that the
interior ior of the bubbles is set to 1.0

In this way the surface of the bubble is the same as the surface of a
hole, and the ior of the bubble is the same as that of a hole. There are
slight differences if the interior of your glass material uses things
like fade_distance, and the shadows of the bubbles are different from
the shadows of holes. Compare the hole and bubble in this scene:-

global_settings {assumed_gamma 1.0}
camera {location  <0,3,-10> look_at 0 angle 30}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}
                    
#include "colors.inc"                    
#include "glass.inc"

#declare MAT =  material { 
  texture {
    pigment { color Clear }
    finish { F_Glass6 }
  }
  interior { I_Glass1}
}

// A bubble
union {
  box {-1,1 material {MAT}}
  sphere {0,0.8 material {MAT interior {ior 1.0}}}
  translate -1.25*x
}  

// A hole
difference {
  box {-1,1}
  sphere {0,0.8}
  material {MAT}
  translate 1.25*x
}  

plane {y,-1 pigment {rgb 1}}





-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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