ATMOsphere

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

ATMOsphere

Post by Pazystamo »

Hi, i am beginer with Irrlicht, and trying to create day/night loop with sky hemisphere (half sphere).Project for now is named "ATMOsphere" and it's my first work with Irrlicht. :) I choose this work as my term paper at university, so it must by finished until july. :) My main goals are:
create dynamicaly textured hemisphere with sky color which depend from sun position/day time(gradient colors from day time based palette). Also to set ambient acording to time(maybe dynamic light).Later (not on term paper) maybe add clouds layer, make sky color depend from year time (on winter darker,on sumer nice clear sky,random weather generator) and maybe add weather efects(rain,snow).

For now, in two days (i hate debuging) i made buildin hemisphere custom scene node and dynamicaly (refreshes on given time interval) generated sky texture from sky colors palette. This work slowly (i have full time job and studies) ,but will be finished,because i need my mark. :)

when i have something interesting to show i'll write here (after two weaks,now exams...).
I hope you will help me when i need :) Now i'm reading forums, manual and trying to make something...

EDIT:
HI,
I have some good and some bad news ;). Good is that i released source and demo. Bad - project is unfinished and almost without coments, also untidy code :oops: . I took academic holiday and don't have time and desire. But i plan to finish it next year, after my holiday. Now it is only with sun, no moon, but you can add moon formulas from here.
Also you can add light to sun position.
Download from site is closed, PM me and i will email you source.
Last edited by Pazystamo on Sun Jul 25, 2010 6:48 am, edited 4 times in total.
Guest

Post by Guest »

good luck. :wink:
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

This would be really cool!!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

we really need a good skydome, i've been thinking about making one for a while. are you aiming for accuracy or beauty (or both?)
sounds like a fun project! :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

yeah lookin forward to it...
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

bitplane wrote:we really need a good skydome, i've been thinking about making one for a while. are you aiming for accuracy or beauty (or both?)
sounds like a fun project! :)
Well, i'll try both :) Here is yesterday screenshoot (terrain from examples), no sun and lights.Only sky color. In program you need only 3 lines of code to get this (and no texture) :)
http://pazystamo.projektas.lt/test1.jpg
If you know where to find nice sky photo then write here. It will help alot, because i need to know how scanges sky color on diferent day/year/weather time.
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Here is yesterdays results (i had to prepare for todays exam,but work here because its more interesting :) ) :
1.I tested with hemisphere and cone and decided that cone is better.Hemishpere uses 16 segments and has 160 faces .Cone uses 64 segments and has 64 faces and look much better. Here is comparison: http://pazystamo.projektas.lt/cone.jpg
As you see with cone circle is smooth and with sphere its wavy due less subdivisions.

2.Tested stars with 512 and 1024 textures. 512 looks blured (stars are just noise). I know that not all video cards suports 1024 textures so i'm thinking to make cones quarters with 4 512*512 diferents textures.This is just for sky testing,for stars i plan to use separate rotating sphere.
http://pazystamo.projektas.lt/stars.jpg

3.Here is my draft with objects orders.
http://pazystamo.projektas.lt/draft.jpg
It can change during creation time,but for now its good for me. Sun and moon will be behind transparent clouds layer, stars sphere behind sky cone.At night sky cone has transparate texture with only hase in horizont. I decided to make realistic (on sumer sun is high,on winter low) sun/moon rotation,because its not very hard to implement. Texture maping for sky is circle (looking from top) and its easy to generate radial texture.

Thats all for now, next week i have 3 exams,sisters wedings and girlfriends mothers birthday so no time for coding :( If you have some good suggestions please say it :)
Last edited by Pazystamo on Mon Jan 16, 2006 5:53 pm, edited 1 time in total.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

nice research work!
i was thinking for the moon, you'll need a black circle that blocks out the stars drawn behind the sky, and a white alpha blend moon in front of the sky. otherwise either your moon isn't gonna glow, or your stars will shine through it.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
finger007

