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.

Dark GDK / skybox and lighting I need some Ideas?

Author
Message
Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 10th Mar 2008 06:54
Ok I have my game moving along very nicely I have explosions of ships when they get hit by the bullets. I have some OK models for a beta but I am running Into an Issue. I cant seem to get my lighting right. First off my game takes place in space, Kinda a fps of a ship you control the ship. but I cant seem to get two things working either I am not thinking through the map area.


a Little Background: the game is Multi-Player. A server and right now drone ships that move in various orbits. they will be replaced later with some ai I have been working on, as well as other players but for testing I have chosen to make virtual players that simply move in circles. but the problem I am running into is I cant seem to get a skybox to look right for space. I have used some premade ones and made my own but as I move around I tend to very quickly get ouside that space and that is the problem I dont want to limit the players to too small a space. But when I put in a sky box it seems I can either center it constantly on the players position but then it doesnt look like I am moving any where orhter than spining. and if i make many ghosted skyboxes increasing in scale it kills performance greatly. I.e. Goting from 100 fps to 15 fps. and any sound skips and lags baddly. The game other than this element is coming along nicely. but I need some ideas here I am going nuts on this one.

also I am not using the built in multiplayer api i found it was much easier and better performance wise with .net to create my own tcp server and client comunications nto that that has to do with this problem but any one needing help on that area I have some ideas that can help there. also I am having lighting issues. I cant seem to get light to work on my object the way I wanr them too and I think part of it is the skybox issue. I am very open to ideas on how to accompish this task.

Thanks,
Terry
Fusspawn
16
Years of Service
User Offline
Joined: 19th Feb 2008
Location:
Posted: 10th Mar 2008 14:38
Scaling the skybox causes massive lag O.o

Ive not noticed that one yet ive had a few other weird things lag out for no reason, Maby take another look at the code usedto scale it, there's no way scaling it should cause that much of an fps drop, its teh same model / texture so processing it should take the same amount of power id assume ;/

as for sound ive only had a chance to use it as a looping background track, it only dropped my fps by 1, that also had a scaling skybox.

Im sorry i cant be of more help, But its worth poking around with it somemore i guess.

Stuck in the land of the confused! and loving it!
Tiomun
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 10th Mar 2008 15:20 Edited at: 10th Mar 2008 15:22
i had this idea when i was making a flight sim have the skybox move with the player it worked in the flight sim bit since there was terrain it didnt look so good.

other thing is you may be thinking that your program lags when you make it bit. but make sure you have your camera set up corectly.

dbSetCameraRange ( 1.0f, 240000.0f ); if the number is at 30000 like db sets it normaly when you make the sky box larger youl get blue areas when it is out of range and some funky lag from it leaving view.
especialy if its on an older comp like mine
Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 10th Mar 2008 15:48
Im at work now but when I get home tonight I will check it out I also had an idea about something I forgot to do on my skyboxes. I forgot to do a disablezwrite. I didnt exactly have one scaled skybox I had about 500. way to many i know but what i did is create iinstances of the first one it was transperant then scaled out each one by a factor of 1000. so that certainaly would explain my perforamance issue. I am thinking if I cut back down to 10 of them i might beable to get the same effect and using the disable z write I could get it to work right. It is amazing how the order you do things in makes such a big difference.

Thanks again

Any Ideas from anyone of good space background control is appriciated. I am at a point where I need to really start looking at how the graphics are going to be handeled. Models can be replaced but if the map and scene control methods are effected by how they are done I cant program much more on my game with out a good idea of how they shuld be done. and If any one can tell me if I am way off in my method maybe there is a better way.

Thanks,
Terry
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Mar 2008 19:57
Take a look at my network testing demo. (click on my signature banner)

Try out the client and let me know if that's the effect you are looking for. If it is I can give you a few tips on how I did it. I'm curious to know what you get for a framerate too.


It's a big universe, and they are out there somewhere.
Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 12th Mar 2008 03:27 Edited at: 12th Mar 2008 04:10
that is exactly what I am looking to have.
Also my frame rate I get with a simple skybox that i seem to keep going outside of because it is way too small is aroung 300 on my laptop with an nvidia go 7600 on windows vista ultimate with 2gb ram and a centrino duo.

Thanks,
Terry
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Mar 2008 05:03 Edited at: 12th Mar 2008 05:03
@Tiomun -
Quote: "i had this idea when i was making a flight sim have the skybox move with the player it worked in the flight sim bit since there was terrain it didnt look so good."


Try a Sky Dome, half of one (top half), scale it so the edges are just out of range... turn on fog...



Attachments

Login to view attachments
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 12th Mar 2008 18:07
@Epiphany,

I hope the email I sent last night helped. I'm posting it here as well to help others.


The basics of the code in the Worlds Apart Online network stress test demo are as follows. A decent frame rate is achieved with large expanses visible, and a total of 10 planets all within view. Camera range is set to 500,000.

To start, I use a skysphere. The size is -150,000. I believe that's the radius. It's a negative size so that it builds the sphere inside out. This is done so when you texture it, the texture shows on the inside. The skysphere is textured with a 4096 x 2048 PNG file I made using the Airbrush tool in Paint Shop Pro. Just spray white all over the place, then spray over that with black until you get a good even look.

The planets are a simple sphere model. Nothing to fancy. You could make one with any modeling package in about 30 seconds. They are textured with images I got from a site that was offering spherical textures of the planets of our solar system for free. Most of the textures are 1024 x 512.

The ship is a .x model that I picked up from TurboSquid.com. I was able to load it into GameSpace and reduce it's polycount without destroying it's smoothness or texture.

That's pretty much it. Ironically the slowest thing in the demo is the 2D reticles that are used as sprites.

axiagame
16
Years of Service
User Offline
Joined: 6th Dec 2007
Location: far far away...
Posted: 12th Mar 2008 18:28
I am not sure to be in the subject since I don't understand all here (cause I am french :S), but if I understand well you want to make a skybox so you have the feeling your ship is moving right?

you should make some particles randomly placed on the scene so when you move your ship you see them passing near you and have the feeling you are moving (just have a look on screens of space opera games). Or you can also draw randon lines, but the effect is not quite good... :S

hope I was helpful and I didn't mistake in the subject
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Mar 2008 18:37
You did fine axiagame. And I just tried the KISTech Demo. It could use some "visual references" like you describe.

Maybe an option to turn them on or off as in SPACE there isn't much of that unless you're in an asteroid field or near space debris from an explosion or whatever.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 12th Mar 2008 19:07
I've been thinking about such things, but that's more along the lines of the window dressing stage, and I'm trying to focus on basic game play and AI before I start making it pretty.

Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 12th Mar 2008 20:14
I have tried the particle method and when I do that it really kills the fps I mean badly. I went from around 60 fps on my game since I am using self made modles with wayto many poly's to less than 0 fps it was a complete bust with that method

The negative scale is a cool idea I hadnt tried that. I now have the skysphere I want to use working but now to figure out if a player is hitting it. I dont want to actualy move the sphere I want the user to have the feel that they are moving that is one thing i didnt want to do with mine that I noticed yours did. But I also have more of a first person view with the camara. Except my model is off set lower so i am on top of the ship link in the bridge of it and i see a ghosted hull of the ship it is quite nice for that. I am now trying to restrict the user to the inside of the sphere. since it is space it is quite eazy to quickly get out side it's bounds.

Thanks,
Terry
Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 12th Mar 2008 20:16
Quote: "Try a Sky Dome, half of one (top half), scale it so the edges are just out of range... turn on fog..."

I would do this except I am in a space ship no Land/terrain

Thanks,
Terry
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 12th Mar 2008 22:11
What are you planning to have happen when they leave the current solar system? or is the entire game based in this one system?

Probably the simplest solution, and the one I'll be using most likely, is that we know the size of the skysphere. If we've centered it's origin at 0,0,0 then we can measure the distance from 0,0,0 to our ship.

Set up your program to display your current distance from 0,0,0. Then fly the ship out to the sphere, and then back away until the texture still looks good. (if you get to close it starts to look blocky) Write that down as your outer distance marker. Now in your game you can trigger whatever event you would like to happen once the player reaches that distance so they never get to see outside the sphere.

What I'll be doing is loading the next level in that direction. So if you are flying along and you go outside the solar system you'll trigger a load of the next zone, which in my case is a zone of empty space between that solar system and the next.

