|
![](/i/fill.gif) |
In article <3edcd7d5$1@news.povray.org>,
"Ray Gardener" <ray### [at] daylongraphics com> wrote:
> One difficulty I have with doing that is that
> sometimes its easier to drive a shader using
> some stepped coordinate system of the primitive rather
> than the world locations a raytracer returns.
What stops you from doing the same thing with raytracing? What makes you
think you can only compute world coordinates?
> For example, when scanlining a heightfield,
> I do it cell by cell, so rocks can be distributed
> based on how likely a cell is to be occupied.
> With raytracing, I have to derive the cell
> coords, and then maintain some kind of map
> to keep track of which cell was painted with what.
No you don't...why would you do this? You're just scattering rocks
around. Just use trace() to place them on the surface at random
locations. If you want an uneven distribution, use some function to
control the probability of a rock landing.
> Displacement shading is also easier when scanlining.
> At least, I haven't figured an easy way to do it
> when raytracing.
Sounds like you're talking about something like this:
http://www.cs.utah.edu/~bes/papers/height/paper.html
There is a landscape example with the equivalent of 1,000,000,000,000
triangles. And instead of generating and discarding millions (or
billions) of unused microtriangles, it generates them as needed.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |