Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter

Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
YES THIS PLUGIN IS ACTIVELY BEING WORKED ON AGAIN!!
FOR NOW, USE BLENDER 3.6.x FOR BEST RESULTS!!
BE PREPARED TO UPDATE TO BLENDER 4 SOON!!


io_scene_gzrs2 - Blender 3.6+ Map & Model Importer


io_scene_gzrs2

GunZ: The Duel RealSpace2/3 content importer for Blender 3.6.2 and up.
Intended for users wishing to visualize and modify GunZ content or prepare the data for a modern game engine.

Now exports models and lightmaps.


Installation and Usage

1) Download the latest release from the GitHub page.
  • Do not extract the files!
2) Open Blender and navigate to Edit -> Preferences -> Add-ons -> Install

3) Select the .zip file and make sure the plugin is enabled in the list.

4) Unpack your map and model data from their corresponding .mrs files to a shared folder.
  • Many of the vanilla maps and models share textures from each other, I recommend unpacking them all
5) Back in Blender, navigate to File -> Import and choose your format.

6) Check the GitHub page for information on exporting.

7) Enjoy!


  • Extra information is shown in the Info tab, drag up a corner of the 3d viewport or use the Scripting layout button at the top of the screen
  • Tweak lights and fog using the drivers shown under the "Custom Properties" tab of the "<Map Name>_Driver" object's Object Properties section (click on the the orange square and scroll down)


Latest Update - v0.9.2 - "The Elu Export Update"

  • NEW: .elu version 0x0 and 0x11 import support
  • NEW: .elu export support
  • Elu meshes now support multiple material slots
  • Elu meshes now include cloth physics data as color attributes
  • Elu materials now include...
    • empty texture nodes for missing textures
    • value nodes for material ID, sub-material ID and sub-material count
    • RGB nodes for ambient, diffuse and specular colors
  • Elu logging now includes extra min/max information for some fields
  • Users are now warned if an .rs, .elu, .col or .lm file has bytes remaining after a successful read
  • Naming conventions are a bit tidier

Latest hotfix: v0.9.2.1
  • Experimental: compiled C library adds multithreading support during lightmap export
    • compiler -> gcc
    • triplet -> x86_64-w64-mingw32
    • should automatically catch and fallback to Python if anything goes wrong
  • Smarter and faster texture search now successfully finds even more textures
  • Fix for invalid xml textures (Snow Town)
  • Other minor fixes and tweaks


Known Issues

  • GunZ 1: most community maps load fine but quest maps have not been tested at all yet
  • GunZ 1: handful of .elus with improper bone weights (woman-parts_eola)
  • GunZ 1: all polygons in UV channel 2 come out garbled (import the lightmap and use channel 3 for now)
  • GunZ 1: some polygons in UV channel 3 come out garbled on maps with multiple lightmaps (Citadel)


  • GunZ 2: some objects are not oriented correctly (spotlights)
  • GunZ 2: embedded scene hierarchies are not parsed yet (lighting_candlestick_y02, lighting_chandelier_g01, etc.)


Source Code




Previews

Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
 
Last edited:
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
Could you send me a few examples along with screenshots of how they look in-game?
 
Joined
Dec 23, 2008
Messages
724
Reaction score
54
Could you send me a few examples along with screenshots of how they look in-game?

Oh I only imported it into Blender, have not tried to port it over into 3DSmax in order to export it.

Edit: I think the importer does not properly bring over the collision, or at least I do not see it shown in the shape of the map. But I'll get back to this.

Edit2: It does not port over the collision of a custom map into Blender, or at least I cannot find it where it can be edited or compiled at all in 3DSmax.
Same for lights, it did port over a dummy but not a working light (which is not a huge deal).
But the map shape and such seems to be working properly which is really awesome!
Please let me know if I can do some more testing and where to look, could be that I am not that experienced with Blender 3.1 (I started doing gunz stuff with Blender 2.49b and I still often work with that version).
 
