Import .bsp props into Blender

What feature should I focus on next?


  • Total voters
    9

B!scuit

L4: Comfortable Member
Aug 12, 2016
195
266
The update thread for the python script I made for how to import whole .vmf into blender?
for now refer to the link for a more in detail release post.

import_bsp_a2.zip
| bsp_import_props.blend (layer 3 is Mercenary Park props)
| pl_upward.blend

| bsp_import_props.vmf & bsp (test map)
| import_props_a1.py (must be run in Blender)
| bsp_to_obj_a1.py (drag and drop bsp over script)
| vector.py (used by bsp_to_obj.py)

| pl_upward.bsp.obj
| cp_mercenarypark_unpacked.bsp.obj
 

Attachments

  • import_bsp_a2.zip
    37.3 MB · Views: 1,986
Last edited:

B!scuit

L4: Comfortable Member
Aug 12, 2016
195
266
Alpha 2 Screenies
pl_upward_colourful.png
pl_upward.obj.png
pl_upward_cart_1080p_wireless.jpg
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
Makes it look like those foamboard models that architects make.
 

B!scuit

L4: Comfortable Member
Aug 12, 2016
195
266
Latest version of bsp_tool.py
Only needs vector.py from the a2 release to run (must be in same folder)

Worldights are now workable dicts
.objs now have normals and face windings that import into Blender painlessly
.objs import with uvs (at the cost of increased loading times)
Striping out the displacements from the export_obj method can shave about 75% off your compile time
uvs on displacements may be rotated and are projected so they're a little inaccurate (especially for water details)
Displacements just need a bunch of refactoring so I can build the vertex format better
I am going off code I scrawled on a brown paper bag at 2am here
IMG_0165[1].JPG
 

Attachments

  • a3_patch.zip
    8.4 KB · Views: 433

Box 2

L1: Registered
Mar 10, 2018
1
1
Made an importer for the textures for the props that you can obtain by using B!scuit's script

For now only works in blender render GLSL mode and you might have issues with duplicate textures on models.

To use it you download GCF Scape and extract your materials, that is the vmt files, from your tf2_misc_dir.vpk to a folder.

You then extract all vtf files from tf2_textures_dir.vpk to a folder and then you download VTFEdit.

In VTFEdit go to tools convert folder and make sure recursive is checked and vmt is not checked then convert your vtf files to .png's.

You then load the props using B!scuits scripts and use the PNG_LOADER.py script in blender.

Make sure to set your png_dir in PNG_LOADER.py as the directory where you have your png files and vmt_dir in PNG_LOADER.py as the directory where you have your extracted vmt files.

And ... It won't let me upload files here so... here's a pastebin of the script, just download from there, copy the .py into blender, and run script after following previous steps https://pastebin.com/gxPyCzNj

P.S. recommended to activate console window before running as it takes a minute to load.
 

G.bo

L4: Comfortable Member
Sep 24, 2017
175
193
No joke, the photos remind me of games like Cluster Truck and Super Hot.
Can't wait for the 200% true Super Hot TF2 crossover.
 

B!scuit

L4: Comfortable Member
Aug 12, 2016
195
266
link to vmf_tool: vmf_tool.py, I'll probably be focusing on this more than bsp_tools for now
since it should lead to improvements in importing accuracy
but if anyone needs something specific done don't hesitate to ask
also I'll put all the scripts in this thread on github at some point, just don't ask when (I need to look at liscensing for code copy-pasted from source2013)

vmf to obj soon! (hopefully)
 

Fat McFatty Bald Fat

L1: Registered
Jul 5, 2018
2
0
This is very nice! I had to do 48 hours of searching through the CSGO community, but there are only paid plugins or addons for Maya to import Source Engine maps. Crafty is also seriously dated and broken, and I needed something to export to Blender 3D.

I couldn't find a way to get the unique game models imported, but now it seems all I need is to get the textures! This has certainly fulfilled more than what I was expecting to find after searching so long!
 

B!scuit

L4: Comfortable Member
Aug 12, 2016
195
266
I've been working an update for textures, scrambled faces and compressed maps.
Be sure to keep an eye on the thread for that and after I might take a look at a proper UI & CS:GO support
 

Fat McFatty Bald Fat

L1: Registered
Jul 5, 2018
2
0
Sounds promising! I was actually just looking to port some TF2 maps. Only issue with finding methods is that TF2 has a smaller Source Engine community.
 

B!scuit

L4: Comfortable Member
Aug 12, 2016
195
266
Alpha 4 of the .bsp converter
Dragging & dropping any number of .bsp files over bsp_tool.py will create an .obj of the same name in the same folder
Requires Python 3.6 or better (and vector.py in the same folder, included in the zip)

More regular / broken updates can be found @ github\bsp_tool
 

Attachments

  • bsp_to_obj_a4.zip
    13.7 KB · Views: 609

The Siphon

L6: Sharp Member
Mar 2, 2015
278
190
I could see this used for really cool SFM shots.
Import a map to Blender > Find a specific thing on the map, for example building > Create a destruction animation for it > Export it to SFM as model with that destruction sequence
Or something along those lines. Or in general just make a lot of cool stuff.