POV-Ray : Newsgroups : povray.general : Media and clipped_by, intersection and difference Server Time
7 Nov 2024 00:19:42 EST (-0500)
  Media and clipped_by, intersection and difference (Message 1 to 8 of 8)  
From: Bjorn Jonsson
Subject: Media and clipped_by, intersection and difference
Date: 21 Feb 2004 19:23:19
Message: <MPG.1aa206d25403ff9989691@news.povray.org>
I'm messing with media, trying to create a rocket exhaust plume. I'm 
more or less a beginner when it comes to media stuff. I've been 
moderately successful, however I'm having a problem:

#declare exhaust_half=
intersection  {
   sphere {
      <0,0,0>,2   
      hollow
      no_shadow
      texture { pigment { rgbt 1 } }
      interior  {
         media {
            emission 0.9   method 3 intervals 10
            density  {
               denT3
            }
         }
         media  {
            absorption .2 method 3 intervals 10
            density {
               denT3
            }
         }
      }
   }
// Cut away negative y; doesn't do what I want:
   cylinder {<0,0,0>,<0,1.01,0>,1000}
}

What I'm trying to get here is a media cloud that is not a complete 
sphere but one half of a sphere. The problem is that if I look at this 
from below (camera's y<0) the 'bottom' of the media cloud looks black, 
as if it's opaque. It doesn't matter if I use intersection, difference 
or clipped_by. How can I get a media cloud that is not a complete sphere 
but only for example the part of the sphere with y>0 ?

-- 
Bjorn Jonsson / bjj### [at] ZZZmmediais
Address changed to avoid spam. Remove YYY and
ZZZ to reply.


Post a reply to this message

From: "Jérôme M. Berger"
Subject: Re: Media and clipped_by, intersection and difference
Date: 21 Feb 2004 19:37:10
Message: <4037f9b6$1@news.povray.org>
Two things:
+ I believe your cylinder should read:
	"cylinder {<0,0,0>,<0,2.01,0>,1000}"

+ Youshould first do the intersection, then apply the texture { pigment
rgbt 1 } } and the interior with the media to the whole object instead
of just the sphere.

		Jerome

Bjorn Jonsson wrote:
 > I'm messing with media, trying to create a rocket exhaust plume. I'm
 > more or less a beginner when it comes to media stuff. I've been
 > moderately successful, however I'm having a problem:
 >
 > #declare exhaust_half=
 > intersection  {
 >    sphere {
 >       <0,0,0>,2
 >       hollow
 >       no_shadow
 >       texture { pigment { rgbt 1 } }
 >       interior  {
 >          media {
 >             emission 0.9   method 3 intervals 10
 >             density  {
 >                denT3
 >             }
 >          }
 >          media  {
 >             absorption .2 method 3 intervals 10
 >             density {
 >                denT3
 >             }
 >          }
 >       }
 >    }
 > // Cut away negative y; doesn't do what I want:
 >    cylinder {<0,0,0>,<0,1.01,0>,1000}
 > }
 >
 > What I'm trying to get here is a media cloud that is not a complete
 > sphere but one half of a sphere. The problem is that if I look at this
 > from below (camera's y<0) the 'bottom' of the media cloud looks black,
 > as if it's opaque. It doesn't matter if I use intersection, difference
 > or clipped_by. How can I get a media cloud that is not a complete sphere
 > but only for example the part of the sphere with y>0 ?
 >


Post a reply to this message

From: Hughes, B 
Subject: Re: Media and clipped_by, intersection and difference
Date: 21 Feb 2004 19:59:21
Message: <4037fee9$1@news.povray.org>

news:4037f9b6$1@news.povray.org...
> Two things:
> + I believe your cylinder should read:
> "cylinder {<0,0,0>,<0,2.01,0>,1000}"

Or possibly cylinder {0,2*y,2} ?

> + You should first do the intersection, then apply the texture { pigment
> rgbt 1 } } and the interior with the media to the whole object instead
> of just the sphere.

Common mistake, that, leaving textures out of parts of a CSG and thinking
they'll automatically inherit a parent one.

