Skip to main content
GameDev.net gamedev.net
🔒 Locked

How exactly to render a skybox using cube map??

Started by shiqiu1105 Jul 31, 2010 at 7:53 AM 4 replies 4.3k views
Original Post
shiqiu1105
shiqiu1105
I've read so many tutorial, all of which show how to dymaically render to a cube map.
And another sample from the SDK uses cube map through shader, which I've no idea how to implement...The HDRFormat sample, I dont know if anyone understand the code in it.

Anyway, none of the tutorial I've read teaches how to specifically create a cube texture and then fill each slice of it one by one...


Is there any basic tutorials for beginners?
like the basic implementation of Enviornment Mapping, Shadow Map/Volume, Relief Mapping, and SSAO something like that?
Buckeye
Buckeye
Googling for "directx skybox cube map" results in over 19,000 hits. The very first hit when I tried that was this article which goes through the process step-by-step.

Google is your friend. [wink]
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.
Buckeye
Buckeye
@OP: Just for fun and to confirm the procedure, I created 6 textures*, followed the method described in the article I linked above to create a cube texture, and to load each face of the cube texture with the textures I created. NOTE: The fellow that wrote the article, unfortunately, was unaware that right-hand coordinate systems are different than left-hand coordinate systems, so you can ignore his comments about "facing +Z is really facing +Y."

I saved the cube texture, once each face was filled, as "skybox.dds".

I then used skybox.fx and the rendering method in skybox.cpp from the SDK which is very straight-forward.

Everything worked first time.

Go for it. [smile]

*Each texture 64x64, white background with centered text such as "POSX," "NEGZ," etc., to demonstrate that the correct texture was rendered when facing in the said directions.
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.
fkhan
fkhan
To create cubemaps use AMDs cubemapgen tool. It can assign a texture to a cube face one at a time even allows to load a cubemap from a cube cross. A cube cross is a texture which has all 6 faces of the cube.
asm0day
asm0day

I've read so many tutorial, all of which show how to dymaically render to a cube map.
And another sample from the SDK uses cube map through shader, which I've no idea how to implement...The HDRFormat sample, I dont know if anyone understand the code in it.

Anyway, none of the tutorial I've read teaches how to specifically create a cube texture and then fill each slice of it one by one...


Is there any basic tutorials for beginners?
like the basic implementation of Enviornment Mapping, Shadow Map/Volume, Relief Mapping, and SSAO something like that?


Here is some info : http://knol.google.com/k/3d-skybox#

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.