Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How many pixels per object size?

Author
Message
Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 24th Oct 2003 04:37
What I'm asking is, when you perform a command like
MAKE OBJECT PLAIN 1,2,2
How many pixels are there within a object face? I ask because I'm working on my user interface using MS Paint, and I usually decide size by pixel. However, I know that a 2 by 2 plain isn't 2 by 2 pixels, so what is it's size? Is there a conversion rate one could let me know of, such as 1 object size = 100 pixels?

Usermlsra - Causing Havoc with a Smile
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Oct 2003 07:26
well, that all depends on the object's distance from the camera. Pixels are tiny square making up your monitor's image, in 2D. Pixels aren't for 3D measurement.(maybe voxels?) If you want your plane's size of 2x2 to really show up as 2x2 pixels, position your plain at N units from the camera. N = screenheight() * 0.83. voila!
las6
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 24th Oct 2003 11:32
I think it's Texels, but I'm not 100% sure about that.

it all depend on how big the 2x2 plain will look. (how close to camera it will be) 2x2 texture will still always cover the whole plain, it's just that when you get close enough to the plain, (like it would cover 60x60 pixel size on the screen) it would just look blurry, because the colours of the screen pixels will be interpolated from the texture.so if you had one white on the left and black on the right, it would probably end up looking more like a blurry, gray gradient if zoomed close enough. Unless you turn off the filtering. (not recommended)

Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 24th Oct 2003 15:54
That is true, I had forgotten the camera influences a 3d objects size. However, with the formulae you gave me, phaelax, it should be easier to determine how big to make the plain. Also, I knew of the streching habits of the textures, las6. That was in part the problem, for if the texture did not fit right on the plain, I'd have a funky looking UI. Thanks for the help all.

Usermlsra - Causing Havoc with a Smile

Login to post a reply

Server time is: 2024-11-25 14:58:09
Your offset time is: 2024-11-25 14:58:09