|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
>
> 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.
There are objects which are correctly displayed. Color - red. Look in the
3D-viewport.
Only csg are incorrectly displayed. What does it have to do with camera?
I create box:
#declare obBox = box{}
I create cone:
#declare obCone = cone{}
I create csg:
#declare obBox_Minus_obCone = difference{
object {obBox matrixBox}
object {obCone matrixCone}
}
I make transformation and I declare:
object{obBox_Minus_obCone matrixObBox_Minus_obCone}
Result wrong
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"LanuHum" <Lan### [at] yandexru> wrote:
> "Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> >
> > 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.
>
> There are objects which are correctly displayed. Color - red. Look in the
> 3D-viewport.
> Only csg are incorrectly displayed. What does it have to do with camera?
> I create box:
> #declare obBox = box{}
> I create cone:
> #declare obCone = cone{}
> I create csg:
> #declare obBox_Minus_obCone = difference{
> object {obBox matrixBox}
> object {obCone matrixCone}
> }
> I make transformation and I declare:
> object{obBox_Minus_obCone matrixObBox_Minus_obCone}
>
> Result wrong
As near as I can tell, your objects are exactly where your matrix
transformations say they should be, though that's a really ambiguous way of
performing a scale and translate.
the offending translations appear to be happening in your difference objects.
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>
and
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>
Respectively, seem to have the objects shifted in the positive x axis.
I inserted axes using:
union {
cylinder { -1e5*x, 1e5*x 1/128 pigment { rgb <1,0,0> } }
cylinder { -1e5*y, 1e5*y 1/128 pigment { rgb <0,1,0> } }
cylinder { -1e5*z, 1e5*z 1/128 pigment { rgb <0,0,1> } }
}
x: red
y: green
z: blue
Regards,
A.D.B.
Post a reply to this message
Attachments:
Download 'lanu01.png' (111 KB)
Preview of image 'lanu01.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I edited your description for legibility, and added a camera above, looking
down:
#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>
}
*/
// Camera above, looking down
camera {
perspective
location <0.0, 10, 0.06>
up z
right x*(image_width/image_height)
look_at 0
}
union {
cylinder { -1e5*x, 1e5*x 1/128 pigment { rgb <1,0,0> } }
cylinder { -1e5*y, 1e5*y 1/128 pigment { rgb <0,1,0> } }
cylinder { -1e5*z, 1e5*z 1/128 pigment { rgb <0,0,1> } }
}
You'll notice that things weren't exactly as they seemed in the isometric view
that blender provides.
This is one of the things I dislike about the controls in blender. They don't
provide you per-axis translation, so you can't be certain that things are where
you think they are.
Unless blender has an orthographic three-panel view that I haven't found...
Regards,
A.D.B.
Post a reply to this message
Attachments:
Download 'lanu02_topdown.png' (42 KB)
Preview of image 'lanu02_topdown.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It's hard to tell in the image on the right what is solid and what isn't
due to the transparency.
Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
>
> Unless blender has an orthographic three-panel view that I haven't found...
>
> Regards,
> A.D.B.
In 3D-window: Menu => View => Toggle Quad View
#version 3.7;
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.0300,0.0546,0.0000,0.0000>}
}
#declare Material_001 = texture{
pigment{color rgbft <0.8000,0.0510,0.0190,0.0000,0.0000>}
}
#declare Material_002 = texture{
pigment{color rgbft <0.7838,0.8000,0.0830,0.0000,0.0000>}
}
#declare data_Box_shape_006_ob = box { -1,1
texture {Material_001}
}
#declare data_Box_shape_005_ob = box { -1,1
texture {Material_001}
}
#declare data_Box_shape_004_ob = box { -1,1
texture {Material_001}
}
#declare data_Box_shape_003_ob = box { -1,1
texture {Material_001}
}
#declare data_Box_shape_002_ob = box { -1,1
texture {Material_001}
}
#declare data_Box_shape_ob = box { -1,1
texture {Material_001}
}
#declare data_Cone_shape_ob = cone { <0,0,-1.0000>,1.0000,<0,0,1.0000>,0.3000
texture {Material}
}
#declare data_Box_shape_001_ob = box { -1,1
texture {Material_002}
}
#declare data_Boolean_002_ob =
difference {
union {
object {data_Box_shape_001_ob
texture {Material_002}
matrix <1.000000, 0.000000, 0.000000, 0.000000, -0.000000, -1.000000,
0.000000, 2.166961, -0.000000, 0.000000, 0.000000, 0.000000>
}
}
object {data_Cone_shape_ob
texture {Material}
matrix <1.073773, 0.000000, 0.000000, 0.000000, -1.038544, -0.272790,
0.000000, 0.272790, -1.038544, 0.000000, 0.000000, 0.598508>
}
}
#declare data_Boolean_001_ob =
difference {
union {
object {data_Box_shape_001_ob
texture {Material_002}
matrix <1.000000, 0.000000, 0.000000, 0.000000, -0.000000, -1.000000,
0.000000, 2.166961, -0.000000, 0.000000, 0.000000, 0.000000>
}
}
object {data_Cone_shape_ob
texture {Material}
matrix <1.073773, 0.000000, 0.000000, 0.000000, -1.038544, -0.272790,
0.000000, 0.272790, -1.038544, 0.000000, 0.000000, 0.598508>
}
}
#declare data_Boolean_ob =
difference {
union {
object {data_Box_shape_001_ob
texture {Material_002}
matrix <1.000000, 0.000000, 0.000000, 0.000000, -0.000000, -1.000000,
0.000000, 2.166961, -0.000000, 0.000000, 0.000000, 0.000000>
}
}
object {data_Cone_shape_ob
texture {Material}
matrix <1.073773, 0.000000, 0.000000, 0.000000, -1.038544, -0.272790,
0.000000, 0.272790, -1.038544, 0.000000, 0.000000, 0.598508>
}
}
object {data_Boolean_002_ob
rotate x*90
matrix <0.702762, 0.000000, 0.000000, 0.000000, -0.000000, -0.702762,
0.000000, 1.522857, -0.000000, -1.625485, 0.000000, 0.000000>
}
object {data_Boolean_001_ob
rotate x*90
matrix <0.702762, 0.000000, 0.000000, 0.000000, -0.000000, -0.702762,
0.000000, 1.522857, -0.000000, 1.729432, 0.000000, 0.000000>
}
object {data_Box_shape_006_ob
matrix <0.000000, -2.966263, 0.000000, 0.000000, -0.000000, -0.118176,
0.118176, 0.000000, 0.000000, 0.000000, -0.098659, 0.806181>
}
object {data_Box_shape_005_ob
matrix <0.000000, -2.966263, 0.000000, 0.000000, -0.000000, -0.118176,
0.118176, 0.000000, 0.000000, 0.012403, -0.098659, -0.806181>
}
object {data_Box_shape_004_ob
matrix <0.000000, -2.966263, 0.000000, 0.000000, -0.000000, -0.118176,
0.118176, 0.000000, 0.000000, 0.855792, -0.098659, 0.000000>
}
object {data_Box_shape_003_ob
matrix <0.000000, -2.966263, 0.000000, 0.000000, -0.000000, -0.118176,
0.118176, 0.000000, 0.000000, -0.744167, -0.098659, 0.000000>
}
object {data_Box_shape_002_ob
matrix <2.966263, 0.000000, 0.000000, 0.000000, -0.000000, -0.118176,
0.000000, 0.118176, -0.000000, 0.000000, -1.649006, 0.000000>
}
object {data_Box_shape_ob
matrix <2.966263, 0.000000, 0.000000, 0.000000, -0.000000, -0.118176,
0.000000, 0.118176, -0.000000, 0.000000, 1.635401, -0.000000>
}
object {data_Boolean_ob
rotate x*90
matrix <0.702762, 0.000000, 0.000000, 0.000000, -0.000000, -0.702762,
0.000000, 1.522857, -0.000000, 0.000000, 0.000000, 0.000000>
}
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>
}
Post a reply to this message
Attachments:
Download 'for_views.jpg' (271 KB)
Preview of image 'for_views.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 08.08.2015 um 20:22 schrieb LanuHum:
> Hi!
> Problem with matrixes. :(
It's difficult for me to tell from the images what's happening; however,
in general I would check...:
- whether the matrix export /per se/ works properly, and puts the
coefficients in the right order; and
- whether in this case the actual matrix should be exported, or its
inverse instead.
Also, if in Blender the transformation is stored in a different format
(like a set of rotation and a scaling operations), then I would suggest
exporting those, instead of trying to "bake" them into a matrix.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Also, if in Blender the transformation is stored in a different format
> (like a set of rotation and a scaling operations), then I would suggest
> exporting those, instead of trying to "bake" them into a matrix.
If the object is transformed by modifiers, I can't receive its arrangement
without matrix:
translate = matrix.translation[:]
rotate = tuple([degrees(e) for e in matrix.to_3x3().to_euler()])
scale = matrix.to_scale()[:]
But, without modifiers - seldom it is ( little) used.
Orientation of the exporter - animation.
The user will use armature (bones), array, array with curve, dupliverts,
dupliface, dupliframe, dupligroup, particles.
All coordinates are calculated from object.matrix_world
> - whether in this case the actual matrix should be exported, or its
> inverse instead.
matrix.inverse csg or components?
I in matrixes understand nothing!!! :(
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 09.08.2015 um 20:29 schrieb LanuHum:
>> - whether in this case the actual matrix should be exported, or its
>> inverse instead.
>
> matrix.inverse csg or components?
> I in matrixes understand nothing!!! :(
I'm refering to the matrix inverse here. In a nutshell, a matrix's
inverse is the matrix that, when applied, reverts the effect of applying
the matrix itself: If the original matrix applies a rotation, the
inverse applies the opposite rotation; if the original matrix applies a
scaling by the factor N in any direction, the inverse applies a scaling
by the factor 1/N in that same direction; if the original matrix applies
a translation by a vector V, the inverse applies a translation by -V;
and if a matrix applies any combination of the above in a particular
order, the inverse applies the respective inverse of the individual
operations in reverse order.
In raytracing, a transformation matrix's inverse is needed internally
for some computations, so maybe in some cases, what Blender considers
"the operation" might be what POV-Ray considers "the inverse of the
operation".
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 09.08.2015 um 20:29 schrieb LanuHum:
>
> >> - whether in this case the actual matrix should be exported, or its
> >> inverse instead.
> >
> > matrix.inverse csg or components?
> > I in matrixes understand nothing!!! :(
>
> I'm refering to the matrix inverse here. In a nutshell, a matrix's
> inverse is the matrix that, when applied, reverts the effect of applying
> the matrix itself: If the original matrix applies a rotation, the
> inverse applies the opposite rotation; if the original matrix applies a
> scaling by the factor N in any direction, the inverse applies a scaling
> by the factor 1/N in that same direction; if the original matrix applies
> a translation by a vector V, the inverse applies a translation by -V;
> and if a matrix applies any combination of the above in a particular
> order, the inverse applies the respective inverse of the individual
> operations in reverse order.
>
> In raytracing, a transformation matrix's inverse is needed internally
> for some computations, so maybe in some cases, what Blender considers
> "the operation" might be what POV-Ray considers "the inverse of the
> operation".
No.
Other calculations are necessary.
In my opinion, I found the solution.
So far everything is correct.
:)
Post a reply to this message
Attachments:
Download 'boolean.blend.jpg' (130 KB)
Preview of image 'boolean.blend.jpg'
|
|
| |
| |
|
|
|
|
| |
|
|