ATMOsphere

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

Post by Pazystamo »

I uploaded full demo (800 kb in .exe) HERE.
I use standart irrlicht engine v14 with Dev-C++ compiler(so Irrlicht.dll is from bin/Win32-gcc folder). For me it works fine. @Vox, maybe your .bmp file is corupted? Try new download and write comments :) (it's only small,unfinished feature).
I'm thinking to change sky texture generation, for real time,it's too slow so i'll try usin only small texture (64x8 or 64x2) it would be much more faster.I try to update (only set the same texture,not generate new 512x512) every one virtual minute,when sun moves and it's big frame drop,from ~95 to ~70.
Waiting for comments!
Last edited by Pazystamo on Sun Apr 16, 2006 6:01 pm, edited 1 time in total.
Ronin
Posts: 116
Joined: Wed Mar 03, 2004 6:23 pm
Location: Germany

Post by Ronin »

This looks very promising!

I will attentively watch for new updates... :)

230-290 fps

Athlon 3500+
1024 MB RAM
GeForce 6800 GT
YASS - Yet Another Space Shooter - www.yass-engine.de
boboS
Posts: 188
Joined: Tue Oct 18, 2005 6:36 pm
Location: Romania

Post by boboS »

Is this normal ? : http://www.emix.go.ro/sun.jpg
- the sun is verry buggy in the "slow examples", it moves at the same time with the player and is not in the sky (see the pic).

Btw my system

Duron 1400Mhz
768 Mb Ram
GeForceMX

64-70fps
As your ship is going down
ll stand by and watch you drown
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Yes Bobos, this is normal(i cant view image,cos your server blocks direcly links),i wrote in post,that sun is bilboard and demo shows only sun position. Later i create star scene node for sun and moon and position will be controled from my class,now its in main loop. When i finish,it wont be sun "jumping".Also now sun is painted last,so its on terrain.
Yesterday i tested new sky cone,now i can set how detail it should be (subdividion,triangle count) so for slower computers user can set less detail. Also i tested stars behind sky with transparency and it looks nice :) next weak i'll show new demo.
Now i have question,what structure is better? I started doing sky cone,strars(sun/moon),clouds and stars scene nodes and control them from class in same file. Or should i use one scene node (i dont think its posible to call create new node copy from itself) and only draw indexed triangles of all objects?
Guest

Post by Guest »

The shadow/light doesn't move on the terrain. The sun goes through the terrain. The sun becomes jerky when you move. Other than that the sun rotates fine.
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Anonymous wrote:The shadow/light doesn't move on the terrain. The sun goes through the terrain. The sun becomes jerky when you move. Other than that the sun rotates fine.
Shadow is static,paint on terrain,texture is from examples! Demo shows only sun movement. Sun goes on terrain,because its paint last with disabled z buffer. I already write this....
Yoann

Sun

Post by Yoann »

Hi !

How do you make sun's movement ? How do you make FlyCirles with an axis that you want ...

by default, the movement is around the axis Y .... and I want a movement around the axis X ....

Sorry for my English .... :-(

Thank you !

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

Post by Pazystamo »

Here it is Yoann:

Code: Select all

#include <math.h>
---------
double rad=0.017453292519943295769236907684886f;//degree to radian (PI/180);
double x,y,z;
//angle is in degrees
x=cos(xangle*rad)*distance;
y=sin(xangle*rad)*distance
z=sin(yangle*rad)*distance;
node->setPosition(core::vector3df(x,y,z));
x angle is rotation about x axis and y angle rotation about y axis(y to get left-right pos,x to get up-down pos). For more google "rotation about point"
pauly
Posts: 10
Joined: Wed Mar 23, 2005 11:29 am
Location: Belgium
Contact:

Post by pauly »

Would it be possible to draw the sun, moon and stars at infinit distance like the skycube allready implemented in irrlicht? Or does your code do that and I just didn't understand? :oops: Then it would be easyer to use it for huge levels. You also wouldn't need to calculate the positions. Only to rotations would be needed. The use of a layer system would be needed however. The A5, A6 engine uses this method. I hope I was a bit constructive.
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Yep Pauly, all ATMOsphere objects will be at infinit distance (dizabled z buffer) and i use layers to arrange them. Position still need to calculate or else it rotates only on 0,0,0 position.

I finished my exams so now i'm starting to work :) Currently experimenting with textures sizes and UWV maping. I need to find way that texture would be small,good looking and mach natural sky color layout.
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Need help.... I get some memory leaks when generating texture. I set one color for all texture, but on top there are random pixels... all pixels array is the same, so problem is in creating texture and it runs only small textures like 16*32, but 64*64 crashes... Here is some code:

Code: Select all

---------
pixels = new PIXEL[k];//create array
//--------fill pixels
col3=SColor(255,100,100,255);
  for (s32 i=0;i<k;i++){
      pixels[i].A=col3.getAlpha();
      pixels[i].R=col3.getRed();
      pixels[i].G=col3.getGreen();
      pixels[i].B=col3.getBlue();
      }
image=driver->createImageFromData(video::ECF_A8R8G8B8, core::dimension2d<s32>(Psizex,Psizey), &pixels,true);
dangus=driver->addTexture("dangus", image);
Texture 32*64:
http://www.pazystamo.projektas.lt/badtexture.JPG

What is wrong? Thanks for help...
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

Well, i found problem :)
image=driver->createImageFromData(video::ECF_A8R8G8B8, core::dimension2d<s32>(Psizex,Psizey), &pixels,true);
Just delete this and it works... So much time wasted for one char :wink:
I have litle progress, and some bugs. I manage to generate interpolated texture.
Texture
It reads texture from file and interpolates between its pixels to mach new texture size. Still some bugs with diferent texture sizes... On generated texture it makes vertikal bars,every bar is sky color at some time,texture generation is slow so i will update only sky cone uv. So i can generate texture for lets say 2 hours and then update only uv. In image white dots is pixels from file, it's 4*4 texture,but uses only 2*4 for this texture. I dont know why,but on right (where i dont generate texture) it looks like part of font texture,maybe it creates array in memory where it was font?
My project in forum- ATMOsphere - new dynamic sky dome for Irrlicht
Pazystamo
Posts: 115
Joined: Sat Dec 03, 2005 5:56 pm
Location: Lithuania
Contact:

Post by Pazystamo »

I uploaded small demo (637.kb) showing dynamic sky. For now it just changes uv coordinates.Stars behind sky is simple skycube. It dont look very good, on texture is visible steps between pixels and i dont know how to get rid of them...
Does this quality is acceptable (not for me :( )? I tried different filters,but it wont help.
Last edited by Pazystamo on Sun Apr 16, 2006 6:02 pm, edited 1 time in total.
My project in forum- ATMOsphere - new dynamic sky dome for Irrlicht
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

Wow that's pretty darn cool. I can see what you mean by the visible steps, but I'm not sure if that's just image quality that needs adjusting. Overall looks very nice.
Saku
Posts: 158
Joined: Wed Jan 05, 2005 8:48 am
Location: Denmark

Post by Saku »

I totally agree with RabidLockerGnome! This is really cool!
Keep up the good work.
Call me Wice, Miami Wice!
Post Reply