POV-Ray : Newsgroups : moray.win : Media Woes Server Time
28 Jul 2024 16:19:22 EDT (-0400)
  Media Woes (Message 1 to 10 of 10)  
From: How Camp
Subject: Media Woes
Date: 10 Jul 2000 13:31:26
Message: <396a086e@news.povray.org>
Well, once again I seem to be a bit confused...

I have a simple texture in Moray that uses emission media.  When rendered in
the preview mode, it looks just the way I want it to.  However, the object
to which I am applying the texture has been scaled considerably (much
smaller).  The media does not seem to render the same when the object
changes size - it tends to diminish in both intensity and density until
there is only a faint hint of anything at all.

I have tried to scale the density map as well as the entire texture to no
avail.  Would anyone be so kinds as to shed some light on how to alter my
media so it will render as I might expect?  I'm relatively confident it is
just a matter of transforms somewhere...?

- How


Post a reply to this message

From: ryan constantine
Subject: Re: Media Woes
Date: 10 Jul 2000 15:59:46
Message: <396A2AD6.E51C7669@yahoo.com>
didn't somebody say that when you scale a media-filled object that the
media must be scaled by the inverse?  so if you scale the object up or
down, media should be scaled by 1/scale (notice if you scale down the
object, the fraction flips automatically to make the media bigger).  try
it out.  hopefully i'm not in left field.

How Camp wrote:
> 
> Well, once again I seem to be a bit confused...
> 
> I have a simple texture in Moray that uses emission media.  When rendered in
> the preview mode, it looks just the way I want it to.  However, the object
> to which I am applying the texture has been scaled considerably (much
> smaller).  The media does not seem to render the same when the object
> changes size - it tends to diminish in both intensity and density until
> there is only a faint hint of anything at all.
> 
> I have tried to scale the density map as well as the entire texture to no
> avail.  Would anyone be so kinds as to shed some light on how to alter my
> media so it will render as I might expect?  I'm relatively confident it is
> just a matter of transforms somewhere...?
> 
> - How


Post a reply to this message

From: How Camp
Subject: Re: Media Woes
Date: 10 Jul 2000 17:33:32
Message: <396a412c@news.povray.org>
Unfortunately, I tried this.  I assumed the same thing.  My object (a simple
cone) is scaled <0.04, 0.04, 0.1>.  So, I figured I could apply a
transformation to the texture of <25, 25, 10> just as you suggested.  The
results are the same as without the transformation.

- How

ryan constantine <rco### [at] yahoocom> wrote in message
news:396A2AD6.E51C7669@yahoo.com...
> didn't somebody say that when you scale a media-filled object that the
> media must be scaled by the inverse?  so if you scale the object up or
> down, media should be scaled by 1/scale (notice if you scale down the
> object, the fraction flips automatically to make the media bigger).  try
> it out.  hopefully i'm not in left field.
>
> How Camp wrote:
> >
> > Well, once again I seem to be a bit confused...
> >
> > I have a simple texture in Moray that uses emission media.  When
rendered in
> > the preview mode, it looks just the way I want it to.  However, the
object
> > to which I am applying the texture has been scaled considerably (much
> > smaller).  The media does not seem to render the same when the object
> > changes size - it tends to diminish in both intensity and density until
> > there is only a faint hint of anything at all.
> >
> > I have tried to scale the density map as well as the entire texture to
no
> > avail.  Would anyone be so kinds as to shed some light on how to alter
my
> > media so it will render as I might expect?  I'm relatively confident it
is
> > just a matter of transforms somewhere...?
> >
> > - How


Post a reply to this message

From: Bob Hughes
Subject: Re: Media Woes
Date: 10 Jul 2000 18:30:17
Message: <396a4e79@news.povray.org>
"How Camp" <hca### [at] ksuedu> wrote in message news:396a412c@news.povray.org...
|
| Unfortunately, I tried this.  I assumed the same thing.  My object (a simple
| cone) is scaled <0.04, 0.04, 0.1>.  So, I figured I could apply a
| transformation to the texture of <25, 25, 10> just as you suggested.  The
| results are the same as without the transformation.

