POV-Ray : Newsgroups : povray.programming : Ellipsoid intersection Server Time
22 Dec 2024 17:41:40 EST (-0500)
  Ellipsoid intersection (Message 1 to 4 of 4)  
From: Nigglefish
Subject: Ellipsoid intersection
Date: 27 Jul 2004 11:40:01
Message: <web.410676686ffa018f4ef218200@news.povray.org>
Can someone please explain how the MTransNormal() function works? I'm
implementing a ray tracer but I am getting strange reflections when I apply
non-uniform transformations to spheres. I guess this is because of how I am
applying transformations to normals when transforming from object space
(containing an origin centered unit sphere) to world space. And I suspect
this seperate function is the key to solving my problems... but I just
can't quite make sense of it all yet. Is this why the function is
different??? Am I even on the right track? (I know, I know: I need to brush
up on my matrix math big-time.)

Cheers in advance!


Post a reply to this message

From: Nigglefish
Subject: Re: Ellipsoid intersection
Date: 27 Jul 2004 12:20:00
Message: <web.4106805bcea60bd74ef218200@news.povray.org>
Ok, more specific details:

Any time I non-uniformly scale an object (at least if I end up with scaled
normals that are not aligned with the axis) I get screwy surface normals
(in reflections, and for use with shading).
I am currently using a 'm->tranformDirection(Vector * v)' method which does
a full transform using the matrix 'm' except that it ignores the fourth row
or the matrix (ie: the translation row).
I tried using the MTransNormal() code from povray (in a fairly shameful
manner) but didn't have any luck. I'm still as confused as ever.


Post a reply to this message

From: ABX
Subject: Re: Ellipsoid intersection
Date: 27 Jul 2004 12:40:42
Message: <m11dg0d8i0oi9q2b7os3ge5hh32hj9akdf@4ax.com>
On Tue, 27 Jul 2004 12:18:35 EDT, "Nigglefish" <nomail@nomail> wrote:
> I'm still as confused as ever.

It's pretty hard to explain function written in a few lines with only
assignments and 3-step iteration. Since problem is in your code then you are
best placed to solve it.

When similar black hole occur to me usually it helps when I start to write
_detailed_ post with question. Near middle of writing I find where my broken
thinking is just because I rereaded what I wrote.

ABX


Post a reply to this message

From: Nigglefish
Subject: Re: Ellipsoid intersection
Date: 27 Jul 2004 13:05:00
Message: <web.41068ae8cea60bd739f528b60@news.povray.org>
Hehe I agree, my questions were very general.

I was fairly sure it wasn't my code, but something I was missing
conceptually. And that's what it was... I've solved the problem at last
(it's only 3am). I was using the same transform for directions and normals,
when what I really needed was a transposed, inverted transformation for the
normals. For many cases the standard and transposed inverse transformation
were the same which didn't help me work out what was happening at all. I
finally started thinking about normals and how they behave when non-uniform
scaled (I have about a million scribbled triangles in front of me) and it
all fitted into place.

My renders are looking the same as the same scenes in POV-Ray again, which
is my benchmark of success. Makes me sooo proud! Thanks for your fast
reply! Next time I will try to have more direct questions and less babble
;)


Post a reply to this message

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