Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,498 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bmap_to_cubemap glitch #269659
06/04/09 01:52
06/04/09 01:52
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Hey,
I am using cubemaps for shadow mapping. When I run my application in 1024x768 resolution, the cubemaps are not properly generated. They appear to be incorrectley connected at the top and bottom sides. The strange thing is that when I run my application in 1440x900 resolution, the problem is much less noticable (the seams are smaller apart). I confirmed this problem by downloading two other examples from the forums and testing it on my machine. Both have the problem as well.
The problem only occurs when rendering into the 6 sides of the cubemap (when loading a cubemap (skycube for example) the function is fine).

the red circle shows the problem - the projection from the cubemap is correct from the side segments but not from the bottom (and top which isn't shown)

-Mike-

Attached Files cube_error.jpg

http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: bmap_to_cubemap glitch [Re: Foxfire] #269705
06/04/09 09:05
06/04/09 09:05
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Maybe the cubes are not a power of 2? Check if they work when loaded as a sky cube and used with one of the mirror shaders. If they work there, then the problem is obviously not the cubemap.

Re: bmap_to_cubemap glitch [Re: jcl] #269788
06/04/09 16:04
06/04/09 16:04
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
The cubes are 512x512 (3072x512). When I change the shader to display the cubemap and instead of rendering into it I load a skycube (1024x1024) it works fine. Could the problem be rendering into the cubemap? I am using the size_x, size_y, pos_x correctley (they work at resolution of 1440x900 or higher) and I set up the 6 views' arc to 90 and their angles (pan) are correct. Also, I found one more problem - I cannot render into a cubemap with sides larger than 512x512. I can load cubemaps with 1024x1024 sides but I cannot render into them. thanks for your help and let me know if there is anything else you need to know.
-Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: bmap_to_cubemap glitch [Re: Foxfire] #269931
06/05/09 09:23
06/05/09 09:23
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You've described the problem quite clearly, but at least in the engine code I see nothing that could prevent you from rendering in a >512 cubemap.

Can you strip down your project so that nothing else happens but rendering into the cubemap and displaying the result? If the problem then still happens, please send it to Support. We'll look into this.

Re: bmap_to_cubemap glitch [Re: jcl] #279212
07/16/09 21:51
07/16/09 21:51
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
sorry for the long delay. I've been trying to fix this myself but I can't. here is a small demo showing the problem. The problem occurs with rendering into any size cubemap.

exe:
http://groundtacticsgame.com/cubemap_test.cd.zip
source:
http://groundtacticsgame.com/cubemap_test.c
(click save target as or the text will lose its formatting)


I appreciate you looking into this. Thank you very much - Mike -


Last edited by Foxfire; 07/16/09 21:53.

http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: bmap_to_cubemap glitch [Re: Foxfire] #279290
07/17/09 08:18
07/17/09 08:18
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok, we'll look into this.

Re: bmap_to_cubemap glitch [Re: jcl] #279996
07/20/09 13:04
07/20/09 13:04
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I notice the offset problem in your example, but it is hard to see - it has the size of about 1 pixel only. It disappears totally on higher shadow map resolutions like 1024x1024, so it looks very different than in your screenshot. It seems to be just an aliasing error.

I've also checked the code, but the cube maps are created correctly and the render offset is also correct - so I can't confirm any problem there.

You mentioned in the comment of your script that the problem disappears when you create the cube map with a DirectX function. But that had to be the same function that the engine uses. Can you also upload an example where the offset disappears, or send it to support at conitec.net? I'd like to compare both.

Re: bmap_to_cubemap glitch [Re: jcl] #281602
07/27/09 20:07
07/27/09 20:07
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
I have narrowed down the problem. The 1 pixel offset occurs in windowed or full-resolution modes only. On my 1440x900 monitor, in video mode 1024x768, the offset becomes extremely noticable like in my picture. Can you confrim this by changing the video res in the source and running? I don't think the problem is the cubemap function (as you said it is the same as the normal dx one) but rather with the viewport size variables or something related.
-mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1