POV-Ray : Newsgroups : povray.general : True Antialiasing : Re: True Antialiasing Server Time
4 Aug 2024 06:11:58 EDT (-0400)
  Re: True Antialiasing  
From: gramirosimancas
Date: 27 Aug 2003 18:30:03
Message: <web.3f4d2f8a8f004971d63a77300@news.povray.org>
Warp wrote:
>gramirosimancas <nomail[at]nomail> wrote:
>> I was also thinking about doing the integral over time to have _True Motion
>> Blur_, but let's first have pyramid raytracing and then move to integrating
>> over time, as I think this would be an easy mathematical step once we have
>> pyramid raytracing foundations.
>
>  You make it sound like pyramid tracing could be possible in the first
>place.

I have not found any real impediment. It may be just hard.

>  There are several problems in getting the exact average of the intersection
>of a (4-sided) pyramid and the scene:
>
>  - Take a surface with a pigment and project a square onto it. The projection
>of the square can have virtually any shape at free (because the surface can
>have any shape). How do you calculate the exact average of the pigment
>inside this freely-shaped area? Note that there's no limit on how
>complex a pigment can be (it can be a fractal, a user-defined function...).

If would have to be subdivided in simple regions that can be averaged
together. If the user-defined function doesn't have an analytical surface
integral it wouldn't be possible to use it (just like in the 2d case where
libart (http://www.levien.com/libart/) can only render filled lines and
splines). You can always try to approximate an arbitrary function to a
spline.

>  - Getting the average pigment is only one small step. After that we need
>the average lighting of the surface over the freely-shaped area. Now we
>have a real problem. How do you calculate this average lighting? (The only
>way I can think of is by taking samples inside the shape, but this is
>exactly what we wanted to avoid in the first place).

What's the problem?
Just think this way:
Instead of using a single ray, think the integral over the square pixel.
Like instead sampling the value of a 1d function you take the integral
between two sampling points.

>  - And it gets more complex: Another object might be casting a shadow
>which partially covers our freely-shaped area. How much of the area does
>it cover? How do you calculate that (besides taking random samples)?

You may have to separate shaded part and the unshaded part and then average
both according the surface occupied.
It should be not different apart from applying a integral.
What I don't know is if these integrals are analytical in every case, as I
haven't done any mathematics except in the 2d case where it works with
lines and splines (but as you know this is much simpler)

>  - All the above deal with the case of the square being projected
>entirely on one single surface. What happens if there's an edge of
>the surface there? You will need to calculate how much each separate
>surface take in our freely-shaped area and calculate the average of
>their visible area.

As said above.

>  - What about reflections and refractions? When a square is projected
>onto a surface and then reflected or refracted, it can continue forward
>with virtually any shape. The surface where it is reflected/refracted
>from can be as convoluted and complex you like. This affects the shape
>of the square in really complex ways when we want to reflect/refract it.
>  For example, imagine the projected square hitting the edge of a
>reflective box. Part of the square will hit one side of the box and
>the rest will hit another side of the box. Their reflection will go
>in completely separate directions. Thus the square has been split into
>two. Now imagine that it hits a vertex of the box. Imagine that it hits
>the vertex of a shape where 8 surfaces meet. Imagine that these surfaces
>are not flat...

You'll have to average many non square shapes.

Yes, as said before, we may have to drop many strange surfaces or
approximate them to simpler surfaces that have analytical solutions.

>  I believe you get the picture here.

Yes it's hard and many strange functions would have to be dropped but you'll
get very good results.

You say this would be hard, but you also know this is not impossible.

Anyway, I was asking to know if there's some work done in this area so I
don't have to start from zero in the mathematical foundations.


Post a reply to this message

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