POV-Ray : Newsgroups : povray.general : needed normal perturbation fix Server Time
30 Jul 2024 00:25:00 EDT (-0400)
  needed normal perturbation fix (Message 1 to 7 of 7)  
From: sparky
Subject: needed normal perturbation fix
Date: 9 Jun 2010 13:35:00
Message: <web.4c0fcf7f8bc1bf94ad2b88370@news.povray.org>
A new technical paper has just been uploaded which shows
that an initial projection of the gradient is needed to do proper normal
perturbation of height functions.

http://jbit.net/~sparky/sfgrad_bump/

Most of the paper is aimed at rendering on GPUs but an equation (eq. 4) is
presented which produces Blinn's perturbed normal but in a unified (2D/3D bump
function) formulation.

Section 5 gives more details regading differences though the analysis is given
in section 3.

The point is that simply adding or subtracting the 3D gradient of the function
gives visual errors and is not equivalent to the normal of the displaced
function nor a good approximation. Since it is an easy fix I would recommend
that it is worked into povray.


Cheers!


Post a reply to this message

From: Le Forgeron
Subject: Re: needed normal perturbation fix
Date: 9 Jun 2010 16:48:06
Message: <4c0ffe06$1@news.povray.org>
Le 09/06/2010 19:31, sparky nous fit lire :
> A new technical paper has just been uploaded which shows
> that an initial projection of the gradient is needed to do proper normal
> perturbation of height functions.
> 
> http://jbit.net/~sparky/sfgrad_bump/
> 
> Most of the paper is aimed at rendering on GPUs but an equation (eq. 4) is
> presented which produces Blinn's perturbed normal but in a unified (2D/3D bump
> function) formulation.
> 
> Section 5 gives more details regading differences though the analysis is given
> in section 3.
> 
> The point is that simply adding or subtracting the 3D gradient of the function
> gives visual errors and is not equivalent to the normal of the displaced
> function nor a good approximation. Since it is an easy fix I would recommend
> that it is worked into povray.

You are of course aware that it cannot be a fix: existing scenes might
rely on actual behaviour and the Guardians of the Temple will not allow...

If it is easy, you might suggest the code correction (on beta code ?).

The paper looks like scholar... but fails to have an abstract, explicit
demonstration and rely a lot on asserting evidences (without formal
demonstration/mesurement/estimation).


Post a reply to this message

From: sparky
Subject: Re: needed normal perturbation fix
Date: 9 Jun 2010 17:15:00
Message: <web.4c10040f9f797603ad2b88370@news.povray.org>
> If it is easy, you might suggest the code correction (on beta code ?).

It's very easy.


> The paper looks like scholar... but fails to have an abstract, explicit
> demonstration and rely a lot on asserting evidences (without formal
> demonstration/mesurement/estimation).

The paper gives a mathematical derivation for the formulation.
Furthermore, omiting the initial projection of the gradient before subtraction
(from the original normal) is not only theoretically wrong but as shown in
figure 2 also visually wrong.

Cheers


Post a reply to this message

From: clipka
Subject: Re: needed normal perturbation fix
Date: 9 Jun 2010 17:16:16
Message: <4c1004a0$1@news.povray.org>
Am 09.06.2010 22:48, schrieb Le_Forgeron:

> You are of course aware that it cannot be a fix: existing scenes might
> rely on actual behaviour and the Guardians of the Temple will not allow...

;-)

I'm not sure about normal pertubations in general, but bump maps need an 
overhaul anyway. (Not a top priority thing though.)


Post a reply to this message

From: Le Forgeron
Subject: Re: needed normal perturbation fix
Date: 10 Jun 2010 11:45:37
Message: <4c1108a1$1@news.povray.org>
Le 09/06/2010 23:13, sparky nous fit lire :
>> If it is easy, you might suggest the code correction (on beta code ?).
> 
> It's very easy.
> 

Good & Great, awaiting pieces of code.

It always remind me of the last conjecture/theorem of Pierre de Fermat.

The Travelling Salesman Problem is very easy too, but the margin is a
bit too small to show it.


Post a reply to this message

From: Thomas de Groot
Subject: Re: needed normal perturbation fix
Date: 11 Jun 2010 03:49:48
Message: <4c11ea9c@news.povray.org>
"Le_Forgeron" <jgr### [at] freefr> schreef in bericht 
news:4c1108a1$1@news.povray.org...
>
> It always remind me of the last conjecture/theorem of Pierre de Fermat.
>
> The Travelling Salesman Problem is very easy too, but the margin is a
> bit too small to show it.

LOL! Fantastic! You made my day.

Thomas


Post a reply to this message

From: sparky
Subject: Re: needed normal perturbation fix
Date: 11 Jun 2010 13:20:01
Message: <web.4c126f339f797603ad2b88370@news.povray.org>
The code is given in listing 2.


Post a reply to this message

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