generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Looking at 3D parts with 2D measurements

Previous Thread :: Next Thread 
MrHistory is not online. MrHistory
Joined: 30 Aug 2010
Total Posts: 5291
14 Aug 2012 05:10 PM
There are two 1x1x1 parts. Part one is positioned at 0,1,0 and the other is at 1,1,-1. The camera is at 0,1,3 looking directly at the first part.

Looks like this from a bird's eye view:

----[]
--[]


--^

with ^ being the camera.

How would I find out how many pixels high the first and second parts appear on the screen? Is there an equation for it?
Report Abuse
mew903 is not online. mew903
Joined: 03 Aug 2008
Total Posts: 22071
14 Aug 2012 05:21 PM
"1x1x1"

r u a hakr
Report Abuse
MrHistory is not online. MrHistory
Joined: 30 Aug 2010
Total Posts: 5291
14 Aug 2012 05:22 PM
hell yeah
Report Abuse
MrHistory is not online. MrHistory
Joined: 30 Aug 2010
Total Posts: 5291
14 Aug 2012 06:27 PM
Anyone got an equation? I'm really unfamiliar with graphics rendering
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
14 Aug 2012 06:34 PM
hmm I'll try to figure it out for you :)
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
14 Aug 2012 06:42 PM
Use a BillboardGui and the property `StudsOffset` to place a 0px*0px gui above and below the part, then use AbsolutePosition.
Report Abuse
awsumpwner27 is not online. awsumpwner27
Joined: 03 Sep 2011
Total Posts: 4389
14 Aug 2012 06:48 PM
The top of the part = 1.5, which is a difference of 0.5. The part's surface is closer than it's own position, so the surface is 2.5 away from the camera.

X = (atan(0.5/2.5)/FieldOfView)*ScreenHeightInPixels

From the center of the screen, going X units up, is where the top of the first brick appears... I think. I'm not sure about the other one.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
14 Aug 2012 06:49 PM
well, the magnification is determined only by the vertical size of the screen...
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
14 Aug 2012 07:29 PM
confirmed the above formula.

print(math.atan2(surface_top-camera.y,distance_to_surface)*(180/math.pi)/fov*screenheight)
Report Abuse
RA2lover is not online. RA2lover
Joined: 09 Nov 2008
Total Posts: 1254
14 Aug 2012 07:52 PM
AFAIK FOV is measured diagonally.
Report Abuse
awsumpwner27 is not online. awsumpwner27
Joined: 03 Sep 2011
Total Posts: 4389
18 Aug 2012 08:21 PM
I don't understand, would the size of the screen affect the FOV? Isn't the FOV not dependant on dimensions of the screen? If someone could explain this I'd be very grateful.
Report Abuse
AdvRobotALT is not online. AdvRobotALT
Joined: 16 Aug 2012
Total Posts: 9
18 Aug 2012 08:22 PM
r u a haker cuz telamons my dad n he hates da 1 ex 1 pls stop u no hakering is illegal
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image