POV-Ray : Newsgroups : povray.newusers : media ?s Server Time
30 Dec 2024 14:53:10 EST (-0500)
  media ?s (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Paul Jones
Subject: media ?s
Date: 29 May 2001 13:13:10
Message: <3B13D843.103150FA@psu.edu>
Hi, 

Sorry if these are in the manual, I could not find them... :-(

1: is it possible (if so, how?) to have 2 density maps which has one
density map dependant on the other, for instane, a bozo pattern which
fades as per a gradient y pattern?

2: in a density map, which is applied to a box 10 units high, typical
map values are:

	density{
		gradient y
		density_map { 
		
		[0 blah...]
		[1 blah...]
			}}


does the "1" correspond to 1 unit up or 10 units up (ie: the box is
normalized with respect to the density_map). The reason I ask is that
for some reason I have forgotten all I have known about pov... and I
have lost all my old code :-( 


thanks a lot

paul 
-- 



--------------------------------------------------}
Paul Daniel Jones
The Pennslyvania State University

pdj### [at] psuedu
http://research.chem.psu.edu/glassgrp/paul

       C            The way is near, but men
     // \           seek it afar. It is in the
    N    N          easy things, but men seek it
    |    ||         in the difficult things.
    C    C          -Menicius
     \\  /
       C
--------------------------------------------------}


Post a reply to this message

From: Bob H 
Subject: Re: media ?s
Date: 29 May 2001 19:04:50
Message: <3b142b12@news.povray.org>
All is not lost.
Yes, you can "multiply" or "add" medias.  Two or more densities in one media
multiply.  Two or more media statements in a interior add together.
To get the effect you asked about use the multiply method.  Any rgb zero
index cancels out another, [0 rgb 0.5] in first and [0 rgb 0.6] in the
second makes for a [0 rgb 0.3] result.
There is a help section on this but that's pretty much it.

Map indices 0 to 1 are initially one POV unit.  Scaling is needed to apply
to a larger object.  The 'scale' keyword goes after the map } and before the
closing density }.
Be aware that scaling of the media object as a whole, by contrast, requires
that you scale the media inversely.

Bob H.


Post a reply to this message

From: Bob H 
Subject: Re: media ?s
Date: 29 May 2001 19:23:29
Message: <3b142f71@news.povray.org>
"Bob H." <omn### [at] msncom> wrote in message
news:3b142b12@news.povray.org...
> All is not lost.

Except me, often.

> Map indices 0 to 1 are initially one POV unit.  Scaling is needed to apply

I should have said in the case of gradient and marble patterns, and others
like them, which have a linear axis can be thought of as applicable to a
blend map's equaling 1 unit.  Patterns with noise or a formula aren't so
measurable.

Bob H.


Post a reply to this message

From: Chris Huff
Subject: Re: media ?s
Date: 30 May 2001 12:28:11
Message: <chrishuff-8FAEB1.11252130052001@povray.org>
In article <3b142b12@news.povray.org>, "Bob H." <omn### [at] msncom> 
wrote:

> Map indices 0 to 1 are initially one POV unit.

What do you mean here? The map indices are just mapped to the density 
pattern like any other map...they don't necessarily correspond to units 
of distance.


> Be aware that scaling of the media object as a whole, by contrast, requires
> that you scale the media inversely.

This doesn't make sense either...I assume you are talking about scaling 
the density of the media. The media feature uses the distance travelled 
through the media, ignoring any effects scale would have, so you have to 
scale the densities to get two objects of different sizes to look the 
same.

-- 
Christopher James Huff - chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Bob H 
Subject: Re: media ?s
Date: 30 May 2001 15:02:56
Message: <3b1543e0@news.povray.org>
"Chris Huff" <chr### [at] maccom> wrote in message
news:chr### [at] povrayorg...
> In article <3b142b12@news.povray.org>, "Bob H." <omn### [at] msncom>
> wrote:
>
> > Map indices 0 to 1 are initially one POV unit.
>
> What do you mean here? The map indices are just mapped to the density
> pattern like any other map...they don't necessarily correspond to units
> of distance.

