Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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  
  Realtime 3D sky generation (Online Applet)  (Read 2819 times)
0 Members and 1 Guest are viewing this topic.
Offline DzzD
« Posted 2011-02-11 19:34:17 »

here is a WIP I am working on (with a trainee) to generate sky appearance in real time that we will soon use in our game.

note that it is still a WIP : some problems still appears in rendering and it is not yet fully optimized.

for each frame the Applet generate the five skybox texture, apply them to a skybox & render the frame


http://demo.dzzd.net/Sky/


What you cannot see online :

The current version enable to set a location on earth and a date to generate  the sky with the correct sun location ( it should also soon put the correct clouds coverage of the selected area)

It can also generate the sky reflection map texture ( the one you may apply on reflective object : chrome/sea/etc...)

Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #1 - Posted 2011-02-11 20:41:06 »

I kept adding more clouds and got:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
Exception in thread "AWT-EventQueue-2" java.lang.ArrayIndexOutOfBoundsException: 257
   at SkyFactory.cloud(SkyFactory.java:324)
   at SkyFactory.clouds(SkyFactory.java:293)
   at SkyFactory.color(SkyFactory.java:242)
   at SkyFactory.updateTextureSides(SkyFactory.java:352)
   at SkyFactory.update(SkyFactory.java:539)
   at Sky.updateWorld(Sky.java:128)
   at Sky.keyPressed(Sky.java:268)
   at java.awt.Component.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-2" java.lang.ArrayIndexOutOfBoundsException: 260
   at SkyFactory.cloud(SkyFactory.java:324)
   at SkyFactory.clouds(SkyFactory.java:293)
   at SkyFactory.color(SkyFactory.java:242)
   at SkyFactory.updateTextureSides(SkyFactory.java:352)
   at SkyFactory.update(SkyFactory.java:539)
   at Sky.updateWorld(Sky.java:128)
   at Sky.keyPressed(Sky.java:268)
   at java.awt.Component.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-2" java.lang.ArrayIndexOutOfBoundsException: 270
   at SkyFactory.cloud(SkyFactory.java:324)
   at SkyFactory.clouds(SkyFactory.java:293)
   at SkyFactory.color(SkyFactory.java:242)
   at SkyFactory.updateTextureSides(SkyFactory.java:352)
   at SkyFactory.update(SkyFactory.java:539)
   at Sky.updateWorld(Sky.java:128)
   at Sky.keyPressed(Sky.java:268)
   at java.awt.Component.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "Thread-12" java.lang.ArrayIndexOutOfBoundsException: 270
   at SkyFactory.cloud(SkyFactory.java:324)
   at SkyFactory.clouds(SkyFactory.java:293)
   at SkyFactory.color(SkyFactory.java:242)
   at SkyFactory.updateTextureSides(SkyFactory.java:352)
   at SkyFactory.update(SkyFactory.java:539)
   at Sky.updateWorld(Sky.java:128)
   at Sky.run(Sky.java:157)
   at java.lang.Thread.run(Unknown Source)
Exception in thread "AWT-EventQueue-2" java.lang.ArrayIndexOutOfBoundsException: 259
   at SkyFactory.cloud(SkyFactory.java:324)
   at SkyFactory.clouds(SkyFactory.java:293)
   at SkyFactory.color(SkyFactory.java:242)
   at SkyFactory.updateTextureSides(SkyFactory.java:352)
   at SkyFactory.update(SkyFactory.java:539)
   at Sky.updateWorld(Sky.java:128)
   at Sky.keyPressed(Sky.java:268)
   at java.awt.Component.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(Unknown Source)
   at java.awt.Container.dispatchEventImpl(Unknown Source)
   at java.awt.Component.dispatchEvent(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline DzzD
« Reply #2 - Posted 2011-02-11 20:45:08 »

this is a bug, something that it is not handled ( heu.. do I mention that I was working with a trainee :p ?  you may also notice that the applet is continuously requesting focus )

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

Senior Member


Medals: 3
Projects: 1


Java games rock!


« Reply #3 - Posted 2011-02-11 20:55:13 »

A few glitches in the sky, but still, awesome!
Offline DzzD
« Reply #4 - Posted 2011-02-11 21:05:23 »

A few glitches in the sky, but still, awesome!

theire are still two visibles bugs :
 - mapping on the skybox is not perfect (you can see skybox edge sometimes)
 - some artefact (strange points) appears on clouds  when generating them (I suppose this is because rendering appear while clouds are generated)

Offline Mike

JGO Ninja


Medals: 71
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #5 - Posted 2011-02-11 21:05:56 »

Really nicely done (except for the glitch and out of bounds Smiley)

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline DzzD
« Reply #6 - Posted 2011-04-06 19:01:11 »

we've gone further with this project :
 - moon added with real appearance ( phase & path ) based on location & time
 - sea also added

everything is dynamic : cloud cover, sun, moon, sea wave ( and can be rendered in realtime with 3DzzD in software mode )




(online demo ASAP)

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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

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

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

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

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

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
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!