skydome texture size

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
eric
Posts: 17
Joined: Thu Mar 08, 2007 7:26 am
Location: Berlin, GY

skydome texture size

Post by eric »

Yes, you can tell, I'm into skies these days.

so here is my next question: are there any limitations as far as the texture size for skydome mapping is concerned ? all of my terragen panoramapics work fine, as long as they do not exceed the x-size of 2048 px. a panorama set up like 3840x960 (still power of 4) does not work. it only results in a white texture wrap. all efforts to go beyond the magic 2048 pixels (increased step by step, always considering power of 4) result in a white screen.

What am I doing wrong ... any suggestions. help would be appreciated.

Ok. I guess it must be a limitation given with the OPENGL driver, because if used with DirectX the pano works fine. Am I right ? Or am I still doing something wrong ?

regards eric. GY
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Probably your gfc card does not support more. This limitations would have to be handled internally in Irrlicht, but that's quite a bunch of work. It might be easier to write your own skydome which takes more than one texture and places them accordingly.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Most graphics cards do not support textures larger than 2048x2048. That is pretty normal.

Travis
eric
Posts: 17
Joined: Thu Mar 08, 2007 7:26 am
Location: Berlin, GY

Post by eric »

hybrid, vitek. thank you both for the response. But it does not really explain why a skydome texture bigger than 2048 (I use 3840) is rendered, when using the DIRECTX driver. Hence, I assume it must be the OPENGL driver coming with my ATI card. By the way, this would not be the first bug in these drivers. I have suffered long time from the color banding problem, in 32bit-mode using Irrlicht. At least that can be completely and kind of easily be solved by putting a decent noise filter on the texture tiles ...
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

If you've installed the DX SDK there is a tool called DXCapsViewer. You can also get it here. It will show the maximum texture height and width that your card is supposed to support. [DirectX Graphics Adapters | <Adapter> | D3D Device Types | HAL | Caps | MaxTextureWidth].

If you create a cube scene node and apply a big texture to it, how big can it get before it fails? On DirectX? OpenGL? Acording to the caps, my card supports up to 4096x4096. I cannot texture a cube with a 1x4097 texture with the OpenGL driver...
ATI MOBILITY FireGL V5250 Pentium 4 (SSE2): ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GL_INVALID_VALUE
Could not glTexImage2D
Loaded texture: ../../media/1x4097.jpg
I am able to load the 1x4097.jpg using the D3D8 driver. I can load all the way up to 1x8193, at which point the D3D8 driver fails to load the image...
ATI MOBILITY FireGL V5250 ati2dvag.dll 6.14.10.6635
Could not create DIRECT3D8 Texture.
Loaded texture: ../../media/1x8193.jpg
The bottom line is that if the driver can't load the texture, it can't load the texture. You will get an error message on the console indicating the failure. If you care to debug it, you just need to find the line in the texture loading code that logs the message and start stepping though code.

I've never dealt with terragen panoramapics, but it would make sense for the images to be 3840x960 if the image could be cut into 4 panels of 960x960. If that is the case you should be splitting the images up before you create textures for them.

Also, neither 3840 nor 960 is a power of 4. They are multiples of 4, and that is not the same. If you define power as a function, it is something like this...

F(N,0) = 1; // N to the 0th power is 1
F(N,1) = F(N,0)*N; // N to the 1st power is N times the previous result
F(N,2) = F(N,1)*N; // N to the 2nd power is N times the previous result

If N is 4, then the sequence goes something like this...

1, 4, 16, 64, 256, 1024, 4096, 16384, ...

Travis
eric
Posts: 17
Joined: Thu Mar 08, 2007 7:26 am
Location: Berlin, GY

Post by eric »

Thank you again. Very valid points, I will take that into consideration. I also downloaded the tool and that was really helpful

regards eric,GY
Post Reply