Don't scale the media overall or you'll get a different pattern size,  so
scale either the emission (absorption too) or density or scattering.
Also, if you start with a container size larger or smaller than unit-size the
media will not fill it in the usual way.  It will become thinned out from
either a lack of distance or too much distance for the samples to be checked
through.  You should use scaling of the container+media at the end of the
objects statement block instead.
Scaling of the densities might prove difficult if there are many indexed or
are in separate density statements used in a density map.
I think you should be able to get a reasonable media through scaling in that
way.

Bob


Post a reply to this message

From: ryan constantine
Subject: Re: Media Woes
Date: 10 Jul 2000 18:51:54
Message: <396A531B.BCA88C91@yahoo.com>
oh, i forgot one other thing.  it is better to have your object defined
as a unit sixed object and then to scale it.  media works better that
way.  ex. i had a unit sphere where my media was spherical in density. 
i then scaled my sphere and the media accordingly with no problem.  one
other thing i do when scaling is to scale in small steps doing a test at
each step to make sure that each is what i expect.

Bob Hughes wrote:
> 
> "How Camp" <hca### [at] ksuedu> wrote in message news:396a412c@news.povray.org...
> |
> | Unfortunately, I tried this.  I assumed the same thing.  My object (a simple
> | cone) is scaled <0.04, 0.04, 0.1>.  So, I figured I could apply a
> | transformation to the texture of <25, 25, 10> just as you suggested.  The
> | results are the same as without the transformation.
> 
> Don't scale the media overall or you'll get a different pattern size,  so
> scale either the emission (absorption too) or density or scattering.
> Also, if you start with a container size larger or smaller than unit-size the
> media will not fill it in the usual way.  It will become thinned out from
> either a lack of distance or too much distance for the samples to be checked
> through.  You should use scaling of the container+media at the end of the
> objects statement block instead.
> Scaling of the densities might prove difficult if there are many indexed or
> are in separate density statements used in a density map.
> I think you should be able to get a reasonable media through scaling in that
> way.
> 
> Bob


Post a reply to this message

From: How Camp
Subject: Re: Media Woes
Date: 10 Jul 2000 19:31:16
Message: <396a5cc4@news.povray.org>
Hmm.  Forgive me for being rather dense...  Here is and example, using a
sphere:

#declare Test_Texture =
   material


      texture


         pigment
         {
            color rgbt <1.0, 1.0, 1.0, 1.0>
         }
      }
      interior
      {
         media
         {
            emission rgb <1.0, 0.0, 0.0>
            density
            {
               granite
               color_map
               {
                  [ 0.0     rgbft <0.0, 0.0, 0.0, 0.0, 0.0> ]
                  [ 1.0     rgbft <1.0, 1.0, 1.0, 0.0, 0.0> ]
               }
               scale  10.0   // *** Added scaling ***
            }
         }
      }
   }

(This is directly from Moray, with only the comment added above.)

If I create a unit sphere (as Ryan suggested) and apply the texture, it
looks great (without the "scale 10.0" line).  Then, I scale the sphere, say
to 0.1, and scale the density (as Bob suggested) to 10, then the media tends
to disappear.  Leaving the texture as-is and scaling only the object is also
ineffective.

Now, if I understand both of you correctly, it would be better to create my
object as a unit-sized object, and then scale it later.  But, is this not
what Moray does?  I have a basic sphere that is then scaled/translated after
the texture has been applied.

Bob, you also mention adding the scaling at the end of the objects statement
block.  I see how this could be done by hand, but is there an equivalent in
Moray?

Apologies for misunderstanding you both.  Still learning Moray.  Thanks for
the help!

- How

ryan constantine <rco### [at] yahoocom> wrote in message
news:396A531B.BCA88C91@yahoo.com...

> oh, i forgot one other thing.  it is better to have your object defined
> as a unit sixed object and then to scale it.  media works better that
> way.  ex. i had a unit sphere where my media was spherical in density.
> i then scaled my sphere and the media accordingly with no problem.  one
> other thing i do when scaling is to scale in small steps doing a test at
> each step to make sure that each is what i expect.

> Bob Hughes wrote:

> Don't scale the media overall or you'll get a different pattern size,  so
> scale either the emission (absorption too) or density or scattering.
> Also, if you start with a container size larger or smaller than unit-size
the
> media will not fill it in the usual way.  It will become thinned out from
> either a lack of distance or too much distance for the samples to be
checked
> through.  You should use scaling of the container+media at the end of the
> objects statement block instead.
> Scaling of the densities might prove difficult if there are many indexed
or
> are in separate density statements used in a density map.
> I think you should be able to get a reasonable media through scaling in
that
> way.


