POV-Ray : Newsgroups : povray.binaries.images : Constructive Solid Geometry: problem! : Re: Constructive Solid Geometry: problem! Server Time
31 Oct 2024 20:12:42 EDT (-0400)
  Re: Constructive Solid Geometry: problem!  
From: Anthony D  Baye
Date: 8 Aug 2015 19:35:00
Message: <web.55c691044327e3232aaea5cb0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> Hi!
> Problem with matrixes. :(
>
> #version 3.7;
>
> #include "shapes.inc"
> #include "functions.inc"
> global_settings {
>     assumed_gamma 1.000000
> }
> sky_sphere {
>     pigment {rgb<0.050, 0.050, 0.050>}
> }
>
> #declare Default_texture = texture{pigment {rgb 0.8}}
>
> #declare Material = texture{
>     pigment{color rgbft <0.8000,0.0388,0.1277,0.0000,0.0000>}
>     finish{
>         diffuse 0.8000
>         brilliance 1.8000
>         crand 0.0000
>         emission 0.0000
>         ambient <0.0000,0.0000,0.0000>
>           }
> }
> #declare data_Box_shape_003_ob = box { -1,1
>     texture {Material}
> }
> #declare data_Cone_shape_001_ob = cone {
> <0,0,-1.0000>,1.0000,<0,0,1.0000>,0.3000
>     texture {Default_texture}
> }
> #declare data_Box_shape_ob = box { -1,1
>     texture {Default_texture}
> }
> #declare data_Box_shape_001_ob = box { -1,1
>     texture {Material}
> }
> #declare data_Box_shape_002_ob = box { -1,1
>     texture {Material}
> }
> #declare data_Boolean_000_ob =
> difference {
>     union {
>         object {data_Box_shape_ob
>             texture {Default_texture}
>     matrix <1.000000, 0.000000, 0.000000,  0.000000, -0.000000, -1.000000,
> 0.000000, 1.609000, -0.000000,  3.005314, 0.000000, 0.000000>
>         }
>     }
>     object {data_Cone_shape_001_ob
>         texture {Default_texture}
>     matrix <1.000000, 0.000000, 0.000000,  0.000000, 1.000000, 0.000000,
> 0.000000, 0.000000, 2.432501,  2.941242, 0.000000, 0.000000>
>     }
> }
> #declare data_Boolean_001_ob =
> difference {
>     union {
>         object {data_Box_shape_ob
>             texture {Default_texture}
>     matrix <1.000000, 0.000000, 0.000000,  0.000000, -0.000000, -1.000000,
> 0.000000, 1.609000, -0.000000,  3.005314, 0.000000, 0.000000>
>         }
>     }
>     object {data_Cone_shape_001_ob
>         texture {Default_texture}
>     matrix <1.000000, 0.000000, 0.000000,  0.000000, 1.000000, 0.000000,
> 0.000000, 0.000000, 2.432501,  2.941242, 0.000000, 0.000000>
>     }
> }
> object {data_Boolean_000_ob
>     rotate x*90
>     matrix <1.000000, 0.000000, 0.000000,  0.000000, -0.000000, -1.000000,
> 0.000000, 1.609000, -0.000000,  -0.840426, 0.000000, 0.000000>
> }
>
> object {data_Box_shape_003_ob
>     matrix <0.166166, 0.000000, 0.000000,  0.000000, -0.000000, -0.166166,
> 0.000000, 0.166166, -0.000000,  0.000000, 1.426066, 1.168468>
> }
>
> object {data_Boolean_001_ob
>     rotate x*90
>     matrix <1.000000, 0.000000, 0.000000,  0.000000, -0.000000, -1.000000,
> 0.000000, 1.609000, -0.000000,  1.365901, 0.000000, 0.000000>
> }
>
> object {data_Box_shape_001_ob
>     matrix <0.166166, 0.000000, 0.000000,  0.000000, -0.000000, -0.166166,
> 0.000000, 0.166166, -0.000000,  0.000000, -1.779218, 1.168468>
> }
>
> object {data_Box_shape_002_ob
>     matrix <0.166166, 0.000000, 0.000000,  0.000000, -0.000000, -0.166166,
> 0.000000, 1.297221, -0.000000,  2.212118, 1.555311, 0.825095>
> }
>
> light_source {
>     <5.07,5.58,4.28>
>     color rgb<1, 1, 1>
>     fade_distance 25.0000000000
>     fade_power 1
> }
> camera {
>     perspective
>     location  <0,0,0>
>     look_at  <0,0,-1>
>     right <-1.7777777777777777, 0, 0>
>     up <0, 1, 0>
>     angle  49.134343
>     rotate  <-27.098163, 46.688390, -0.903519>
>     translate <7.481132, 5.343666, 6.507640>
> }

without further explanation of what you're trying to accomplish, the only thing
I can see is that your z axis appears to be flipped between the wireframe on the
right and the render on the left.

Your camera is a lot more complex than I would normally use, but I assume this
is a result of export from blender.

Normally, I would simply have

up y
right x*(image_width/image_height)

and adjust my height and width on the command line, or via an ini file.

I assume specifying the angle compensates for distortion in the foreground from
having a wide format aspect ratio with a perspective camera...

I also notice that you've converted your camera for a right-handed coordinate
system by negating the aspect ratio and looking toward the negative z... This
might explain the flipped axis.  Is blender right-handed or left?

Regards,
A.D.B.


Post a reply to this message

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