POV-Ray : Newsgroups : povray.general : Inverting Normals Server Time
1 Nov 2024 17:21:20 EDT (-0400)
  Inverting Normals (Message 1 to 6 of 6)  
From: Philip Bartol
Subject: Inverting Normals
Date: 21 Aug 1999 03:28:56
Message: <37be5538@news.povray.org>
I recently made a top for my lighthouse out of some CGS stuff, a few torus' 
cutting out a couple of cones merged with a sphere and a cone. I originally 
thought about makeing this in sPatch, but it would have generated a bunch of 
patches and I didn't think I needed to be wasting memory and time on such a 
thing.

I found I could just as easily take a few basic solid shapes and do some math 
on them and make a little CGS object the same way, then I applied a "radial" 
normal to the surface to make it look a little fancier.

The problem came after my first render of the object. I merged all my objects 
together and applied the single normal to the whole object. The problem is the 
cones that I carved out the torus' with had flipped the normal, what POV 
thought I had was the inside of an object (because of cutting it out with a 
torus).

My question that I'm pondering is, is there a way to make sure the whole 
object's outsides really are outside, so to speak. My final solution was to 
make two #declare statements defining normals, one with a positive number on 
the radial and the other with a negative. I applied the one with the neg. 
number to the two objects that had been carved out by the torus and the normal 
with the positive value to the rest of the object. My render was fixed, it 
came out correctly, but this is a goofy way to do it.

I tried all kinds of things to fix this before comming up with this solution, 
doing an intersection with and inverse on the torus.... inverting the final 
difference (which put the camera inside an object)... finally I resorted to 
two normals....

PHIL

---------------------------------------------------


Post a reply to this message

From: Margus Ramst
Subject: Re: Inverting Normals
Date: 21 Aug 1999 12:15:41
Message: <37BED0A5.9D1D3EF7@peak.edu.ee>
Normals can point into the object when "difference" is used. Instead of
difference, use intersection, and use "inverse" with the cutting object (torus
in this case).

Margus

Philip Bartol wrote:
> 
> I recently made a top for my lighthouse out of some CGS stuff, a few torus'
> cutting out a couple of cones merged with a sphere and a cone. I originally
> thought about makeing this in sPatch, but it would have generated a bunch of
> patches and I didn't think I needed to be wasting memory and time on such a
> thing.
> 
> I found I could just as easily take a few basic solid shapes and do some math
> on them and make a little CGS object the same way, then I applied a "radial"
> normal to the surface to make it look a little fancier.
> 
> The problem came after my first render of the object. I merged all my objects
> together and applied the single normal to the whole object. The problem is the
> cones that I carved out the torus' with had flipped the normal, what POV
> thought I had was the inside of an object (because of cutting it out with a
> torus).
> 
> My question that I'm pondering is, is there a way to make sure the whole
> object's outsides really are outside, so to speak. My final solution was to
> make two #declare statements defining normals, one with a positive number on
> the radial and the other with a negative. I applied the one with the neg.
> number to the two objects that had been carved out by the torus and the normal
> with the positive value to the rest of the object. My render was fixed, it
> came out correctly, but this is a goofy way to do it.
> 
> I tried all kinds of things to fix this before comming up with this solution,
> doing an intersection with and inverse on the torus.... inverting the final
> difference (which put the camera inside an object)... finally I resorted to
> two normals....
> 
> PHIL
> 
> ---------------------------------------------------


Post a reply to this message

From: Philip Bartol
Subject: Re: Inverting Normals
Date: 21 Aug 1999 15:40:40
Message: <37bf00b8@news.povray.org>
In article <37BED0A5.9D1D3EF7@peak.edu.ee>, Margus Ramst <mar### [at] peakeduee> wrote:
>Normals can point into the object when "difference" is used. Instead of
>difference, use intersection, and use "inverse" with the cutting object (torus
>in this case).

I thought I had tried that and it didn't seem to work, I'll check again....

PHIL

---------------------------------------------------


Post a reply to this message

From: Ron Parker
Subject: Re: Inverting Normals
Date: 23 Aug 1999 11:24:40
Message: <37c167b8@news.povray.org>
On Sat, 21 Aug 1999 19:15:33 +0300, Margus Ramst wrote:
>Normals can point into the object when "difference" is used. Instead of
>difference, use intersection, and use "inverse" with the cutting object (torus
>in this case).

But there is no difference between those two methods within POV: it 
internally converts a difference to an intersection at parse time.


Post a reply to this message

From: Margus Ramst
Subject: Re: Inverting Normals
Date: 23 Aug 1999 16:26:26
Message: <37C1AE67.215F06F3@peak.edu.ee>
Stupid mistake. So I'm not that hardcore ;)
I should've realised this by the fact that "inverse" does not flip the surface
normals! It really should, IMO.
Would this be easy to fix? And if so, would someone be willing to do it? I'd say
it is quite important.

Margus

Ron Parker wrote:
> 
> But there is no difference between those two methods within POV: it
> internally converts a difference to an intersection at parse time.


Post a reply to this message

From: Nieminen Juha
Subject: Re: Inverting Normals
Date: 24 Aug 1999 04:02:03
Message: <37c2517b@news.povray.org>
Margus Ramst <mar### [at] peakeduee> wrote:
: I should've realised this by the fact that "inverse" does not flip the surface
: normals! It really should, IMO.
: Would this be easy to fix? And if so, would someone be willing to do it? I'd say
: it is quite important.

  I think this is true. The outer surface of an object is the outer surface
of the object, no matter if it's a csg object or what. The normal should
always point away from the outer surface.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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