POV-Ray : Newsgroups : povray.general : Transparent media for volume rendering Server Time
5 Aug 2024 00:19:35 EDT (-0400)
  Transparent media for volume rendering (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
From: Tom Melly
Subject: Re: Transparent media for volume rendering
Date: 11 Feb 2003 12:27:31
Message: <3e493283@news.povray.org>
"Rob Smallshire" <rob### [at] mvecom> wrote in message
news:web.3e4928b37b9552ea35ea56ad0@news.povray.org...
>
> Each of my volumes is created in its own scene file containing code like the
> following:
>
> box {
> 0 , 1
>   texture {
>     pigment {
>       rgbft 1
>     }
>   }


Are the boxes the same for each media? (same position, same dimensions).

If so, it looks like there might be a bug in povray ("looks" - these things
often turn out to have a reasonable explanation).

Looking into your problem, I found that if I had two co-incident spheres with
media, the second sphere cancelled out the first sphere's media.

The solution was to make one of the spheres a slightly different size.

Here was the code I played with (change the radius of the second sphere to 1 to
see the problem - oh, and btw, if you have a lot of media-shapes, don't forget
to set max_trace_level suitably high):

camera {
  location  <4.0, 0.0,0 >

  look_at   <0.0, 0.0,  0.0>
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

sphere{
  0, 1
  pigment{rgbf 1}
  hollow
  interior{
    media {
      emission <0.1,0,0>
      method 3
      density{agate scale 1 density_map{[0.5 rgb 0][0.5 rgb 1]}}
    }
  }
}

sphere{
  0, 1.001 // change this to 1 to see the problem
  pigment{rgbf 1}
  hollow
  interior{
    media {
      emission rgb<0,0,0.1>
      method 3
      density{wrinkles scale 1 density_map{[0.5 rgb 0][0.5 rgb 1]}}
    }
  }
}


Post a reply to this message

From: Warp
Subject: Re: Transparent media for volume rendering
Date: 11 Feb 2003 13:15:58
Message: <3e493dde@news.povray.org>
Rob Smallshire <rob### [at] mvecom> wrote:
> The media volumes nearest to the camera
> seem to obscure those behind.

  Have you already tried increasing max_trace_level in global_settings?

  When there are only fully transparent objects with no reflection nor
refraction (as media containers), max_trace_level should be at least
twice the number of objects plus 1 (if you are using, for example, boxes
as media containers). This is because the ray may have to go through
that amount of surfaces.

-- 
#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: Tom & Lu Melly
Subject: Re: Transparent media for volume rendering
Date: 11 Feb 2003 13:44:34
Message: <3e494492@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3e493dde@news.povray.org...
>
>   Have you already tried increasing max_trace_level in global_settings?
>

Hey, Warp, did you see my post? Does the behaviour of multiple media
containers seem odd to you?


Post a reply to this message

From: Tom & Lu Melly
Subject: Re: Transparent media for volume rendering
Date: 11 Feb 2003 13:47:49
Message: <3e494555@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3e493283@news.povray.org...

btw if you are using multiple identical media containers, you should know
that the approved alternative (iirc) would be to have one container with
multiple media statements - ie. rather than

object{O1
    interior{
        media{M1}
    }
}

object{O1
    interior{
        media{M2}
    }
}

you should have

object{O1
    interior{
        media{M1}
        media{M2}
    }
}

You can also have multiple density statements in a single media-statement,
but the effect is different - see docs for details.


Post a reply to this message

From: Tom Melly
Subject: Re: Transparent media for volume rendering
Date: 12 Feb 2003 08:21:55
Message: <3e4a4a73$1@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3e493283@news.povray.org...

> If so, it looks like there might be a bug in povray ("looks" - these things
> often turn out to have a reasonable explanation).
>

I don't know enough (i.e. "anything") about pov internals to know if this is the
case, but there might indeed be a reasonable explanation if your containers are
co-incident.

Basically, Pov may get confused as to whether it's inside or outside a container
(and therefore whether to render the media) when co-incident containers are
used.

As a general rule-of-thumb, it's best to avoid co-incident surfaces at all times
(they are a definite no-no if the surfaces have a visible pigment).

BTW I don't know which of your media params are necessary and which are not, but
they are *VERY* slow. Certainly for testing I would remove or adjust them for
quicker rendering time.


Post a reply to this message

From: Rob Smallshire
Subject: Re: Transparent media for volume rendering
Date: 12 Feb 2003 08:40:05
Message: <web.3e4a4db764ac950035ea56ad0@news.povray.org>
>Are the boxes the same for each media? (same position, same dimensions).

In the general case the boxes are in different positions but intersect in
3-D with varying amounts of overlap.  The boxes are unlikely to have
exactly the same position and dimensions and this is not the case in any of
my examples.

The problem seems to manifest itself where the boxes overlap in 3-space,
although it could also be where they overlap on the image plane - its
difficult to tell which. I'll try to resolve this one and report back.

Thanks for the tip about max_trace_level - I'll try this too.

Regards,

Rob Smallshire


Post a reply to this message

From: Rob Smallshire
Subject: Re: Transparent media for volume rendering
Date: 12 Feb 2003 10:25:04
Message: <web.3e4a66e764ac950035ea56ad0@news.povray.org>
> > Have you already tried increasing max_trace_level in global_settings?

> Thanks for the tip about max_trace_level - I'll try this too.

I've now tried increasing max_trace_level and it makes no difference.

By the way I have my light set to media_interaction off and
media_attenuation off.  Is this the right thing to do?

Rob


Post a reply to this message

From: Tom Melly
Subject: Re: Transparent media for volume rendering
Date: 12 Feb 2003 11:01:46
Message: <3e4a6fea$1@news.povray.org>
"Rob Smallshire" <rob### [at] mvecom> wrote in message
news:web.3e4a66e764ac950035ea56ad0@news.povray.org...
> > > Have you already tried increasing max_trace_level in global_settings?
>
> > Thanks for the tip about max_trace_level - I'll try this too.
>
> I've now tried increasing max_trace_level and it makes no difference.
>
> By the way I have my light set to media_interaction off and
> media_attenuation off.  Is this the right thing to do?
>
> Rob

"media_interaction off" iirc will mean that scattering and absorbing media won't
work (although emitting media will be okay). I'd take it out or turn it on.
"media_attenuation off" should be okay though.


Post a reply to this message

From: Tom Melly
Subject: Re: Transparent media for volume rendering
Date: 12 Feb 2003 11:30:20
Message: <3e4a769c$1@news.povray.org>
"Rob Smallshire" <rob### [at] mvecom> wrote in message
news:web.3e4928b37b9552ea35ea56ad0@news.povray.org...

Could you email an actual scene file you are using (minus the df3 files) to
df3### [at] tomandlucouk ?

(assuming you haven't solved the problem)


Post a reply to this message

From: Tom Melly
Subject: Re: Transparent media for volume rendering
Date: 13 Feb 2003 10:27:50
Message: <3e4bb976$1@news.povray.org>
"Rob Smallshire" <rob### [at] mvecom> wrote in message
news:web.3e4928b37b9552ea35ea56ad0@news.povray.org...
>
> box {
> 0 , 1
>   texture {
>     pigment {
>       rgbft 1
>     }
>   }

The solution to this appears to be to remove the transmit (t) component from the
box-pigment.


Post a reply to this message

<<< Previous 1 Messages Goto Initial 10 Messages

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