Archived

This topic is now archived and is closed to further replies.

Bobboau

scaleing

Recommended Posts

Bobboau    122
I need a way to make objects in a rendered sceen seem bigger than they currently do, I''m thinking some sort of scaleing on the projection matrix to increese the Paralax effect, but I''m not sure how to do that or even if that would work Bobboau, bringing you products that work... in theory

Share this post


Link to post
Share on other sites
Hog    122
matMatrix = Matrix.Identity

''Scale the object(s) by scaling factor

matMatrix.Multiply(Matrix.Scaling(sglScale, sglScale, sglScale))

This is how I do it

Share this post


Link to post
Share on other sites
neneboricua19    634
Just scale the transform matrices of your geometry. Say you want everything in your scene to be 10 times larger. Then during init, just set up a scaling matrix to do that:

D3DXMatrixScaling( &m_matGlobalScale, 10.0f, 10.0f, 10.0f );

Then in your rendering code, apply this matrix to all your geometry before you apply any other rotations/translations/scalings for that model:

Model::Render(....)
{
....
matWorld = m_matGlobalScale * matWorld;
pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
}

Hope this helps,
neneboricua

Share this post


Link to post
Share on other sites
Supernat02    604
Parallax effect...isn''t that when your perception of one object''s position in relation to another object (typically in front of it) is skewed? i.e. looking at the speedometer needle from the passenger''s side and it reads 30 MPH, when the driver sees 40 MPH. Is this the effect you want?

Or it sounds like you may want a Fisheye effect, where the objects are kind of mapped around a spherical view, larger in the center, tiny toward the outer edges...I''m not good at describing things sorry! Is this what you want though?

Chris

Share this post


Link to post
Share on other sites
Bobboau    122
sorry I wasn''t able to respond earlier, I had some major XP problems

anyway, if I just apply a scaleing matrix to the object before anything else, won''t that just make everything look bigger while not makeing the distance between them look any bigger, so if two ships are close to each other they would be intersecting and look totaly wrong. I''ve tryed applying a scaleing matrix after rotation and translation, but lighting seems to be totaly messed up.

the effect I want is for the projection of the verts to be stronger, so that verts that are far away look further than they are. so the far/small end of things looks smaller

Bobboau, bringing you products that work... in theory

Share this post


Link to post
Share on other sites