axiagame
16
Years of Service
User Offline
Joined: 6th Dec 2007
Location: far far away...
Posted: 13th Mar 2008 02:09 Edited at: 13th Mar 2008 02:15
just create a few particles, and replace them continuously in order they are visible. (you will need something about 30 of them). To gain FPS, you should use the point sprite method (there is a thread about it, but I don't remember the address)

EDIT:

oh! and for your limit problem, there is a solution
if you don't have any other system, make as star wars game (rebel strike II). When your ship gets out, the camera goes out of the ship and you see the ship making a half-turn, then the player retakes control of it and the camera returns in the cockpit
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Mar 2008 02:34
Oooohhh... I Like that idea (in Axiagame's edit!).

I recall a Point Sprite Demo from Visigoth, and possibly DarkCoder Released one as well. (Maybe the names would help a search) Has something to do with single verts, and a shader that "Draws the Sprites" where the lone verts are or something to that effect...Effect... I made a funny

Gervais
20
Years of Service
User Offline
Joined: 11th Mar 2004
Location: Canada
Posted: 13th Mar 2008 03:07
One other thing you may consider is to use a cube to replace the sphere it use only a fiew poligon and will give a similar effect
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 13th Mar 2008 17:27
Skyboxes can work, but sometimes they can be difficult. The advantage of a sphere is it gives that more rounded planet atmosphere type feeling. If you aren't careful with a skybox it's easy to spot the corners and it can throw off the whole scene.

A skybox might be easier to deal with in space though, but I've still had problems with the corners.

axiagame
16
Years of Service
User Offline
Joined: 6th Dec 2007
Location: far far away...
Posted: 13th Mar 2008 18:44
I do agree with KISTech, a sphere is better than a box for this kind of game.

For the limit problem, another solution is to tell the player he/her will be considerated as a deserter and destroyed if he/she doesn't half-turn. Some games do as this, but I don't really like this kind of solution.

@jason p sage => thank you ^^
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Mar 2008 22:17 Edited at: 13th Mar 2008 22:18
Hi guys - Um... Yeah I think SPHERE's are way better, all the time, hands down.... HOWEVER.... There isn't enough GOOD MEDIA and I don't know of any Cool tool that can Fish Eye a texture etc. (Example - take a sunset and wrap it into a decent UV texture so you can DOME it.

I mean, how do you draw a horizontal cloud line (like a jet trail) on a SkyDome? You Don't to my knowledge. Correct me if you have a way!

Because of this I think there is NO SHAME in SkyBoxes - AT ALL! But the cam range is ALL you got... EXCEPT ONE TRICK!!!

If you load your SKYBOX DEAD LAST before the game plays, and Set ZREAD TO FALSE, Maybe ZWRITE I forget.... But (DEAD LAST THING YOU LOAD makes the difference for success or failure) You can SHRINK Your skybox ALOT (so within Cam Range) and everything in your scene with have priority over it... so even if its SMALL and your camera is in it, you're good. (Dead first is the other extreme) but I think DEAD LAST is the winner as that item gets drawn first I'm pretty sure. [edit]when z flag involved... Otherwise it draws back to front[/edit]

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Mar 2008 00:48
Hmm....

Texture a plain with a white smoke texture and proper transparency. Make the plain 1000 x 50 so it's big enough to see from a distance. Probably have to try a few size changes to get it right.

Position it just inside the skysphere and have it "orbit" the terrain surface in a slight arc maybe 500 units above the terrain at it's apex, and 300 units at the ends. Should make for a fairly good looking jet trail.

Better yet, make about 3 of them, and extend each out in front of the other, and fade the last one to disappear before it's moved back up to the front at full visibility.



jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Mar 2008 01:21
Dude, you're cool as hell! thats a cool idea.

I was referring to how does one paint on the texture though - in my claim that media for skypheres is harder to get ...for sky anyway - I think ...was it you? Who ever it was - soemthing about painting everything white and various colors or whatever and paiting the "black" over it reminded me of something I did as a kid. colored waxed poster board painted black, and we would scratch pictures into it (scrap black off) and the rainbow color would shine through brightly. Genius.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Mar 2008 02:21
Yeah, that was me.

The star texture for my space skysphere is a 4096 x 2048 PNG made with Paint Shop Pro. I use the airbrush tool and spray the whole thing with a good even coat of white. Then go back over it with black until you get a nice even random spread.

You end up with everything from bright multi-pixel white stars to dull single pixel dark grey stars. It seems to turn out pretty good.

Anyway, I'm hoping I'll be able to do the jet trail thing to make a dynamic multi-layer cloud engine. Depending on the impact on frame rate I might use 2 or 3 plains with a cloud texture and then stack them about 100-200 units apart and slowly move them in the same direction at slightly different speeds.

Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 14th Mar 2008 05:29
I am considering a cube the math to determine distance from center is much easier and doing so without an arc. I can say ok distance from 0,0,0 is greater jsut dont let the uer move by keep track of the last position and then setting the uer back ther if they excede the game play area. Basicly I can accomplish this but I gotta do some calculations on on how far out I want to do this. I like your Idea KISTEch about text of position and then moving around and writing down the best space away. from the sky(Object) Cube in this case. I think I have an Idea that might also create some cool effects much like the plain Idea for the jet streams. BUt in space we have things like nebulas. so by using the clouds filter in PS(Photo Shop) I can create blue/Purple Effects and use a black background and a plain I can create some cool effects. The problem is in a multi player situation that all has to be done client side and keeping it so all players see the same things is goign to be an intersting task.

I apriciate all the Ideas. I am kinda Interested in what others are doing for models are they makign there own or working with others or have foudn good ones for sales on the web Unfortuniatly I have foudn some great models on the web but unfortuniatly There are not at all in a format I can convert using the modeler tool I have to a .x or 3ds file. arg. I wish I could make the models I want with out having 4billion verts and polys. arg.

Thanks,
Terry
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Mar 2008 05:31
Milkshape has a poly reducer, there is a opensource one I heard about but I don't recall name - and there is a poly reducer they sell here too... Would that help the model dilema? Personally, I'm no modeller but I'll have to learn - and I for now anyways - buy DarkMatter.

Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 14th Mar 2008 05:36
I have thought about using a poly reducer but I am afrad I will be unhapy with my models and want to change them as development goes on and makes a mess of my models. ah it is a recursive problem.

Thanks,
Terry
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Mar 2008 05:41
Grrrr - that's no excuse! Back up the originals. Keep a Copy you call MASTER - Edit that, modify that, then reduce (or use a dummy model) to see how frame rates are with lower poly version.

It really doesn't MATTER except until you near release day... that's when you want to get it perfect

----STACK OVERFLOW: ERROR [283a:6574] - System Exception Error



Epipfany Game Studios
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location:
Posted: 14th Mar 2008 05:42
Oh I know

Thanks,
Terry
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Mar 2008 05:55
There are a few places you can get some half way decent stuff to mess around with. I've managed to get quite a few things from TurboSquid.com for free, and there's quite a few other places. Granted you get what you pay for in most cases, but some of them are good enough to start with.

Dress up the free ones, make them look good enough, then when you make a little money from the game buy some better ones and send out an update to the game.

axiagame
16
Years of Service
User Offline
Joined: 6th Dec 2007
Location: far far away...
Posted: 14th Mar 2008 16:57
@jason p sage=> I use texture maker to make my textures appliable to spheres... the only bad thing is that this soft is not free... :S
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Mar 2008 20:36
I have it.... I didn't know it had something for SPHERE textures...hmmm.... thanx for the tip.

axiagame
16
Years of Service
User Offline
Joined: 6th Dec 2007
Location: far far away...
Posted: 15th Mar 2008 13:22
just do translate => spherical map once
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
axiagame
16
Years of Service
User Offline
Joined: 6th Dec 2007
Location: far far away...
Posted: 17th Mar 2008 10:35
no problem jason
JulesD
19
Years of Service
User Offline
Joined: 7th Feb 2005
Location:
Posted: 18th Mar 2008 00:49 Edited at: 22nd Mar 2008 07:58
Here is something I'm working on, realistic sky textures on seamless sphere objects.

There is not much of a difference in image quality when comparing high poly sphere and low polysphere, although the images are 4096x4096.

This is not a realtime sky,it is simply textured.

Click on images for bigger view.





Check in work in progress forum.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 18th Mar 2008 01:19
Those are nice shots.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA

Login to post a reply

Server time is: 2024-11-20 05:25:40
Your offset time is: 2024-11-20 05:25:40