PDA

View Full Version : directional matrixs values



zed
05-14-2006, 07:40 PM
for creating cubemaps what are the correct values to use, im using the following. i believe i came by these values from guesswork and not with an accepted standard method.
ta zed


MATRIX44( 0, 0,-1, 0, 0,-1, 0, 0, -1, 0, 0, 0, pos.z, pos.y, pos.x, 1.0 ),
MATRIX44( 0, 0, 1, 0, 0,-1, 0, 0, 1, 0, 0, 0, -pos.z, pos.y,-pos.x, 1.0 ),
MATRIX44( 1, 0, 0, 0, 0, 0,-1, 0, 0, 1, 0, 0, -pos.x,-pos.z, pos.y, 1.0 ),
MATRIX44( 1, 0, 0, 0, 0, 0, 1, 0, 0,-1, 0, 0, -pos.x, pos.z,-pos.y, 1.0 ),
MATRIX44( 1, 0, 0, 0, 0,-1, 0, 0, 0, 0,-1, 0, -pos.x, pos.y, pos.z, 1.0 ),
MATRIX44(-1, 0, 0, 0, 0,-1, 0, 0, 0, 0, 1, 0, pos.x, pos.y,-pos.z, 1.0 ) };

Zulfiqar Malik
05-15-2006, 12:22 AM
What values are you talking about? What are they used for?

jide
05-15-2006, 04:20 AM
Zulfiqar, I guess its the visualization matrices for taking snapshots of the scene for all the 6 planes.

zed, what I don't understand here is what you really intended to do. Aren't generally those snapshots to be done from the same position ?

zed
05-15-2006, 11:53 PM
zed, what I don't understand here is what you really intended to do. Aren't generally those snapshots to be done from the same position ?they are the same position

basically im using this for when u want to see the surrounding scene from a position with 6 different views (ie a cubemap)
i had a go last night at 4am (thus not 100% alert) with a piece of paper and came up with
0,0,-1, 0,1,0, 1,0,0
0,0,1, 0,1,0, -1,0,0
0,1,0, 0,0,-1, -1,0,0,
0,1,0, 0,0,1, 1,0,0
-1,0,0, 0,1,0, 0,0,-1,
1,0,0, 0,1,0, 0,0,1

this is one of those things wheres theres mulitple correct answers (one of my pet hates) so i was wanting the most common usages