Bob H.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Media and clipped_by, intersection and difference
Date: 21 Feb 2004 20:21:01
Message: <cjameshuff-FC549F.20214321022004@news.povray.org>
In article <MPG.1aa206d25403ff9989691@news.povray.org>,
 Bjorn Jonsson <bjj### [at] mmediais> wrote:

> What I'm trying to get here is a media cloud that is not a complete 
> sphere but one half of a sphere. The problem is that if I look at this 
> from below (camera's y<0) the 'bottom' of the media cloud looks black, 
> as if it's opaque.

That's because it *is* black and opaque. You have:

intersection  {
   sphere {<0,0,0>, 2
      texture { pigment { rgbt 1 } }
      interior  {...}
   }
   cylinder {<0,0,0>,<0,1.01,0>,1000}
}

That's an intersection of a sphere with a clear texture and a cylinder 
with the default texture, which happens to be black and opaque. You want 
to apply the texture and interior to the intersection, not to just one 
of its parts:
intersection  {
   sphere {<0,0,0>, 2}
   cylinder {<0,0,0>,<0,1.01,0>,1000}
   texture { pigment { rgbt 1 } }
   interior {...}
}


> It doesn't matter if I use intersection, difference 
> or clipped_by. How can I get a media cloud that is not a complete sphere 
> but only for example the part of the sphere with y>0 ?

Well, you shouldn't use clipped_by, because the media starts and stops 
at the surface of the shape, and clipped_by leaves gaps in the surface. 
CSG difference and intersection will work fine, once you get them 
textured right.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Media and clipped_by, intersection and difference
Date: 21 Feb 2004 20:22:00
Message: <cjameshuff-7D545B.20224121022004@news.povray.org>
In article <4037fee9$1@news.povray.org>,
 "Hughes, B." <omn### [at] charternet> wrote:

> Common mistake, that, leaving textures out of parts of a CSG and thinking
> they'll automatically inherit a parent one.

Children *will* inherit a parent's texture. The problem here is that 
only one child is textured.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Hughes, B 
Subject: Re: Media and clipped_by, intersection and difference
Date: 22 Feb 2004 00:38:53
Message: <4038406d$1@news.povray.org>
"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cjameshuff-7D545B.20224121022004@news.povray.org...
> In article <4037fee9$1@news.povray.org>,
>  "Hughes, B." <omn### [at] charternet> wrote:
>
> > Common mistake, that, leaving textures out of parts of a CSG and
thinking
> > they'll automatically inherit a parent one.
>
> Children *will* inherit a parent's texture. The problem here is that
> only one child is textured.

Sorry, I worded that wrong. By parent I meant the object within the CSG
statement, and first thing I think of is difference {} using the first items
texture, thus making a sort of dominant one among the rest. My bad thinking
processes just confusing matters there. Esp. since this was about a
intersection instead.

Bob H.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Media and clipped_by, intersection and difference
Date: 22 Feb 2004 15:22:01
Message: <cjameshuff-A8594A.15224422022004@news.povray.org>
In article <4038406d$1@news.povray.org>,
 "Hughes, B." <omn### [at] charternet> wrote:

> Sorry, I worded that wrong. By parent I meant the object within the CSG
> statement,

But that's a child of the CSG. Look in the source. ;-)


> and first thing I think of is difference {} using the first items
> texture, thus making a sort of dominant one among the rest. My bad thinking
> processes just confusing matters there. Esp. since this was about a
> intersection instead.

A difference doesn't work any differently...the texture of th first 
object is the texture of those parts of the difference that come from 
that object.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Bjorn Jonsson
Subject: Re: Media and clipped_by, intersection and difference
Date: 22 Feb 2004 17:18:07
Message: <MPG.1aa33b031a326175989692@news.povray.org>
Thanks for the replies. Doing the intersection before applying the media 
stuff solved all of my problems (also I'm now intersecting with a plane 
instead of cylinder). However, I'm only moderately happy with the result 
(I'm doing a semi-transparent rocket exhaust plume) since this is my 
first 'serious' use of media. Does anyone know of a nice media tutorial 
? Needless to say I have looked at the POV documentation but I'm looking 
for something more detailed with examples.

-- 
Bjorn Jonsson / bjj### [at] ZZZmmediais
Address changed to avoid spam. Remove YYY and
ZZZ to reply.


Post a reply to this message

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