Post by finger007 »

Hi Pazystamo!

If you're still looking for sky-photos, try the following:

http://www.lfgrafix.com/grafix/SkyBasic-1.html

found it via

http://www.amazing3d.com/texfree.html

Good luck with your termpaper. I'm looking forward to see your results. Realistic skydomes would be wonderful!

Cheers,
finger007
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

well bitplain, i was thinking sun and moon make separate bilboard models alignet to camera. It would be moon with alpa blended glow. Glow color would be adjusted according to sky color behind moon and sun position behind earth, center would be changeble moon texture (fool moon/waning moon, also it depends from moon position). I searched encyclopedia and now have sun,eath moon rotation intervals and axis angle.Now some day i'll create formula to calculate sun /moon position.
Ok,now i'm going to work... :?
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Hi,
Today i searched for formulas to calculate sun position and found... It needs to calculate 11 formulas (mostly sin,cos) to get sun pos in world with given date, time and latitude,longitude (now you can set your home place in game :) ). 3 formulas to convert time to Julian Day Number (need in formulas) and 14 formulas if you want convert time back. I hope it won't take very long and won't be frame drop,because i'll need update pos only at set time intervals. So... now i hope some day i try to create demo to test sun movement.
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Finaly i made small sun movement demo! You can download it from here:
http://pazystamo.projektas.lt/
Its still buggy but you can see how sun moves in some place around Briusel(i test with its longitude) at 2004 april 1 on 12.00 (midday). Time in console is UT (universal time, known as Greenwich time), i still have problem with time,maybe i convert it wrong,because sun rizing at 13.00. I havent time for this now (tomorow exam), but after week i start work with it.
Data in console:
J - time in Julian calendar (one minute is 0.00070).
dJ - delta time (time from last sun movement)
x,y - sun pos in degrees.
dt-timer delta time.
next line is virtual time (Julian time converted to grigalian calendar(our time))
time is not working now how it shoud. In demo you need files from irrlicht media folder, copy detailmap3.jpg, terrain-heightmap.bmp and terrain-texture.jpg to demo folder. Also need Irrlicht.dll v14. I make small demo size,because my bandwidth are low...
There are 2 exe in zip,slow and fast demo. In slow sun moves every one virtual time minute.One minute takes 14 real time seconds, so day takes 5,6 hour in real time (i think its normal time for game), in fast demo i simply set faster update time and dont know how it takes for day.Sun just jump to new pos, so i plan to make interpolation between now pos for smoth movement.

sun is simply billboard with disabled z buffer, and it has dellay if you move camera( for now).Sky color is static, demo demonstrates only sun movement. Please write if it looks natural and how many fps you get (mine is 85-90 with gf5500 ,256ram,1000GHz).
Last edited by Pazystamo on Sun Apr 16, 2006 5:59 pm, edited 1 time in total.
Ronin
Posts: 116
Joined: Wed Mar 03, 2004 6:23 pm
Location: Germany

Post by Ronin »

I would love to see this in action, but unfortunately I get an "entry point not found in Irrlicht.dll" error. I copied the Irrlicht.dll from 0.14 in the same folder...
YASS - Yet Another Space Shooter - www.yass-engine.de
Snake
Posts: 9
Joined: Sun Jan 08, 2006 2:15 am

Post by Snake »

Ronin wrote:I would love to see this in action, but unfortunately I get an "entry point not found in Irrlicht.dll" error. I copied the Irrlicht.dll from 0.14 in the same folder...
I got the same problem, with both Irrlicht 0.12 and 0.14 dll's....
Pazystamo, do you use a modified version of the engine?
Your work seems very intresting, I'd like to see your achievments :)
La vita è una tempesta, prenderlo nel culo è un lampo!
Vox
Posts: 47
Joined: Fri Apr 01, 2005 5:25 pm

Post by Vox »

@Ronin - use gcc version

@Pazystamo

Could not load terrain, because file could not be opened.: terrain-heightmap.bmp
Post Reply