Jump to content
  • Advertisement
Sign in to follow this  
nagajim

(Un)Transformed Verticies - Model , World & Screen Space

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, This is a 2D application and I am using Direct3D throughout with Managed Code. I have used Transformed Verticies to draw static elements using a scale of 1pixel=1m. The coordinate 0,0 for these is top-left. I assume that this is a modified "World Space". By applying offsets I can display any part of this "World" on Screen - "Screen Space". For my moving elements I am using UnTransformed Verticies. So.... 1. How can I ensure that my simple Model (0,0,0 at center) is defined in "Model Space" using the same units as I use in my "World Space" ie 1pixel=1m? I have tried setting different camera positions on the Z axis but this seems a little hit and miss. 2. I can Rotate & Translate the model in "World Space" but with 0,0,0 at the center. But how do I match with my Transformed Verticies above which have their coordinate 0,0 at top left? 3. Having matched the two - do I assume I just apply my offsets (above) to display required part on the screen? Thanks for any help or suggestions. NagaJim

Share this post


Link to post
Share on other sites
Advertisement
Hi there nagajim,
How are you doing?


The Problem
Transformed and unTransformed vertices

The Solution
You have to know why you will want to use Transformed vertices, They are defined in screen space and that fact you cannot change unless your transformed them to object space or world space after you have defined them. This defeats the whole purpose of using Transformed vertices anyway.

Think about it like this. Transformed vertices are used for GUI/HUD items such as your health etc... that will never be transformed by transformation matrices.

unTransformed vertices are placed in the world so that they may rotate etc.. like your meshes.

Coming to your question about units/scale. This you will have to work out according to what you want. Let's say you have a model and the size is 500px. You can say it's 500mm and so forth and stick to it.

Your question about placing the objects using unTransformed vertices in the location of 0.0, 0.0, 0.0 in screen space. That is what Transformed vertices are used for.

See the main thing here is if you want to have a spinning object at 0.0f, 0.0f screen space you can use a bitmap or so and just do some sprite animation.

I hope this is a little informative buddy.

[Edited by - Armadon on September 11, 2005 10:14:03 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!