Jump to content
SomaZ

[WIP] Blender Bsp Importer

Recommended Posts

Hello folks,

 

I've been writing this importer for some time now and I think now is the time you can test this too. It's written for Blender 2.81. Older Blender versions are not supported because of incompatibilities in the material system. You need to unpack all your data to some directory because the plugin can't read pk3 files.

 

Download:

GitHub

Download the import_ja_bsp_plugin.zip under Assets and install like every other Blender plugin. Copy your unpacked basefolder location into the preferences of the plugin after activating it and you are good to go. You will find a import -> JA BSP (.bsp) entry in your menu.

Start importing your .bsp and go grab a coffee, it's pretty slow right now, this will be fixed when I have some more time.

 

Known Bugs:

- portals don't work

- transparent shaders don't look like in the game (not really fixable I think)

- some rgbGens aren't implemented

- some tcMods aren't implemented

- skyportals aren't implemented

- fog is not implemented

- animmaps aren't implemented

- tcGen environment is not outputting the same reflection vector as the game

- potentially load order of the shader files is wrong (maybe someone could check that for me? ? )

- only one imported map at the same time is working properly

- system console still prints some debug info that is not needed for a user

 

Pictures:

 

spacer.png

spacer.png

spacer.png

Share this post


Link to post

That's absolutely fantastic! I'm seeing some much simpler applications of conversions to SWBF2 in the future (with the given author's permission, obviously)

Share this post


Link to post

Nice mate! I've been experimenting with something like this using Noesis, this saves a few steps that would otherwise be involved in it.

Share this post


Link to post

An exporter is not planned, but some other useful features. More info about that will follow soon.

 

I wrote a Noesis plugin and some blender plugin some time ago to do something very similar, but I wasn't satisfied with it, so I started writing this. It involved some nasty stuff like decompiling the bsp file to get the enitity infos into the old plugin and this was very annoying.

TheWhitePhoenix likes this

Share this post


Link to post

I don't see how an exporter would even be possible just because of all the technical aspects of making a map work other than just geometry. A bare .MAP exporter to just bring the geometry into radiant to add everything else that makes the map work would be more than enough since the biggest problem with radiant is that it's 3D tools are terrible.

Psyk0Sith and Archangel35757 like this

Share this post


Link to post

Upcoming new Features in the next update

Blender 2.83 support

Light baking in Blender:

Spoiler

 

- Baking of lightmaps, vertex colors and lightgrid

- Changing lightmap texture coordinates

- Patching bsp files directly, no other software needed

 

 

 

Entity modding:

Spoiler

 

- Currently only JKA Singleplayer support

- Patching bsp files directly, no other software needed

oSvYSeQ.jpg

 

MD3 Import:

Spoiler

 

- Lighting preview

- no animation support

F4spBDd.jpg

 

MD3 Export:

Spoiler

 

- No need to triangulate models before exporting

- No need to manually split seams at uv boarders

- Material assignment via Blender material names

- Custom normal support

- Objects with more than one material are supported

SsUZmJ6.jpg

FVliryp.jpg

 

If somebody is interested in testing:

Current development branch
https://github.com/SomaZ/Blender_BSP_Importer/tree/ent-lighting-modding

Droidy365, Lancelot and fullkevlar like this

Share this post


Link to post

@SomaZ

As someone clueless: Is there any reason for using this when it comes to mapping? Can we actually entity mod through this? And even decompile maps or am I missing something?

Share this post


Link to post
34 minutes ago, Aldro Koon said:

@SomaZ

As someone clueless: Is there any reason for using this when it comes to mapping? Can we actually entity mod through this? And even decompile maps or am I missing something?

I myself have done something similar to this (via Noesis) and it's useful because textures stay aligned when the map is converted to a model. For collision, you can simply decompile the map and convert most of the textures to physics clip. At least, that's what I do.

The only real problem I've found with this is that the lighting is a little bit messed up in some places, mostly on the floors.

Share this post


Link to post
3 hours ago, Aldro Koon said:

@SomaZ

As someone clueless: Is there any reason for using this when it comes to mapping? Can we actually entity mod through this? And even decompile maps or am I missing something?

This is mainly a tool to fix things you can never get right in radiant. Sometimes vertex normals end up not beeing smoothed or you simply pull your hair out trying to get some nice lighting. (Vertex normals are used for "phong" shading, so you can actually force faces to be smooth in my plugin after compiling a map)

So basically you can use this to beautify your maps afterwards. You don't need to decompile the map or else. Just patch the bsp file directly with this addon.

Yes, we can actually entity mod through this. This is basically unfinished, but it already works like a charm. I think only rotating stuff is unfinished actually, rest should be fine. Also, just patch the bsp file directly with the addon. No need for another software.

No, this can't decompile maps into .map.

FFA3 with some new baked lightmaps for the gl2 renderer

Spoiler

PcnvrC6.jpg

mupDqWf.jpg

TFPNHZD.jpg

7sRh4gd.jpg

43pzrNN.jpg

Very simple enitity mod of mp/Duel1, added two misc_model_statics

Spoiler

AqjPdWU.png

 

3 hours ago, Droidy365 said:

I myself have done something similar to this (via Noesis) and it's useful because textures stay aligned when the map is converted to a model. For collision, you can simply decompile the map and convert most of the textures to physics clip. At least, that's what I do.

The only real problem I've found with this is that the lighting is a little bit messed up in some places, mostly on the floors.

Lighting works perfectly fine with this addon, when you put some effort in reworking the lightmap texture coordinates manually. You can save them back into the bsp to get no light leaks.

 

Whoops, forgot to repeat the best thing about this. You can patch the vertex colors and the lightgrid too. Means, you can light everything in blender. Older approaches could only bake lightmaps. Vertex colors are used when a surface doesnt have a lightmap. In the vanilla game, there are lots of vertex lit surfaces. The lightgrid is used to light players. So, now you can rework the lighting completely in blender and not just make it better. Guess I should show off some drastic light changes like, yavin at night or something like that. 😛

Droidy365 and Lancelot like this

Share this post


Link to post

@SomaZ

Just to be abundantly clear, does this mean we can use this to entity mod existing default ffa maps and then upload them serverside (JA+) for all to see without having to download them?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...