Re: Peculiar Object Sizing Behavior

5 views
Skip to first unread message
Message has been deleted

Matt Pharr

unread,
Jun 1, 2009, 5:45:40 PM6/1/09
to pb...@googlegroups.com
I think pbrt's correct (and you just got a transformation wrong). The
untransformed cylinder below goes from z-=7 to 7, but then after you
rotate it, it goes from x=-7 to 7. Your two quads go from x=-3.5 to
3.5, and so the cylinder sticks out.

-matt

On May 13, 2009, at 7:48 PM, psycho...@gmail.com wrote:

>
> I've created a simple scene file that should be pretty straightforward
> however when the scene renders I get strange proportions for the scene
> objects. The scene is simply a cylinder sandwiched between two planes.
> As the scene file code shows, the objects are given absolute
> dimensions and are defined to have the same length. However, when the
> scene is rendered the cylinder is longer than the planes - despite
> their using the exact same lengths!
>
> There are no dangling transforms being applied, just straight up
> absolute positioning.
>
> Are certain shapes positioned relative to different origins? Is there
> an assumed scaling factor applied somewhere?
>
> I'm baffled as to the cause of this behavior. Any insights would be
> very appreciated. Thanks.
>
> LookAt 3.25 0 18 0 0 0 0 1 0
> Camera "perspective" "float fov" [60.0]
> Film "image" "string filename" ["cylinder_test.exr"]
> "integer xresolution" [600] "integer yresolution" [600]
>
> WorldBegin
>
> TransformBegin
> Translate 0 0 10
> LightSource "point"
> "color I" [200 200 200]
> TransformEnd
>
> # Floor
> TransformBegin
> Material "plastic"
> "color Kd" [2 2 2]
> "color Ks" [2 2 2]
> "float roughness" [0.1]
> Shape "trianglemesh"
> "point P" [-3.49987 -6.99975 -3.49987 3.49987 -6.99975
> -3.49987 3.49987 -6.99975 3.49987 -3.49987 -6.99975 3.49987]
> "integer indices" [0 1 2 2 3 0]
> TransformEnd
>
> # Ceiling
> TransformBegin
> Material "plastic"
> "color Kd" [2 2 2]
> "color Ks" [2 2 2]
> "float roughness" [0.1]
> Shape "trianglemesh"
> "point P" [-3.49987 6.99975 -3.49987 3.49987 6.99975 -3.49987
> 3.49987 6.99975 3.49987 -3.49987 6.99975 3.49987]
> "integer indices" [0 1 2 2 3 0]
> TransformEnd
>
> # Cylinder 1
> TransformBegin
> Rotate 90 0 1 0
> Material "plastic"
> "color Kd" [2 2 2]
> "color Ks" [2 2 2]
> "float roughness" [0.1]
> Shape "cylinder" "float radius" [0.4] "float zmin" [-6.99975]
> "float zmax" [6.99975]
> TransformEnd
>
> WorldEnd
>
> >

psycho...@gmail.com

unread,
Jun 1, 2009, 8:02:58 PM6/1/09
to pbrt
Yup. You're absolutely right. Of course I realized this about 20
minutes *after* I posted. Oops. Thank you for the response though.
dave

Reply all
Reply to author
Forward
0 new messages