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.

DarkBASIC Professional Discussion / Sun/Sphere size seems off?

Author
Message
Wubitog
21
Years of Service
User Offline
Joined: 22nd Apr 2005
Location:
Posted: 9th Feb 2011 04:02
I wanted to create a mockup of the solar system and started with the sun. My data may be wrong and I just keep missing it, but when i plug in these numbers the sun looks about the size of pen tip on the screen. They are rounded to millions of km.



What does "size" mean for making spheres if not radius or diameter?

1ghz p3, 512 ram, 256mb geforce 5200 pci
Wubitog
21
Years of Service
User Offline
Joined: 22nd Apr 2005
Location:
Posted: 9th Feb 2011 04:49
Seems like this may be accurate anyway. More to do with the sun appearing bigger because of the earth's atmophere, and were you in space it would be much smaller. Still haven't seen a picture of it quite that small but I guess this is the problem.

1ghz p3, 512 ram, 256mb geforce 5200 pci
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Feb 2011 05:35
size = DBPro Units.

What you make of the DBPro units is up to you. 1 = 1 inch, or 1 = 1,000 km.

You just have to scale everything else in proportion to whatever you decide.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Feb 2011 13:12 Edited at: 9th Feb 2011 13:21
This should tell you whether the size is the radius or diameter:



Edit Referring to your original question, the relative size on screen will depend on your camera's field of view (FOV). You need to choose a value that corresponds roughly to the amount of sky that you can see. I've no idea what the appropriate angle would be. I suggest you experiment with the set camera fov command and use the value which looks right. My guess is that the screen should correspond to only a part of the sky (unless you have your nose touching the screen ) so you probably need to use a value lower than the default value.
Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 11th Feb 2011 23:39
The size in the MAKE OBJECT SPHERE command is the diameter.

I think the reason why it looks so small is because you're moving the camera 149 units. If in your program 1 unit = 1 million km, then you're moving your camera 149 million km away from your object, which has a size of only 1.4 million km. Try moving the camera a shorter distance like 3 or 5


Guns, cinematics, stealth, items and more!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Feb 2011 01:56
Quote: "Try moving the camera a shorter distance like 3 or 5"


Why? Have you looked up the distance of the earth from the sun? It is about 149000000 KM I believe (or 93000000 miles from my old school days).

I don't know how big the sun is though.
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 13th Feb 2011 10:37 Edited at: 13th Feb 2011 10:38
If you want to have a visual of the apparent size of the Sun, MPL3D Solar System represents it accurately, so you may want to take a look into it.

I have these numbers, looking from the Earth surface:

Apparent Size of the Sun: 10.3 pixels
Screen Resolution: 1680x1050
Camera Field Of View: 55 degrees

So pretty small for a 55ยบ FOV, isn't it?



If you want to know which is the size in pixels for a certain object, given the object size, the distance, the screen resolution, and the camera FOV, you may want to take a look as well to this code snippet that I published some time ago:

[DBP / GDK] Angular size of an object in PIXELS - small angle formula

Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 15th Feb 2011 04:39
Quote: "Why? Have you looked up the distance of the earth from the sun? It is about 149000000 KM I believe (or 93000000 miles from my old school days)."


Well I was just going by his scale. His sun object is only 1.4 DBPro units big and he is moving the camera back 149... no wonder it looks so small


Guns, cinematics, stealth, items and more!
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 15th Feb 2011 11:03
Quote: "Well I was just going by his scale. His sun object is only 1.4 DBPro units big and he is moving the camera back 149... no wonder it looks so small"

Those are not bad numbers, Sun is 1,400,000 km wide...

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th Feb 2011 11:52
Exactly my point.
Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 17th Feb 2011 23:56 Edited at: 18th Feb 2011 00:01
I'm not saying the size of his sun is wrong, and I'm not debating any astronomical data here. I'm simply saying that the sun looks small because it is being viewed from far away.


Oh... I just realized that he was trying to look at the Sun from Earth, which would explain the large camera distance (this would also explain GG's post). I had thought that his camera movement was arbitrary. All is well now, sorry for wasting time


Guns, cinematics, stealth, items and more!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Feb 2011 00:30
No problem. We all do it sometimes.
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 19th Feb 2011 13:09
Quote: "No problem. We all do it sometimes."

Yeah count me in

Login to post a reply

Server time is: 2026-07-17 13:59:21
Your offset time is: 2026-07-17 13:59:21