Sure.  Doesn't a gradient x pattern coorespond to 0*x to 1*x and then repeat
at 1 unit intervals?  Of course it does.  However not all patterns are of a
linear nature to measure like that one, which is what I said.  So that the
pattern defaults to 1 unit until rescaled.

> > Be aware that scaling of the media object as a whole, by contrast,
requires
> > that you scale the media inversely.
>
> This doesn't make sense either...I assume you are talking about scaling
> the density of the media. The media feature uses the distance travelled
> through the media, ignoring any effects scale would have, so you have to
> scale the densities to get two objects of different sizes to look the
> same.

Very imprecise description I gave there, sorry.

Bob H.


Post a reply to this message

From: Warp
Subject: Re: media ?s
Date: 31 May 2001 10:17:08
Message: <3b165264@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
: The media feature uses the distance travelled 
: through the media, ignoring any effects scale would have, so you have to 
: scale the densities to get two objects of different sizes to look the 
: same.

  This is a bad thing in my opinion.
  Usually you expect that this:


#include "MyObject.inc"
camera { location <0,1,2> look_at 0 }
light_source { <10,20,-30>, 1}
object { MyObject }


and this:


#include "MyObject.inc"
camera { location <0,1,2>*10 look_at 0 }
light_source { <10,20,-30>*10, 1}
object { MyObject scale 10}


would give you identical results. That is, the scale of the whole scene
does not affect the result.
  However, if 'MyObject' contains media, the result will not be identical.

  In my opinion the 'scale 10' should scale the density as well so that
you really get the same result.

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


Post a reply to this message

From: Tom Melly
Subject: Re: media ?s
Date: 31 May 2001 11:44:21
Message: <3b1666d5$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3b165264@news.povray.org...

>   This is a bad thing in my opinion.
<snip>

I know what you mean, but it's six of one, half a dozen of the other. It does mean
that two identical medias placed in separate containers will behave consistently,
even if you then scale the containers seperately.


Post a reply to this message

From: Bob H 
Subject: Re: media ?s
Date: 31 May 2001 11:47:37
Message: <3b166799$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3b165264@news.povray.org...
> Chris Huff <chr### [at] maccom> wrote:
> : The media feature uses the distance travelled
> : through the media, ignoring any effects scale would have, so you have to
> : scale the densities to get two objects of different sizes to look the
> : same.
>
>   This is a bad thing in my opinion.
>
> would give you identical results. That is, the scale of the whole scene
> does not affect the result.
>   However, if 'MyObject' contains media, the result will not be identical.
>
>   In my opinion the 'scale 10' should scale the density as well so that
> you really get the same result.

I agree completely.  You wouldn't want textures such as refraction changing
it's IOR.  This was talked of before, guessing no one was bold enough to
make the change.  Either that or there's more involved, even possibly meant
to be that way instead.
But yes, it sure would be more like other expected behavior.  I don't think
any texture patterns are allowed to move off of a scaled object anyway.

Bob H.


Post a reply to this message

From: Simon
Subject: Re: media ?s
Date: 31 May 2001 11:49:09
Message: <3b1667f5@news.povray.org>
If you scale an object containing media,
the density pattern is scaled too.
But the density color isn't affected.
So if you want to get the same result after
scaling you should do something like this :
...
density{yourcolor*1/scalevalue}
...
where scalevalue is the amount with which
you scaled the object or the whole scene.
You'll have to do this with every color in
your density statement.

-------
Nubere vis Prisco : Non miror, Paula, sapisti.
Ducere te non vult Priscus : Et ille sapit.


Post a reply to this message

From: Ron Parker
Subject: Re: media ?s
Date: 31 May 2001 11:55:20
Message: <slrn9hcqba.54p.ron.parker@fwi.com>
On Thu, 31 May 2001 10:47:13 -0500, Bob H. wrote:
>I agree completely.  You wouldn't want textures such as refraction changing
>it's IOR.  This was talked of before, guessing no one was bold enough to
>make the change.  Either that or there's more involved, even possibly meant
>to be that way instead.

It is meant to be that way.  It was filed as a bug report in (IIRC) the 3.1
beta timeframe, and whoever was responsible for the code at the time felt
that it should work that way.

It really can be argued both ways, but those who would argue that the density
factor should scale with the container have a difficult question to answer:
how should it scale when the container is scaled nonuniformly?

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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