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 / Very large objects

Author
Message
Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 18th Jun 2011 10:29
Hi wazzup, I've been working on my space shooter (Conflicted Galaxyecimation) and, since I'm trying to make it as realistic as possible, I want everything to the scale of 1 unit=1 meter. The game takes place in the earth's orbit, meaning the entire earth has to be in the game. And it needs to be HUGE. Anyway, I was working on my 3d main menu with a post-apocalyptic earth rotating in the background, and since I saw no reason NOT to make my menu to the same scale as the game, I made the earth... 12700000 units diameter, here is my result:


I know it's hard to tell, but the seperate, transparent "cloud layer" flickers all over. You can't really tell from a screenshot but when watching the animation it's extremely obvious. By the way, when I hide the cloud layer, the problem dissapears, but I need a seperate cloud layer for when I cube map the water...

This is when I change the scale to 1 unit=1km, making the earth only 12700 units in diameter. I can't do that with the whole game; it messes up the physics engine and who knows what else. Soo... is there a way to make the transparent cloud layer appear correctly when it is very large and far away?

*´¨;
¸.•´¸.•*´¨; ¸.•*¨;
(¸.•´ (¸.Eviljackson1
Mulderman
20
Years of Service
User Offline
Joined: 8th Jan 2004
Location: C:\\
Posted: 18th Jun 2011 12:38
For god's sake, convert your pics to JPG.
Do not upload 10MB BMPs in forums.
Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 18th Jun 2011 19:16
Dude, I used the
commands... Didn't upload directly to the forums...

*´¨;
¸.•´¸.•*´¨; ¸.•*¨;
(¸.•´ (¸.Eviljackson1
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Jun 2011 19:24
Yes, but everyone else still has to download them as soon as the thread opens. Jpgs are far more efficient and the standard for this type of usage.


Quote: "it messes up the physics engine"

You should be able to scale your Physics engine. PhysX, Newton and Box2D certainly allow it.

Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 18th Jun 2011 20:30
Oh okay sorry.

Quote: "
You should be able to scale your Physics engine. PhysX, Newton and Box2D certainly allow it.

"


Yes, I suppose, but isn't there a better way to do it? I'd rather not program my entire game using values like 0.000017 all the time... Like it would be strange using a command like "move object 1,0.002" instead of just "move object 1,2". I suppose I will continue messing with it if there isn't a known solution.

*´¨;
¸.•´¸.•*´¨; ¸.•*¨;
(¸.•´ (¸.Eviljackson1
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 18th Jun 2011 22:15
Your cloud layer has to be exactly the same model as the Earth, with the exact same position and rotation. To make your clouds move, either use SCROLL OBJECT TEXTURE or use a shader to move the texture.

Then you have to make the cloud layer larger than the Earth. If it's having Z fighting issues as you describe, you need to make the cloud layer object larger until it doesn't do that anymore. You'll also want to SET OBJECT CULL to 0 for the cloud layer so you don't see holes in it along the edges.

To smooth out those blocky looking parts just increase the poly count of your spheres.

I did a very similar effect in Worlds Apart Online, although not at this scale. My space for an entire solar system was 400,000 x 400,000.

Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 19th Jun 2011 02:14 Edited at: 19th Jun 2011 03:25
I tried making the cloud layer object much larger than the earth, it's still doing it. Then I tried removing the earth entireley... results attached.

It is still flickering without the earth inside, however when I use the earth and no clouds it appears fine. I think the problem is the black/transparent areas of the cloud layer, somehow this messes everything up. I am referring to the completley invisible parts, I tried turning off the clouds' alpha, still didnt work. I think this because I tried a 2-layered outer space skybubble(so it looks more... dynamic) and similar problems appeared.

Oh, to be more specific, the idea wasnt that the earth rotates, I was actually thinking more like the camera is moving around the earth. So nothing is programmed to move/rotate other than the camera.

I will probably make the earth smaller (1unit=1kilometer) just for the main menu, then for in the game I can use a massive image plane with a pre-rendered picture of the earth(this should work since in the game you won't actually fly around the earth, it is just in the distance).

Thanks for the tips btw!

I like Wings 3D and GIMP. YAY.

Attachments

Login to view attachments
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 19th Jun 2011 15:11
It's a typical camera range near value problem: The farther you go from the object with the cam the higher the near value must be or close by polygons will clash together.
You must adjust the near camera value according to the distance from the planet.
At your planet scale it's not easy, because once you'll get a near camera value for smooth clouds, objects close to the camera will get chopped out.
It could probably be possible to achieve some results with the commands related to object zdepth and object zbias, but i'm not much acknowleged with those.
cheers
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Jun 2011 16:18
Had this problem too, the solution I believe is the command set object zdepth (is that the command I'm thinking of?)

TheComet

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 22nd Jun 2011 19:04
It could also be how you are making the cloud layer transparent.

Login to post a reply

Server time is: 2024-11-22 18:48:10
Your offset time is: 2024-11-22 18:48:10