# Create BSP and convert to StaticMesh in C++

**URL:** <https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922>\
**Category:** C++\
**Tags:** bsp-brush, unreal-engine, brush, UE4, question, CPP\
**Created:** [March 28, 2015, 9:12am UTC](https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922 "2015-03-28T09:12:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanchousf\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sanchousf\_1](https://forums.unrealengine.com/u/sanchousf_1)\
**Post date:** [March 28, 2015, 9:12am UTC](https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922/1 "2015-03-28T09:12:39Z")

</div>

I need some editable object in editor what converts in StaticMesh in game. I want to convert it automatically.  
I try to use UBrushComponent but I can’t found any documentation how use it. And even how convert ABrush to StaticMesh. Can someone help me?

* * *

I need to know:

1. How create simple BSP shape (for example box or plane) when Actor (who own UBrushComponent) just created.
2. How convert it to StaticMesh.

---

<div class="post-metadata">

**Author:** ![Jurif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jurif](https://forums.unrealengine.com/u/Jurif)\
**Post date:** [March 28, 2015, 2:15pm UTC](https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922/2 "2015-03-28T14:15:29Z")

</div>

You create BSP by dragging it into the map:

![36323-screenshot421.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/9/b/49b5ea8a324ae13c5f8102e91783bc8c2c69d05f.jpeg)

Next you select your new BSP brush and you can click to “Geometry edititing” to change your brush:

![36324-screenshot422.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/0/b10f1fb1fffa03ef833d217a23889ef8b3d780f7.jpeg)

With your BSP brush selected you go to “File-\>ExportSelected” and save it out as .fbx.

 ![36326-screenshot423.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/4/6a4abf7b012b5f982b8875896179d895e303acd7.jpeg)

Note that pivot point of your exported mesh will be placed at 0,0,0 location in the map,  
so you’d first have to move BSP brush on to 0,0,0 before exporting , to make it more convenient.  
Also after you export it should automatically open the import dialog for static mesh.  
Note that creating static meshes like this, creates meshes without smoothing groups.  
If you want to do this in-game I am not sure how well it would work, probably better to use Static Meshes exported from a 3D package.

---

<div class="post-metadata">

**Author:** ![sanchousf\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sanchousf\_1](https://forums.unrealengine.com/u/sanchousf_1)\
**Post date:** [March 29, 2015, 12:05am UTC](https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922/3 "2015-03-29T00:05:42Z")

</div>

Thank you for reply. But I need do it from C++. It is way not suitable.

---

<div class="post-metadata">

**Author:** ![Jurif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jurif](https://forums.unrealengine.com/u/Jurif)\
**Post date:** [March 30, 2015, 12:07am UTC](https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922/4 "2015-03-30T00:07:18Z")

</div>

Yeah I noticed that, I just wanted to help with what I know, what you’re after is how the UE4 editor BSP system is made, and you have all that in the source code, I’m sure it can be done, however that seems like a pretty big thing to me, and how would you solve the no Smoothing Groups problem… May be a good idea to post this on forum and see if you get some good suggestions.

---

<div class="post-metadata">

**Author:** ![Azarus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Azarus](https://forums.unrealengine.com/u/Azarus)\
**Post date:** [April 17, 2015, 1:51am UTC](https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922/5 "2015-04-17T01:51:54Z")

</div>

Maybe a good idea to provide an answer to the question because this question pops up first in the google search results…

---

<div class="post-metadata">

**Author:** ![glitchysparx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@glitchysparx](https://forums.unrealengine.com/u/glitchysparx)\
**Post date:** [February 12, 2024, 4:11pm UTC](https://forums.unrealengine.com/t/create-bsp-and-convert-to-staticmesh-in-c/312922/6 "2024-02-12T16:11:33Z")

</div>

If anyone has an answer or any info about modeling with c++, I would be so so so thankfull for that