Post a reply to this message

From: Bob Hughes
Subject: Re: Media Woes
Date: 10 Jul 2000 19:54:57
Message: <396a6251@news.povray.org>
"How Camp" <hca### [at] ksuedu> wrote in message news:396a5cc4@news.povray.org...
| Hmm.  Forgive me for being rather dense...

Welcome to the club then  :-)

No, no, no  :-(  But I said to scale the 'density' so I'm at fault really.  I
meant the actual rgb parts of the density.  See why I wouldn't want a teaching
job? ha ha.  You can't scale 'media' or 'density' ('interior' esp. not) alone
or you just end up with different pattern size.
I don't use Moray, so I can't actually help with the specifics on where to
make the adjustment.

|       interior
|       {
|          media
|          {
|             emission rgb <1.0, 0.0, 0.0>*10 // here or...
|             density
|             {
|                granite
|                color_map
|                {
|                   [ 0.0     rgbft <0.0, 0.0, 0.0, 0.0, 0.0>*10 ] // ...here
is where the scaling
|                   [ 1.0     rgbft <1.0, 1.0, 1.0, 0.0, 0.0>*10 ] // needs to
be done. not both places.
|                }
|             //   scale  10.0   // *** Added scaling ***  // and not at all
here.
|             }
|          }
|       }


Post a reply to this message

From: Lutz Kretzschmar
Subject: Re: Media Woes
Date: 11 Jul 2000 06:04:59
Message: <a9slms4tbhuu460khc51k8mghtebgmc6cb@4ax.com>
Hi How Camp, you recently wrote in moray.win:

> Bob, you also mention adding the scaling at the end of the objects statement
> block.  I see how this could be done by hand, but is there an equivalent in
> Moray?
To do what Bob suggested, you need to use the Range button when you
define the color and set the max value to 10. Then you can move the
colors sliders to 10.

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: How Camp
Subject: Re: Media Woes
Date: 11 Jul 2000 09:31:32
Message: <396b21b4@news.povray.org>
Thank you, both Lutz and Bob - this has greatly improved the situation.  I
don't suppose there is a way to set the range greater than 10.0 is there?

At any rate, this is certainly what I was looking for.  I appreciate the
help!

- How

Lutz Kretzschmar <lut### [at] stmuccom> wrote in message
news:a9slms4tbhuu460khc51k8mghtebgmc6cb@4ax.com...

> To do what Bob suggested, you need to use the Range button when you
> define the color and set the max value to 10. Then you can move the
> colors sliders to 10.


Post a reply to this message

From: Alexander Enzmann
Subject: Re: Media Woes
Date: 12 Jul 2000 10:39:56
Message: <396C8545.86132183@mitre.org>
Media simulates an exponential absorption process, so if you scale up
and object by x (uniform scale), then you have to scale down the density
by 1 / e^x.  If you use a non-uniform scale, you will probably have a
lot of trouble getting things to work right...

The thing to remember is that media really only works in world
coordinates.  That means that while POV-Ray wants the media to be
defined in object coordinates (before transformations), the process of
sampling will always be in the final transformed coords.

Xander

ryan constantine wrote:
> 
> didn't somebody say that when you scale a media-filled object that the
> media must be scaled by the inverse?  so if you scale the object up or
> down, media should be scaled by 1/scale (notice if you scale down the
> object, the fraction flips automatically to make the media bigger).  try
> it out.  hopefully i'm not in left field.
> 
> How Camp wrote:
> >
> > Well, once again I seem to be a bit confused...
> >
> > I have a simple texture in Moray that uses emission media.  When rendered in
> > the preview mode, it looks just the way I want it to.  However, the object
> > to which I am applying the texture has been scaled considerably (much
> > smaller).  The media does not seem to render the same when the object
> > changes size - it tends to diminish in both intensity and density until
> > there is only a faint hint of anything at all.
> >
> > I have tried to scale the density map as well as the entire texture to no
> > avail.  Would anyone be so kinds as to shed some light on how to alter my
> > media so it will render as I might expect?  I'm relatively confident it is
> > just a matter of transforms somewhere...?
> >
> > - How


Post a reply to this message

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