Create Cubemap In Unity


Follow this tutorial if you want to apply surrounding environment reflections to your object.




Okay, so I have made this simple Environment in Unity.


To create a Cubemap (to capture your Environment into a Cubemap) you need to download this Script! After you download it, create the Editor folder anywhere in your Project tab and put a RenderCubemapWizard.cs inside Editor folder.


Create an Empty GameObject in the Scene.


I called it Render Position (you can call it whatever you want). Changeg it’s position to the center of my Environment. This will be the Cubemap capture position.


Create a Cubemap. Inside Project tab press RMB, select Create > Legacy > Cubemap


It will create this grey Cubemap without any textures applied. I called it Cubemap_01 (you can call it whatever you want).


Select Cubemap_01 and enable Readable (Very Importatnt)! This will allow the scripts to access the pixel data of the cubemap. I also changed Face Size to 512 (Width and Height of each Cubemap face in pixels. The textures will be scaled automatically to fit this size).


Now go to GameObject > Render into Cubemap


This window will pop up


Add Render Position (Empty GameObject we just created inside the Scene) to Render From Position. And inside the Cubemap slot add Cubemap_01 (Cubemap we just created inside Project tab).


Now we have a nice Cubemap created.


If you want to learn how to apply this Cubemap to your obejcts in the scene, check out this tutorial about Environment Reflections.


Thank you for your time, I hope you found this tutorial useful 🙂


If you want to see more stuff I’m working on, follow me on Twitter: @lmhpoly

You can support me by Subscribing to my YouTube channel, it helps me to create more video content for you guys 😉 Video tutorials, Time-lapse videos and more!

You can also follow me on Facebook, Instagram and Google+

Pin It on Pinterest