Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  What is the best method for a background ?  (Read 1320 times)
0 Members and 1 Guest are viewing this topic.
Offline zingbat

Senior Member




Java games rock!


« Posted 2004-01-10 15:39:16 »

I need some advise in this area. I can create a background for a 3d world that looks very nice with a sphere wrapped with background picture. The texture only has to tile on the horizontal and after applying a photoshop filter that does a distortion for polar coordinates it works pretty well.

However I dont know the advantages of other methods. I know that a cube can  be used instead with 6 tiling pictures but do we have to apply any distortion filter to the textures to make them look seamless not like a  cube ?

What about if we use a cylinder for the background 3d object ? What are the advantages ?

Another thing im trying to simulate a day/night cycle like in Morrowind, with the sun moving in the sky and the sky fading into a star field. Any sugestion on how to do this ?

Offline Breakfast

Senior Member




for great justice!


« Reply #1 - Posted 2004-01-10 19:30:14 »

I have been giving this some thought myself - I'm afraid I can't be a world of help with the skybox thing, I have usually used a sphere for this, but on the weather pattern thing I have tried to think through a route to having it work.

I think the best way is to use a Texture-By-Reference to map the skybox and use Java2D to generate the actual image. Now I think about it, it may be a lot easier to do this using a square skybox because otherwise you need to sort out sphere mapping as well as any changes to the image itself.  

I would suggest using a standard day/night pattern with straight blue-sky through to starry night and then overlaying a plasma cloud pattern over it. It may even be smart to alphablend the layer and place it on another shape inside the skybox to create some degree of parallax, but it may be as effective and more efficient to merge the two layers into a single image.

If you're not too up on them, plasma patterns are often used in fractal terrain generation - there is a good tutorial page here.
Offline zingbat

Senior Member




Java games rock!


« Reply #2 - Posted 2004-01-11 16:11:52 »

Thanks for your help. I use real images for the sky but its neccessary to equalize the bright in photoshop for those pictures before using them otherwise it gets hugly.

I have a problem with making a background using a cube and 6 textures. The problem is that it looks like a cube. Specially in the corners. Maybe I have to do something to the textures or the cube before rendering the background geometry. Any help would be apreceated.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline tom
« Reply #3 - Posted 2004-01-11 17:27:16 »

The skybox will look ugly unless the textures are made properly. This is done by setting up 6 cameras in a modelling progam, where the lenses makes up a unit cube. I found some skybox textures here:
http://www.geocities.com/-harlequin-/quake/

NB! the pk3 file inside the zip is actually a zip. Rename it and unzip it.

Offline zingbat

Senior Member




Java games rock!


« Reply #4 - Posted 2004-01-13 21:29:45 »

That sky box page was quite useful. Thanks a lot.

How exactly do you set up the 6 cameras to make a unit cube ? And how do you use the raw images in there ?

I supose you use each of the 6 cameras to take a snapshot image, distorced by those cameras, that will will render nicely in the skybox.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #5 - Posted 2004-01-13 22:13:56 »

Terragen can be used to make nice skyboxes if thats the style you're after. The only thing you need to remember is to set the field of view to 90 deg and generate square images for each direction. The perpective warping will be correct when applied to a skybox then.

Terragen gives you a whole bunch of rendering options as well, and I seem to remember one being to render without the sky, so you could keep it separate to make it change in game Smiley

Btw, Serious Sam used Terragen to create its skyboxes.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline zingbat

Senior Member




Java games rock!


« Reply #6 - Posted 2004-01-14 20:53:11 »

Yes, i made a google search a while ago and it come up with terragen. It looks a good program. It also gave me a lot of serious sam howto pages for skyboxes. I have to look at this program more carefully. Thanks.

Im also trying to determine the type of distortion op used in the raw texture images before using them on a cubic skybox. I think its some sort of equation using sin and cos that makes each texture shrink at the center. Then maybe i can use the advanced imaging api to work on the images without need to use extra programs.
Offline tom
« Reply #7 - Posted 2004-01-14 21:34:12 »

how does your raw textures look like?

It's difficult to create a skybox from just any odd image. If you wan't good result you'll have to render  the skybox textures.

Offline zingbat

Senior Member




Java games rock!


« Reply #8 - Posted 2004-01-14 21:44:06 »

I was thinking of geting some real images of backgrounds from the internet or take some real photos with a digital camera and make them tile with each other using photoshop stamp tool. However if i just use them like that it just looks like i am inside a big cube.
Offline tom
« Reply #9 - Posted 2004-01-14 22:03:34 »

Then I think you're better off using a cylinder, sphere or some other object. However, if you manage to create a background object that looks good with your raw texture mapped to it, then it is possible to convert that to a skybox.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Breakfast

Senior Member




for great justice!


« Reply #10 - Posted 2004-01-15 08:20:47 »

If you want that morrowind weather conditions type sky you are definitely going to be better off having a plain coloured sky with the sun in it and then generating the clouds on the fly rather than using photos.
Offline zingbat

Senior Member




Java games rock!


« Reply #11 - Posted 2004-01-15 20:44:20 »

I saw the sky images generated by terragen and they are very realistic. Its not such an hard work applying the math to do the clouds. It could even be done in a background thread that updates the sky every second without delaying a game too much.

Im almost shure Morrowind uses pre-rendered sky images and color palette animations. Morrowind only renders the sky part of the background not the sides. This is because of the cell loading system they used to make a continous world, so its not difficult for them. Daggerfall the previous game used to render both the sky and the sides of the background with mountains and stuff as well as using a similar cell loading system.

Using internet background photos with skyboxes probably requires a little tweeking  with photoshop but im shure with the right filters it can be done easly.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (26 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (20 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (56 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!