OpenGL Tutorial 52: Render to Cube Map Texture

preview_player
Показать описание
Implementing dynamic environment mapping this week by rendering our scene to a cube map texture, allowing for our reflective objects to reflect our in-game scene!

Try out the runnable jar!

GTA V article:

DOOM article:

Starting Code:

Finished Code:

PNGDecoder Download:

Setting up a LWJGL project tutorial (in case you've forgotten!):

Cube Map Tutorial:

Environment Mapping Tutorial:

FBO tutorial:

End of video music- Kai Engel, "Waking Stars":

Рекомендации по теме
Комментарии
Автор

PLEASE DONT EVER STOP, IM LOVING THESE TUTORIALS :) great work thank you for hours of fun by making this nice game engine

sanis_kamis
Автор

You have been such an inspiration to me I've always wanted to make a game with lwjgl and opengl and I've attempted but failed but when I found your tutorials I felt like I was actually going somewhere and I was learning because you explain everything so well with visuals which I'm a visual person so that is why learning out of the book is very hard for me but you made that possible!

pengie_
Автор

You are a god! I have been looking for tutorials on this and have had a surprisingly difficult time. After finding your channel 8 years ago I knew as soon as I found this video by you it would all be okay. Thank you for your public service! You just helped me finished my Masters!

ben_car_
Автор

You can use gl_Layer and geometry shaders to make a single draw call when creating the cubemap texture.

arhaisme
Автор

Your understanding of this is very difficult concept is very admirable.

ThePinokhio
Автор

Super cool tutorial Karl, thanks!!! And thanks for sharing the beautiful socuwan scene also, you are very generous man!!!

alfredoanderson
Автор

Hahah, came here to your video precisely while reading the GTA V rendering article

arsnakehert
Автор

how can i fuse the pre-made cube maps and the generated ones i mean in 0:17 on your video i want that dragon to be reflected on the teapot along with the environment map. i tryed doing this and t's not happening i only get the dragon reflected on the teapot but with black background like my camera can't see the orginal cubemap

AssassinGrudge
Автор

Thanks man. Awesome video. Keep up the good work

rhodate
Автор

Can you do a tutorial about parallax occlusion mapping or ambient occlusion?

qendolin
Автор

I've hypothesized a method of increasing rendering speed of the cubemap.
Instead of rendering the scene to each individual texture of the cubemap six times, you can instead warp the entire scene around a camera point, render once as an ordered texture2d
and then render parts of this texture to individual parts of the cubemap.

That way you do six times less scene renders than before. Any questions?

sisilicon
Автор

6:55 More efficient? That is not what efficient means. The fewer vertices, the less efficient. With one vertex, it's almost all overhead. If there were billions of vertices, the overhead would be negligible.
You meant faster.

douggale
Автор

Since the cubemap is only being rendered once when the game launches, couldn't you draw the scene in full detail, so you have a high detail environment map with only a small amount of time at the beginning of the game to render it?

jackdavenport
Автор

Excelente videotutorial, muchas gracias 👍👍!!

depthx
Автор

Amazing tutorial! I have a question regarding Image based lighting which is the same technique in a sense, how would you "block" the light of the reflection object. I want to have an directional light that acts as the sun and combine it. I think the answer is that you "discard" the image based lighting and do a cubemap reflection with rendering of the scene with all the things you mentioned and then let the reflected object act on different lights (which is in a different render pass). That way you see in the reflection the blocked object and almost no light onto the reflected object. Is this correct?

vamidicreations
Автор

Hello ThinMatrix! Amazing video! Do you know how to make SSAO effect? I have made one but there're atrifacts, i spent more than one week and i need for your help.

Alex
Автор

That works very nicely. I think if use that scene and add some deferred shading and shadows, it would look way better. Also if you staged your shadow maps into three (or more) sizes that are rendered from different distances and qualities you would make the shadows look better over a longer distance.

Mattparks
Автор

The LWJGL 3.0 has replaced DIsplay with a GLFW api. Will you be updating your code to 3.0?

nikolaynikolov
Автор

can you make a tutorial about rendering text particles for info hovering above entities for example

fishingbadboys
Автор

Does someone in the comments know a good example for changing the cursor with the LWJGL. I have been looking in many forums but they did not really explain their programs well enough. Thin already did this in his Equilinox series and I wonder how it works.

LuckyPhenixTV
welcome to shbcf.ru