Import .bsp props into Blender

Discussion in 'Tutorials & Resources' started by B!scuit, Dec 7, 2017.

?

What feature should I focus on next?

  1. UI

    20.0%
  2. Faster conversion

    0 vote(s)
    0.0%
  3. .obj materials

    80.0%
  4. Lightmap editing

    0 vote(s)
    0.0%
  5. WebGL version

    0 vote(s)
    0.0%
  1. B!scuit

    B!scuit L3: Member

    Messages:
    117
    Positive Ratings:
    122
    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
     

    Attached Files:

    Last edited: Jan 31, 2018
  2. B!scuit

    B!scuit L3: Member

    Messages:
    117
    Positive Ratings:
    122
    Alpha 2 Screenies
    pl_upward_colourful.png pl_upward.obj.png pl_upward_cart_1080p_wireless.jpg
     
    • Like Like x 10
    • Agree Agree x 1
  3. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,377
    Makes it look like those foamboard models that architects make.
     
    • Agree Agree x 4
  4. B!scuit

    B!scuit L3: Member

    Messages:
    117
    Positive Ratings:
    122
    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
     

    Attached Files:

    • Like Like x 1
    • Funny Funny x 1
  5. Box 2

    Box 2 L1: Registered

    Messages:
    1
    Positive Ratings:
    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.
     
    • Thanks Thanks x 1
  6. G.bo

    G.bo L4: Comfortable Member

    Messages:
    166
    Positive Ratings:
    164
    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.
     
  7. B!scuit

    B!scuit L3: Member

    Messages:
    117
    Positive Ratings:
    122
    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)
     
  8. Fat McFatty Bald Fat

    Fat McFatty Bald Fat L1: Registered

    Messages:
    2
    Positive Ratings:
    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!
     
  9. B!scuit

    B!scuit L3: Member

    Messages:
    117
    Positive Ratings:
    122
    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
     
  10. Fat McFatty Bald Fat

    Fat McFatty Bald Fat L1: Registered

    Messages:
    2
    Positive Ratings:
    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.
     
  11. B!scuit

    B!scuit L3: Member

    Messages:
    117
    Positive Ratings:
    122
    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
     

    Attached Files:

    • Thanks Thanks x 1
  12. The Siphon

    The Siphon L6: Sharp Member

    Messages:
    276
    Positive Ratings:
    142
    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.
     
    • Thanks Thanks x 1
    • Agree Agree x 1