face wrote:enricocerica wrote:Hi there,
I'm playing around with Blender trying to produce some input file to handle scatters for instances and was just wondering about the rotation, is it relative to the whole space or to the instanciated object origin ?
It´s the rotation of the instanced object origin.
face
tchoa wrote:Hi
For Maya users, I Just wrote a little script that can export the .csv file to feed octane's scatter node: Maya to Octane’s scatter node
roeland wrote:A later release will support exporting all those positions from a modeling application.
The coordinates in a scatter node are given as the first three rows of the transformation matrices (the fourth is always [0, 0, 0, 1]).
For instance the matrix for a 30° rotation around the Z axis looks like this:
[.87, –.50, 0, 0]
[.50, .87, 0, 0]
[ 0, 0, 1, 0]
[ 0, 0, 0, 1]
The scatter node will contain these 12 values:
.87 –.50 0 0 .50 .87 0 0 0 0 1 0
For a translation:
[1, 0, 0, tx]
[0, 1, 0, ty]
[0, 0, 1, tz]
[0, 0, 0, 1]
The scatter node will contain these 12 values:
1 0 0 tx 0 1 0 ty 0 0 1 tz
The intent is that these values will get exported from modeling applications.
There is also a placement node, that has one transform input and one geometry input, and this one transform is given as a transform node (translation, rotation, scale). The sierpinski demo scene was built with these nodes.
--
Roeland
Rotation on X [Mx] Rotation on Y [My] Rotation on Z [Mz]
| 1 0 0 0 | | cos(y) 0 -sin(y) 0 | | cos(z) sin(z) 0 0 |
| 0 cos(x) sin(x) 0 | | 0 1 0 0 | | -sin(z) cos(z) 0 0 |
| 0 -sin(x) cos(x) 0 | | sin(y) 0 cos(y) 0 | | 0 0 1 0 |
| 0 0 0 1 | | 0 0 0 1 | | 0 0 0 1 |
If you want to rotate on X then Y [Mx]*[My]
| cos(y) 0 -sin(y) 0 |
| sin(x)*sin(y) cos(x) sin(x)*cos(y) 0 |
| cos(x)*sin(y) -sin(x) cos(x)*cos(y) 0 |
| 0 0 0 1 |
Return to Development Build Releases
Users browsing this forum: No registered users and 2 guests