POV-Ray : Newsgroups : povray.general : density question Server Time
17 Nov 2024 13:17:22 EST (-0500)
  density question (Message 1 to 9 of 9)  
From: Jettero Heller
Subject: density question
Date: 13 Mar 2003 13:20:09
Message: <web.3e70ca66907276e0a3d219970@news.povray.org>
You guys are all so helpful.  This is my third question.  Thanks everyone.

#declare halo = object {
   // yadda yadda shapes yadda yadda lathes
   // something like conically shapped, but not really
    media {
       emission light_clr
       density {
          cylindrical scale 0.75
       }
    }
}


That's _almost_ what I want.  Actually I want for the media to be the
precise shape of the halo object in question... which is closer to conically
shaped that cylindrical.  Actualy, I misspoke.  The media is the precise
shape of the halo, the density falls off cylindrically though...

How can I make the emission falloff as I move away from the y-axis, in the
shape of the halo object instead of cylindrically?


Post a reply to this message

From: Bill DeWitt
Subject: Re: density question
Date: 13 Mar 2003 13:35:50
Message: <3e70cf86$1@news.povray.org>
"Jettero Heller" <pov### [at] voltar-confedorg> wrote
>
> How can I make the emission falloff as I move away from the y-axis, in the
> shape of the halo object instead of cylindrically?

    Have you tried "absorption"?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/03


Post a reply to this message

From: Jettero Heller
Subject: Re: density question
Date: 13 Mar 2003 13:55:05
Message: <web.3e70d3797629df5ca3d219970@news.povray.org>
Bill DeWitt wrote:
>"Jettero Heller" <pov### [at] voltar-confedorg> wrote
>>
>> How can I make the emission falloff as I move away from the y-axis, in the
>> shape of the halo object instead of cylindrically?
>
>    Have you tried "absorption"?


No, but from the docs that doesn't really do what I want.  I want for my
emission hase to be brighter toward the center of the cone and weaker near
the edges.  Absorbtion appears to just absorb a color... if you wanted it
to absorb more in the middle, you're back to using density {} again.


Post a reply to this message

From: ingo
Subject: Re: density question
Date: 13 Mar 2003 14:04:45
Message: <Xns933DCCA362DE3seed7@povray.org>
in news:web.3e70ca66907276e0a3d219970@news.povray.org Jettero Heller 
wrote:

> Actually I want for the media to be the
> precise shape of the halo object in question...

If your shape can be described with a function (think isosurface) you can 
use that same function as a pattern for density.

Another option could be to render thin slices of your shape, blurr each 
image (or maybe render with focal blurr) or postprocess them otherwise. 
Then turn all the images into a single df3 density file (there is a 
tga2df3 tool somewhere on the web). Use this as a pattern for your 
density.

Ingo

p.s. It would be realy nice if somebody wrote a 3d-convolution tool for 
df3 files. I tried it with Python but it isn't the most suitable tool for 
it. Processing took lots of memory and ages.


Post a reply to this message

From: Jettero Heller
Subject: Re: density question
Date: 13 Mar 2003 14:10:09
Message: <web.3e70d6f57629df5ca3d219970@news.povray.org>
It's actually occured to me that I can just put several of my lathes one
with inside the other at different scales.  Then adjust the media values for
each to make a gradient media effect.  That's a reasonable work around, but
I was hoping I could do this with density.


Jettero Heller wrote:
>How can I make the emission falloff as I move away from the y-axis, in the
>shape of the halo object instead of cylindrically?
>


Post a reply to this message

From: Bill DeWitt
Subject: Re: density question
Date: 13 Mar 2003 14:20:02
Message: <3e70d9e2@news.povray.org>
"Jettero Heller" <pov### [at] voltar-confedorg> wrote in message
news:web.3e70d3797629df5ca3d219970@news.povray.org...
> Bill DeWitt wrote:
> >"Jettero Heller" <pov### [at] voltar-confedorg> wrote
> >>
> >> How can I make the emission falloff as I move away from the y-axis, in
the
> >> shape of the halo object instead of cylindrically?
> >
> >    Have you tried "absorption"?
>
>
> No, but from the docs that doesn't really do what I want.  I want for my
> emission hase to be brighter toward the center of the cone and weaker near
> the edges.

    Oh... I read it backwards. I thought you wanted it darker in the center.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/03


Post a reply to this message

From: Jettero Heller
Subject: Re: density question
Date: 13 Mar 2003 14:20:15
Message: <web.3e70d8af7629df5ca3d219970@news.povray.org>
>If your shape can be described with a function (think isosurface) you can
>use that same function as a pattern for density.

It can't really.  It's a fairly complicated CSG.

but apparently you can use an object as a pattern?  In stead of applying a
media { density {}} to my halo object, could I make a big giant cylinder,
then use some kind of media {
   density {
      pattern { object { halo }}
   }
}


or something like that?  The docs are a bit thin on that. :(

All they say about the object-patterns:

" The object pattern takes an object as input. It generates a, two item,
color list pattern. Wether a point is assigned to one item or the other
depends on whether it is inside the specified object or not.

Object's used in the object pattern cannot have a texture and must be solid"

That gives a good hint at least.  I can't wait to try some of this out when
I get home from work.


Post a reply to this message

From: ingo
Subject: Re: density question
Date: 13 Mar 2003 15:34:26
Message: <Xns933DDBD87444Aseed7@povray.org>
in news:web.3e70d8af7629df5ca3d219970@news.povray.org Jettero Heller 
wrote:

> but apparently you can use an object as a pattern?

Yes, but it wouldn't give you a gradient, just media or no media.

Ingo


Post a reply to this message

From: Christopher James Huff
Subject: Re: density question
Date: 13 Mar 2003 18:01:35
Message: <cjameshuff-8FFB15.18014613032003@netplex.aussie.org>
In article <web.3e70d6f57629df5ca3d219970@news.povray.org>,
 "Jettero Heller" <pov### [at] voltar-confedorg> wrote:

> It's actually occured to me that I can just put several of my lathes one
> with inside the other at different scales.  Then adjust the media values for
> each to make a gradient media effect.  That's a reasonable work around, but
> I was hoping I could do this with density.

You can do it with density, and it will render quite a bit faster than 
the Matrioshka doll method you describe above. Who said you couldn't?

Off the top of my head, I can think of several ways:
As others suggested, use a function pattern. Hint: you can use splines 
in functions. This is the simplest method. You might want to put the 
spline control points in an array and write code to generate the lathe 
and density spline from that, because there isn't one unified method for 
specifying splines. (you can't use a spline as input for a lathe object)

Do something like your Matrioshka doll method with the object pattern. 
The object pattern is solid, either one entry or the other, but you 
could nest object patterns with different scales to get any number of 
steps. This is more difficult to set up or change, and gives a finite 
number of steps instead of a smooth gradient. I don't recommend this 
method, too much work to set up, too inefficient and limited.

I'm assuming your lathe does not fold back on itself, in other words it 
is like a cylinder with varying radius. If this is not the case, you 
need to work on your definition a bit more, because what you described 
can't be done.

-- 
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

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