0

I'm new to the 3d scene and I'm having issues regarding setting world dimensions for primitives.

I'm creating a cube primitive and mapping a texture onto it. Everything works as it should, but I want the primitive to be 32x32x32 pixels on the screen.

I figure I'll have to do that by using a scaling matrix, but what formula do I use to determine the scale?

Is there a formula to get the primitive dimensions so I can divide that by 32 in order to get the scale?

CodingMadeEasy
  • 2,257
  • 4
  • 19
  • 31
  • So there's other factors than simply the object dimensions that will affect screen size of an object. Relating object size to screen size in 3d is somewhat ambiguous. For instance, in a 3d scene, in addition to objects, you will also have a camera (view matrix). Without changing an object's size, you could move the camera closer or farther and the screen size of the object will appear to grow or shrink. Also changing the field of view in the projection matrix affects how much screen space an object might take up (like a fish eye lens vs. telephoto lens). – Steve H Feb 28 '16 at 16:29
  • In your opinion, how deep is a pixel? Or in other words, what properties must an object have that it has a dimension of 32x32**x32** pixels? Anyway, in most applications, you don't really want to care about details such as pixel size. You represent your scene in vector representation and the rasterizer takes care of getting the scene on the screen. – Nico Schertler Feb 28 '16 at 17:14

0 Answers0