RenderMan & RISpec >> Smoothing normals problem

by Manuel Bastioni » Sun, 05 Jun 2005 14:27:28 GMT

Hi (sorry for my poor english),

I've written a very simplified python script to export a basic rib from
Blender.

I use the same, unique function to convert the coords of all (objects
postions, camera position, verts, normals, etc...). All work fine except
the normals.
Or, precisely, the normals work fine with Pixie, but not with AQSIS and
3Delight...

It's strange, because if the same function convert perfectly the
geometry and the locations of objects, it should work for norms
coordinates too.

These are the results:

Pixie return the same illumination as original Blender scene (from left
side):

http://www.dedalo-3d.com/lab/pixie.jpg

AQSIS and 3Delight return a wrong illumination from opposite side:

http://www.dedalo-3d.com/lab/aqsis.jpg

If I use the file without normals (no smooth), the illumination is OK in
all engines.

I've zipped foo.rib here:

http://www.dedalo-3d.com/lab/foo.zip

It's only few lines of code...a simple test.

Anyone can check it? Pixie is the only free engine that handle correctly
the smooth normals, or the rib generated by my code is wrong and Pixie
correct it in 'realtime'? Anyone can try to render using pixar renderman?

The only error possible is a negative value instead a positive value(or
viceversa)...but, I repete, for geometry, position and world the
coordinate system conversion function work fine...
If I modify the rib using a negative value for y coord of normals
(empirically, but in theory this should be wrong), it work into AQSIS
and 3Delight, but not into Pixie (as expected).



Ciao, thanks

Manuel

RenderMan & RISpec >> Smoothing normals problem

by Przemyslaw Koprowski » Sun, 05 Jun 2005 14:46:56 GMT



The point is that normals *cannot* be transformed in the same
manner as vectors and points (using fancy terminology normals
are bivectors, not vectors!). If your transformation matrix is
M, then points ad vectors are transformed:
P |--> M.P
while normals are transformed:
N |--> (M^-1)^T . N

For details and explenation see the FAQ of CGA
( http://www.geometrictools.com/CgaFaq.pdf ), point 5.27.

Przemek

--
"Beauty is the first test: there is no permanent place
in the world for ugly mathematics." G.H. Hardy

RenderMan & RISpec >> Smoothing normals problem

by Manuel Bastioni » Sun, 05 Jun 2005 15:04:11 GMT


Thanks!
However my effort is to have a human readable rib, without using matrix.
The foo.rib use only rotate and translate. For geometries and locations
the conversion is very simple. Please, take a look here:

http://www.dedalo-3d.com/lab/conversion.jpg

There are two 'conversion tables', one for translations, and one for
rotations.

Do you think it's possible using a sort of table like these, for normals
too?

Thanks,

Manuel

RenderMan & RISpec >> Smoothing normals problem

by felipeer » Mon, 06 Jun 2005 10:49:10 GMT

> However my effort is to have a human readable rib, without using matrix.

I think you can specify orientation using Orientation "lh" and
Orientation "rh" without messing with mathematics.

Felipe Esquivel

RenderMan & RISpec >> Smoothing normals problem

by Manuel Bastioni » Mon, 06 Jun 2005 21:40:53 GMT


Yes...the same reply here:

http://sourceforge.net/forum/forum.php?thread_id=1296320&forum_id=200367

Now it seem to work...

Thanks!

Manuel Bastioni

Similar Threads

1. What approach for curve smoothing ( smoothing and oversampling a pixellated curve )

2. Problem with smooth renderring

3. problem with smooth shading

4. problem smoothing data in polar plot

When I use "bezier" smoothing in polar coordinates, the smoothed curve 
lies consistently inside of the data points.  The data lies along a 
curve that relatively smoothly departs from a semi-circle (more or less 
centered on the center of the polar coordinates. In rectangular 
coordinates, the bezier smoothing, more or less, passes through the data 
points.   Is this "offset" an inherent problem with bezier smoothing in 
polar coordinates?

gnuplot script is:

plot [] [-8:5] [0:9] "speed.space.txt" using 2:3 smooth bezier, 
"speed.space.txt" using 2:3
(preceding is all on one line)

5. problem with autoscale when using smooth unique

6. problem getting my mesh nice and smooth

7. Weird smoothing problem - 3D Studio

8. Smooth Font Setting Problem

My intention is to determine and set "Smooth Edge of Font Setting". What is wrong with the following code

Declare Function SystemParametersInfo Lib "user32.dll" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uiParam As Long, pvParam As Any, ByVal fWinIni As Long) As Lon

Const SPIF_UPDATEINIFILE = &H
Const SPIF_SENDWININICHANGE = &H
Const FE_FONTSMOOTHINGTYPE = 
Const SPI_SETFONTSMOOTHINGTYPE = 7

If SystemParametersInfo(SPI_SETFONTSMOOTHING, True, 0, SPIF_SENDWININICHANGE Or SPIF_UPDATEINIFILE) > 0 The
    MsgBox "Success
End I

If SystemParametersInfo(SPI_SETFONTSMOONTHINGTYPE, FE_FONTSMOOTHINGCLEARTYPE, 0, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE) > 0 The
    MsgBox "Success
End I

Than
RAJ.