# BP\_Sky\_Sphere in C++?

**URL:** <https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552>\
**Category:** Blueprint\
**Tags:** sky-sphere, unreal-engine, Blueprint, question, CPP\
**Created:** [August 8, 2016, 11:17pm UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552 "2016-08-08T23:17:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c4cdb3c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c4cdb3c](https://forums.unrealengine.com/u/anonymous_user_1c4cdb3c)\
**Post date:** [August 8, 2016, 11:17pm UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552/1 "2016-08-08T23:17:58Z")

</div>

I’d like to do something roughly equivalent to BP\_Sky\_Sphere in C++. I browsed through the blueprint and it seems fairly straightforward. I see how the directional light’s rotation is used to blend colors and materials. But what I don’t see is how the actual sphere works. When I add BP\_Sky\_Sphere to a level, it doesn’t act like a normal sphere… For example, I can’t see the outside of the sphere, no matter how much I zoom out. I don’t see anything special about the sphere in the blueprint – I don’t see anything there that changes the sphere’s position or size based on distance. So how do I get a sphere to act like this in C++?

---

<div class="post-metadata">

**Author:** ![DennyR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DennyR](https://forums.unrealengine.com/u/DennyR)\
**Post date:** [August 9, 2016, 1:22am UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552/2 "2016-08-09T01:22:42Z")

</div>

It is in the mesh data. **The vertex normals simply “point” inwards**. So to reproduce this in c++, you have to either use the same mesh that BP\_Sky\_Sphere is using, or make your own SkySphere/SkyDome in a 3D modelling program with flipped normals.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c4cdb3c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c4cdb3c](https://forums.unrealengine.com/u/anonymous_user_1c4cdb3c)\
**Post date:** [August 9, 2016, 1:32am UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552/3 "2016-08-09T01:32:11Z")

</div>

Cool, I can make a sphere with flipped normals. But what I’m really trying to figure out is this part:

> it doesn’t act like a normal sphere… For example, I can’t see the outside of the sphere, no matter how much I zoom out

It acts like an infinitely large sphere. It doesn’t appear to move, regardless of what the camera does. I can’t figure out how it does that.

---

<div class="post-metadata">

**Author:** ![DennyR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DennyR](https://forums.unrealengine.com/u/DennyR)\
**Post date:** [August 9, 2016, 1:36am UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552/4 "2016-08-09T01:36:17Z")

</div>

That is most likely [cube mapping](https://docs.unrealengine.com/latest/INT/Engine/Content/Types/Textures/Cubemaps/) in the material itself.

You need special textures for this technique though.

[Here is a nice answer hub post](https://answers.unrealengine.com/questions/15307/how-to-create-simple-space-skybox.html). It handles space box creation, but the process is the same.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c4cdb3c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c4cdb3c](https://forums.unrealengine.com/u/anonymous_user_1c4cdb3c)\
**Post date:** [August 9, 2016, 2:27am UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552/5 "2016-08-09T02:27:31Z")

</div>

I think cube mapping is new in 4.9. BP\_Sky\_Sphere has been around a lot longer.  
Edit: Actually, I think I might be wrong about that. Still, even with cube mapping, I’m not seeing how it would work. If the camera moves outside the sphere, it’s going to cause problems. Yes, I could restrict camera movement in the game itself to keep that from happening, but that’s not an issue with BP\_Sky\_Sphere and I’d like to understand why.

---

<div class="post-metadata">

**Author:** ![DennyR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DennyR](https://forums.unrealengine.com/u/DennyR)\
**Post date:** [August 9, 2016, 2:55am UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552/6 "2016-08-09T02:55:42Z")

</div>

Cube mapping has been around forever. And what problems are you talking about?  
Also the camera should never leave the skysphere during gameplay anyways.

EDIT: [here is a simple tutorial on how to create a cube mapped skybox](https://wiki.unrealengine.com/Skybox_from_DDS_cubemap)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c4cdb3c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c4cdb3c](https://forums.unrealengine.com/u/anonymous_user_1c4cdb3c)\
**Post date:** [August 9, 2016, 3:32am UTC](https://forums.unrealengine.com/t/bp-sky-sphere-in-c/366552/7 "2016-08-09T03:32:51Z")

</div>

Woops, the sphere in BP\_Sky\_Sphere really is just a regular sphere. It’s scaled to about 16 km, which is so large that it doesn’t appear to move when the camera moves, or when you move around in the editor. Somehow, I got it in my head that there was something a lot more complicated going on.
