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

    100.0%
  2. Faster conversion

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

    0 vote(s)
    0.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:
    100
    Positive Ratings:
    99
    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:
    100
    Positive Ratings:
    99
    Alpha 2 Screenies
    pl_upward_colourful.png pl_upward.obj.png pl_upward_cart_1080p_wireless.jpg
     
    • Like Like x 6
  3. Pocket

    aa Pocket func_croc

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

    B!scuit L3: Member

    Messages:
    100
    Positive Ratings:
    99
    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
  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 L3: Member

    Messages:
    121
    Positive Ratings:
    86
    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:
    100
    Positive Ratings:
    99
    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)