Last edited:
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
Oh I only imported it into Blender, have not tried to port it over into 3DSmax in order to export it.

Oh I was referring to the .mrs file, not any max projects. I assumed you were talking about custom maps currently available on one of the GunZ private servers?
 
Joined
Dec 23, 2008
Messages
724
Reaction score
54
Oh I was referring to the .mrs file, not any max projects. I assumed you were talking about custom maps currently available on one of the GunZ private servers?

Correct, I tried several custom maps that were made with GTKradiant by players years ago, now I know that those maps have their issues and are not comparable with the original maps.
So yeah I found a few issues;
- does not build a proper/no collision, it does display like a collision dummy?
- I think the import of a custom map is always thrown in the center of the program (like x, y, z on 0 while a lot of custom maps are not in the center > with this remaking and fixing a bunch of older maps will be a lot harder cause they are often far from the center)
- so far I have found out it does not bring lightmaps over, only shows like a fake dummy (but lights are not a big deal tbh) > this is cause of the program the maps are made in which had it's lightmap written a bit differently

Now I have to admit that I have not tried an original map (mrs in your words) so I will try that and see how it looks like, cause I have a feeling this importer can be huge for fixing old custom maps where it's saved files are often lost or bugged.

Edit: Just tried an origianl map where it shows it's collision which is beautiful to see, I really like what you did so I wonder if the importer will be updated eventually for custom maps.
 
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
does not build a proper/no collision, it does display like a collision dummy?

If you're finding dummy objects with words like "collision" in them, the map may have saved the collision data to a different file format, or even to an .elu model.
But I need a copy of the map data to look at to be sure.


- I think the import of a custom map is always thrown in the center of the program (like x, y, z on 0 while a lot of custom maps are not in the center > with this remaking and fixing a bunch of older maps will be a lot harder cause they are often far from the center)

I'll try to add an option to center all the geometry at the origin.


- so far I have found out it does not bring lightmaps over, only shows like a fake dummy (but lights are not a big deal tbh) > this is cause of the program the maps are made in which had it's lightmap written a bit differently

I didn't see a reason to read the lightmap data so the script doesn't do it at all. The light tweaks and drivers are setup to help people get the lights working in real-time, either in Blender or in some other game engine.
If people really need the lightmap data, I can make the script do it. I just need a good reason.
 
Joined
Dec 23, 2008
Messages
724
Reaction score
54
If you're finding dummy objects with words like "collision" in them, the map may have saved the collision data to a different file format, or even to an .elu model.
But I need a copy of the map data to look at to be sure.
So far I know collision is not stored in any .elu model, should be in a .BSP but I have actually no clue how gzmap renegates it's collision or where it actually stores it.
Feel free to send me a PM and I can send you a uncompiled custom map so you can have a look at the files.


I'll try to add an option to center all the geometry at the origin.
That would be nice and a big help for sure.

I didn't see a reason to read the lightmap data so the script doesn't do it at all. The light tweaks and drivers are setup to help people get the lights working in real-time, either in Blender or in some other game engine.
If people really need the lightmap data, I can make the script do it. I just need a good reason.
This should be the last thing if you were ever to make a script for this, lightmaps are the least needed for an importer like this, at least for custom maps, most of those maps have scuffed lightmaps to begin with cause of how they are generated with GZMAP/Radiant.
 
Joined
Jan 9, 2009
Messages
614
Reaction score
152
So far I know collision is not stored in any .elu model, should be in a .BSP but I have actually no clue how gzmap renegates it's collision or where it actually stores it.
Feel free to send me a PM and I can send you a uncompiled custom map so you can have a look at the files.



That would be nice and a big help for sure.


This should be the last thing if you were ever to make a script for this, lightmaps are the least needed for an importer like this, at least for custom maps, most of those maps have scuffed lightmaps to begin with cause of how they are generated with GZMAP/Radiant.

The collision should be stored in a separate .col file.
 
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
Updated to v0.8.1

