Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Basic question on transformations

26 views
Skip to first unread message

Yannick Duchêne

unread,
Apr 17, 2015, 10:39:11 PM4/17/15
to
Hi people,

That's a question I wanted to ask on the AQSIS forum, but it seems empty now and I can't log into it.

I'm unable to figure why an axis goes the opposite expected side. I was surprised to meet this issue, as I'm not totally new to Renderman.

First the sample RIB file, then an image of the result then the explanations of what I expected and how the result differs from what I expected.

Sample RIB, named `test4.rib`:

##RenderMan RIB-Structure 1.0
version 3.03
# test.rib
Exposure 1.0 2.2
Format 800 600 1.0
Projection "perspective" "fov" 40
Display "test4.tif" "tiff" "rgba"

Translate -3 -2.5 8
Scale 1 -1 1
Rotate 90 1 0 0

WorldBegin
TransformBegin
Color 0 0 0
Sphere 0.06 -0.06 0.06 360

# X axis
Color 1 0 0
Rotate 90 0 1 0
Cylinder 0.03 0 5 360

# Y axis
Color 0 1 0
Rotate 90 1 0 0
Cylinder 0.03 0 5 360

# Z axis
Color 0 0 1
Rotate -90 0 1 0
Cylinder 0.03 0 5 360
TransformEnd
WorldEnd


The result I get:
http://www.les-ziboux.rasama.org/exported/test4-result.png

What I expected:
http://www.les-ziboux.rasama.org/exported/test4-expected.png

Seems for Y axis, I have to `Rotate -90 1 0 0` instead of `Rotate 90 1 0 0`, and I don't understand why.

Here is my understanding (sorry for being verbose):

* RenderMan default coordinate system, has X axis going rightward, Y axis going upward and Z axis going inward.

* I want a displayed coordinate system where X axis go rightward (as the default), the Y axis go outward and the Z axis go upward.

* First, I added a rotation around X axis (`Rotate 90 1 0 0`), to rotate the Y axis toward the Z axis, so that X goes rightward (unchanged), Y goes outward and Z goes downward.

* Then, as Z now go downward, which is not expected, I added a scale to invert Z's direction (`Scale 1 -1 1`), so that it go upward.

* I draw a sphere at the origin.

* I draw the X axis using a thin and long red cylinder. For this purpose, I have to rotate the X axis so that it takes the place of the Z axis, a rotation around Y axis, with the X axis going toward the Z axis, in the world coordinate system: `Rotate 90 0 1 0`.

* The X axis is drawn as expected.

* Now I want to draw the Y axis using a thin and long green cylinder. For this purpose, I have to rotate the Y axis so that in takes the place of Z axis, a rotation around X axis, with the Y axis going toward the Z axis in the word coordinate system: `Rotate 90 1 0 0`.

Seems there is an issue I don't understand here. If I do this, the Y axis is drawn inward instead of outward and I have to use `-90` instead of `90` for the rotation. I don't understand why.

There no issue when drawing the Z axis, neither with the X axis, only when drawing the Y axis.


Where have I made an erroneous assumption? With the prior world coordinates transformations or with object coordinates transformations in the world coordinates?


P.S. As question aside, do someone know what happened with the AQSIS forum? Will it be reopened? I registered in the new forum, but signing-in seems to not work.

Yannick Duchêne

unread,
Apr 17, 2015, 10:41:08 PM4/17/15
to
Le samedi 18 avril 2015 04:39:11 UTC+2, Yannick Duchêne a écrit :
> * RenderMan default coordinate system, has X axis going rightward, Y axis going upward and Z axis going inward.

Oops, typo. Please, read "Z axis going outward" instead of "Z axis going inward".

Yannick Duchêne

unread,
Apr 18, 2015, 1:28:05 AM4/18/15
to
Le samedi 18 avril 2015 04:39:11 UTC+2, Yannick Duchêne a écrit :
>
> Where have I made an erroneous assumption? With the prior world coordinates transformations or with object coordinates transformations in the world coordinates?

May be my error was to assume the positive rotation around the X axis, makes the Y axis go toward the Z axis? Is this the error I made?
0 new messages