|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
[I think this already came up, but I can't find the thread any more, One
of these days I'll have to set up a full text index for povray.*]
While playing around with superellipsoids and the orthographic camera I
found that the superellipsoid vanishes if the camera is pointing exactly
along the X axis. Here is a short scene file to demonstrate the effect:
---8<------8<------8<------8<------8<------8<------8<------8<---
#include "colors.inc"
global_settings {
assumed_gamma 1.0
}
light_source {
<2000, 2000, -2000>
color White
}
camera {
location <90, 0.000000, 0.00000>
look_at <0, 0, 0>
angle 10
orthographic
}
superellipsoid {
<0.25, 0.25>
scale <2.5, 1, 3>
pigment {
checker color Yellow, color Red
scale 10
}
}
background { color rgb<0.2, 0.4, 0.8> }
---8<------8<------8<------8<------8<------8<------8<------8<---
If you replace one of the 0.000000 values in the camera location by
0.000001 the superellipsoid miraculously appears again.
The povray statistics say:
Ray->Shape Intersection Tests Succeeded Percentage
----------------------------------------------------------------------------
Superellipsoid 77361 0 0.00
----------------------------------------------------------------------------
So it looks like the ray->shape Intersection test for superellipsoids
doesn't work if the ray is exactly parallel to the x axis.
With a non-orthographic camera this probably doesn't matter since it
affects at most one ray.
hp
PS: I hope it is okay to include short scene files directly in the text
instead of posting them to povray.text.scene-files.
--
_ | Peter J. Holzer | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR | sondern an der Einrichtung (aka Content).
| | | hjp### [at] wsracat | -- Ale### [at] univieacat
__/ | http://www.hjp.at/ | zum Thema Portale in at.linux
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Peter J. Holzer" wrote:
> PS: I hope it is okay to include short scene files directly in the text
> instead of posting them to povray.text.scene-files.
This small amount of code is acceptable.
--
Ken Tyler - ken### [at] tagpovrayorg
Post a reply to this message
|
|
| |
| |
|
|
From: Bob Hughes
Subject: Re: Strange behaviour of superellipsoid with orthographic camera
Date: 13 Jun 2000 16:23:41
Message: <3946984d@news.povray.org>
|
|
|
| |
| |
|
|
"Peter J. Holzer" <hjp### [at] SiKituwsracat> wrote in message
news:slr### [at] tealhhjpat...
|
| While playing around with superellipsoids and the orthographic camera I
| found that the superellipsoid vanishes if the camera is pointing exactly
| along the X axis. Here is a short scene file to demonstrate the effect:
|
| If you replace one of the 0.000000 values in the camera location by
| 0.000001 the superellipsoid miraculously appears again.
|
| The povray statistics say:
|
| Ray->Shape Intersection Tests Succeeded Percentage
| ----------------------------------------------------------------------------
| Superellipsoid 77361 0 0.00
| ----------------------------------------------------------------------------
|
| So it looks like the ray->shape Intersection test for superellipsoids
| doesn't work if the ray is exactly parallel to the x axis.
|
| With a non-orthographic camera this probably doesn't matter since it
| affects at most one ray.
Really makes me wonder what's going on behind the scenes (heh, a pun) anyway.
If the slight offset of x or z from 0 is done and 'orthographic' is placed
first ahead of anything else then the superellipsoid more than fills the
display window. When placed after 'location' and before 'angle' it shows up
but only as a tiny size.
This behaviour of course has been observed before concerning orthographic
cameras.
However the s.e. is still non-existant it seems otherwise.
Also, unless the axes are offset a fair amount, say <90,1,1> there are
artifacts showing up at the shadow/light boundary, perspective camera or not.
| PS: I hope it is okay to include short scene files directly in the text
| instead of posting them to povray.text.scene-files.
I don't see that as wrong, like you said it is a short description of the
effect.
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 13 Jun 2000 20:16:48 +0200, hjp### [at] SiKituwsracat (Peter
J. Holzer) wrote:
>While playing around with superellipsoids and the orthographic camera I
>found that the superellipsoid vanishes if the camera is pointing exactly
>along the X axis. Here is a short scene file to demonstrate the effect:
You're right it has been discussed but I don't recall anyone coming up
with a solution. IIRC, though, the person who discovered the bug had a
more typical camera setup, i.e. camera at -z looking at z. Maybe it is
related to the camera rays being parallel to one of the
superellipsoid's local axes. A superelly is a strange beast :)
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG e-mail : pet### [at] tagpovrayorg
Post a reply to this message
|
|
| |
| |
|
|
From: Warp
Subject: Re: Strange behaviour of superellipsoid with orthographic camera
Date: 14 Jun 2000 04:08:51
Message: <39473d93@news.povray.org>
|
|
|
| |
| |
|
|
Since it seems to be some kind of bug, it may be worth to post a bug
report to the appropriate group (or has it been posted already?).
--
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 13 Jun 2000 15:22:39 -0500, Bob Hughes wrote:
>"Peter J. Holzer" <hjp### [at] SiKituwsracat> wrote in message
>news:slr### [at] tealhhjpat...
>|
>| While playing around with superellipsoids and the orthographic camera
>| I found that the superellipsoid vanishes if the camera is pointing
>| exactly along the X axis.
[...]
>|
>| So it looks like the ray->shape Intersection test for superellipsoids
>| doesn't work if the ray is exactly parallel to the x axis.
>
>Really makes me wonder what's going on behind the scenes (heh, a
>pun) anyway. If the slight offset of x or z from 0 is done and
>'orthographic' is placed first ahead of anything else then the
>superellipsoid more than fills the display window. When placed after
>'location' and before 'angle' it shows up but only as a tiny size.
Yes, this is normal and documented. Angle is ignored if it comes after
the orthographic keyword, and look_at works somewhat differently. This
may be a little bit surprising at first, but its rather logical and you
get used to it. That's not my problem.
>However the s.e. is still non-existant it seems otherwise. Also, unless
>the axes are offset a fair amount, say <90,1,1> there are artifacts
>showing up at the shadow/light boundary, perspective camera or not.
You are right. I didn't notice them at first, because my test rendering
was only 320x240. But at 1024x768 they are very clearly visible. They
look similar to the artifacts one gets with coincident surfaces, so I
guess that's also a ray/shape intersection test problem (maybe the ray
misses the front surface and hits the back surface?)
hp
--
_ | Peter J. Holzer | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR | sondern an der Einrichtung (aka Content).
| | | hjp### [at] wsracat | -- Ale### [at] univieacat
__/ | http://www.hjp.at/ | zum Thema Portale in at.linux
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 14 Jun 2000 01:30:14 +0300, Peter Popov wrote:
>On Tue, 13 Jun 2000 20:16:48 +0200, hjp### [at] SiKituwsracat (Peter
>J. Holzer) wrote:
>
>>While playing around with superellipsoids and the orthographic camera
>>I found that the superellipsoid vanishes if the camera is pointing
>>exactly along the X axis.
>
>You're right it has been discussed but I don't recall anyone coming up
>with a solution. IIRC, though, the person who discovered the bug had a
>more typical camera setup, i.e. camera at -z looking at z.
I didn't notice the effect at the z or y axis.
>Maybe it is related to the camera rays being parallel to one of the
>superellipsoid's local axes.
Yep, I think so.
hp
--
_ | Peter J. Holzer | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR | sondern an der Einrichtung (aka Content).
| | | hjp### [at] wsracat | -- Ale### [at] univieacat
__/ | http://www.hjp.at/ | zum Thema Portale in at.linux
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 14 Jun 2000 04:08:51 -0400, Warp wrote:
> Since it seems to be some kind of bug, it may be worth to post a bug
>report to the appropriate group (or has it been posted already?).
Not yet. The posting guidelines for povray.bugreports say, that one
should post the report here first, so that it can be verified by other
people. If there is general consensus, I'll repost it to
povray.bugreports.
hp
PS: Did anyone look at my posting "Overflow in accumulate_histogram"
from a few days ago? I'd like to repost that to povray.bugreports, too
(especially since I included the fix).
--
_ | Peter J. Holzer | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR | sondern an der Einrichtung (aka Content).
| | | hjp### [at] wsracat | -- Ale### [at] univieacat
__/ | http://www.hjp.at/ | zum Thema Portale in at.linux
Post a reply to this message
|
|
| |
| |
|
|
From: Bob Hughes
Subject: Re: Strange behaviour of superellipsoid with orthographic camera
Date: 14 Jun 2000 22:59:57
Message: <394846ad@news.povray.org>
|
|
|
| |
| |
|
|
"Peter J. Holzer" <hjp### [at] SiKituwsracat> wrote in message
news:slr### [at] tealhhjpat...
| On Tue, 13 Jun 2000 15:22:39 -0500, Bob Hughes wrote:
| >
| >Really makes me wonder what's going on behind the scenes (heh, a
| >pun) anyway. If the slight offset of x or z from 0 is done and
| >'orthographic' is placed first ahead of anything else then the
| >superellipsoid more than fills the display window. When placed after
| >'location' and before 'angle' it shows up but only as a tiny size.
|
| Yes, this is normal and documented. Angle is ignored if it comes after
| the orthographic keyword, and look_at works somewhat differently. This
| may be a little bit surprising at first, but its rather logical and you
| get used to it. That's not my problem.
|
| look similar to the artifacts one gets with coincident surfaces, so I
| guess that's also a ray/shape intersection test problem (maybe the ray
| misses the front surface and hits the back surface?)
Yep, I was merely pointing out the change with various ways of rendering it,
I've known about the position of 'orthographic' for a while now and just
wanted to emphasize that as being part of the whole thing about the camera
having differences too, not just the superellipsoid.
It's very noticeable how that shape can be quite slow to render sometimes,
would be great if someone had a new and better method of doing it. Like the
lathe speedup was.
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Peter J. Holzer" wrote:
>
> On 14 Jun 2000 04:08:51 -0400, Warp wrote:
> > Since it seems to be some kind of bug, it may be worth to post a bug
> >report to the appropriate group (or has it been posted already?).
>
> Not yet. The posting guidelines for povray.bugreports say, that one
> should post the report here first, so that it can be verified by other
> people. If there is general consensus, I'll repost it to
> povray.bugreports.
>
Well, then I think you can post it in povray.bugreports, as I
reproduce it and even find the correction.
The code modification is as follow (quoting code from memory):
in super.c, at the end of the intersect_box() local function,
right before the
return (TRUE)
there is two (bad) lines:
*dmin = tmin;
*dmax = tmax;
The correction is simple: remove these two lines !!!!
Not only does this solve the problem of the initial scene,
but with small rotate of the object, it also remove some
darker point (when not antialiasing), and also handle far more
better the nearly degenerate superellipsoid (you know, when
the parameter are less than 0.1 [well, 0.01 for example]).
Moreover, when experimenting with the old code, from the
example scene provided, I once get a strange picture: I could
see what I interpreted as the back of the superellipsoid
(darker than the front face) intermixed with some points of
the front face. With the updated code, I get the correct view.
Shame on me, I did not keep this scene.
I am mathematically correct about the need to remove the two lines
before the return(TRUE) of intersect_box in super.c, but
this is left as an exercice for the sceptics.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|