- Fixed silent fail when attempting to hide BspBounds collection
- Fixed double dds extension causing issues parsing some texture paths
 
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
Updated to v0.8.2
  • (Very) basic .elu support, no .ani parsing or skinned meshes yet
    • ​tested on all models loaded in vanilla GunZ maps
    • some issues with orientation on a case-by-case basis (Factory, Mansion, Halloween Town etc.)
  • Map geometry now actually truly does load custom normals this time I promise
  • Added new switches for logging information to the console

Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
 
Joined
Dec 23, 2008
Messages
724
Reaction score
54
Updated to v0.8.2
  • (Very) basic .elu support, no .ani parsing or skinned meshes yet
    • ​tested on all models loaded in vanilla GunZ maps
    • some issues with orientation on a case-by-case basis (Factory, Mansion, Halloween Town etc.)
  • Map geometry now actually truly does load custom normals this time I promise
  • Added new switches for logging information to the console

Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums

Wooh I like it, we can see the sky and such in the files now : )
Cannot wait for more options for this importer!
 
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
A very big update for this plugin is on it's way soon.

Here are some teasers of maps and models loaded from the GunZ 2 source...

Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
 
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
GunZ 1 & 2 elus will be loadable independently, including skinned actor meshes. I've also fixed the issues with prop orientations for maps like Factory, Mansion, Halloween Town etc.

Getting some linux support thanks to Nayr and tidying up a few loose strings before a release this week.

Krunklehorn - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
 
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
Updated to v0.9.0

  • NEW: major elu support, versions 0x5004 - 0x5011 may be loaded independently including skinned actor meshes
  • NEW: rs and elu support for GunZ 2 alpha content
  • NEW: smart texture search checks local, relative and upward paths and supports non-dds formats
  • rs UV layer 2 is now included
  • prop dummies are now skipped and all props are loaded whether they have a corresponding dummy or not
  • materials can now be both transparent and additive, clipped alpha testing is also supported
  • fixed broken prop orientations (Factory, Mansion, Halloween Town, etc.)
  • fixed operator switches overwriting each other on subsequent imports
  • fixed issues with file paths on posix systems thanks to Nayr
  • removed local copy of minidom
  • additional log switches have been setup
  • additional material flags are recognized
 
Initiate Mage
Joined
Jun 4, 2017
Messages
19
Reaction score
36
Been working on v0.9.1 on and off over the last few months and I'm gearing up for a release again, so here are a few updates...

The .col import code used to output all the geometry at every node in the entire tree, resulting in a massive polygon soup.
With this update, non-hull geometry is now discarded and I've come up with a recipe to help cleanup the geometry to resemble something closer to it's source.

It's not perfect, the BSP cutting process is one-way after all, so you'll still find holes and overlapping faces here and there. Luckily, the plugin can at least get things to a human readable and configurable state.

230415_gzrs2collisioncleanup1 - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
230415_gzrs2collisioncleanup2 - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums

Backend management has improved significantly with cached calls to resources, improving performance and preventing duplicates. Now when you load a map or model, most if not all images, image texture nodes and material slots will be neatly sorted and linked. No more massive chains of ".001, .002, .003" duplicates and some issues with negative material indexes have been resolved as well.

GunZ 1 lightmaps will not only receive support, but also quality improvements! DeffJay and I are cooking up a client patch to fix lightmap bugs and add support for DXT compression. I've already been using Blender to bake and export high quality lightmaps as large as 8k and hope to provide integration support for any private server wishing to make the upgrade.

230730_gzrs2townbakewi - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums

Last but not least, I'm proud to announce that GunZ 2 scene hierarchies can now be fully traversed and loaded. With time we'll be able to open retail .mrf files and access all the content from the latest version of the game, but for now, a nearly complete version of Mansion 2 is accessible from the Changzu leak, including geometry, textures, materials, lights and more!

230422_pvp_mansion2_1 - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
230422_pvp_mansion2_2 - io_scene_gzrs2 - Blender 3.6+ Map & Model Importer/Exporter - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Back
Top