ATMOsphere
ATMOsphere
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 . 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.
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 . 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.
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)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!
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.
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
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.
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
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
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...
Ok,now i'm going to work...
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.
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.
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).
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.
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
I got the same problem, with both Irrlicht 0.12 and 0.14 dll's....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...
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!