I did this stuff years ago and never found time to document it.
You can convert any map from the old .map format to a new JSON based map format with the console command "convertMapToJSON game/<mapname>"
It will convert the brush and patch primitives to polygons that can be read into Blender. I wrote importers and exporters for Blender which are very very basic but allow to load the JSON file into Blender and export it back to RBDOOM without any los of data.
Converting brushes and patches to polygons is something that dmap already did. All I had to change was to tell dmap that it works with polygon based data.
Python supports JSON without the need of any libraries so getting this stuff into Blender was quite straightforward.
You can model maps in Blender and compile them with dmap in RBDOOM. Once they are compiled you can load them.
The only part that is still missing is that the AAS compiler has no clue about the new format as it still requires brushes.
It is something that could be fixed however I stopped working on RBDOOM because of lack of time.
Right now I'm porting RBDOOM to Vulkan with the help of the vkDoom 3 code by Dustin Land but this is more or less a learning excercise to get into Vulkan programming.
You can see how D3DM1 looks in Blender: https://imgur.com/a/GujrC8z
So instead of this brush data:
it works with a format like this
You can convert any map from the old .map format to a new JSON based map format with the console command "convertMapToJSON game/<mapname>"
It will convert the brush and patch primitives to polygons that can be read into Blender. I wrote importers and exporters for Blender which are very very basic but allow to load the JSON file into Blender and export it back to RBDOOM without any los of data.
Converting brushes and patches to polygons is something that dmap already did. All I had to change was to tell dmap that it works with polygon based data.
Python supports JSON without the need of any libraries so getting this stuff into Blender was quite straightforward.
You can model maps in Blender and compile them with dmap in RBDOOM. Once they are compiled you can load them.
The only part that is still missing is that the AAS compiler has no clue about the new format as it still requires brushes.
It is something that could be fixed however I stopped working on RBDOOM because of lack of time.
Right now I'm porting RBDOOM to Vulkan with the help of the vkDoom 3 code by Dustin Land but this is more or less a learning excercise to get into Vulkan programming.
You can see how D3DM1 looks in Blender: https://imgur.com/a/GujrC8z
So instead of this brush data:
Code Select
ersion 2
// entity 0
{
"classname" "worldspawn"
// primitive 0
{
brushDef3
{
( 0 0 -1 256 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27d" 0 0 0
( 0 0 1 -272 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27d" 0 0 0
( -1 0.0000001344 0 -192.0000152588 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27d" 0 0 0
( -0.0000001344 -1 0 -128.0000152588 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27d" 0 0 0
( 1 -0.0000001343 0 -191.9999389648 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27d" 0 0 0
( 0.0000001343 1 0 -256 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27d" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 0 -1 -16 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27b" 0 0 0
( 0 0 1 0 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27b" 0 0 0
( -1 0.0000001344 0 -192.0000152588 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27b" 0 0 0
( -0.0000001344 -1 0 -128.0000152588 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27b" 0 0 0
( 1 -0.0000001343 0 -191.9999389648 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27b" 0 0 0
( 0.0000001343 1 0 -256 ) ( ( 0.015625 0 0 ) ( 0 0.015625 0 ) ) "textures/base_wall/lfwall27b" 0 0 0
}
}
...
}
// entity 1
{
"classname" "info_player_start"
"name" "info_player_start_1"
"origin" "128 64 0"
"angle" "180"
}
// entity 2
{
"classname" "light"
"name" "light_2"
"origin" "-128 192 128"
"noshadows" "0"
"nospecular" "0"
"nodiffuse" "0"
"falloff" "0.000000"
"_color" "0.78 0.78 0.84"
"light_radius" "225 225 225"
}
it works with a format like this
Code Select
{
"version": "3",
"entities":
[
{
"entity": "0",
"classname": "worldspawn",
"primitives":
[
{
"primitive": "0",
"original": "brush",
"verts":
[
{ "xyz": [192, -128, 256], "st": [-2, -2.998046875], "normal": [0.003921628, 0.003921628, -1] },
{ "xyz": [-192, -128, 256], "st": [-2, 3], "normal": [0.003921628, 0.003921628, -1] },
{ "xyz": [-192, 256, 256], "st": [4, 3], "normal": [0.003921628, 0.003921628, -1] },
{ "xyz": [192, 256, 256], "st": [4, -2.998046875], "normal": [0.003921628, 0.003921628, -1] },
{ "xyz": [-192, 256, 272], "st": [4, -2.998046875], "normal": [0.003921628, 0.003921628, 1] },
{ "xyz": [-192, -128, 272], "st": [-2, -2.998046875], "normal": [0.003921628, 0.003921628, 1] },
{ "xyz": [192, -128, 272], "st": [-2, 3], "normal": [0.003921628, 0.003921628, 1] },
{ "xyz": [192, 256, 272], "st": [4, 3], "normal": [0.003921628, 0.003921628, 1] },
{ "xyz": [-192, 256, 256], "st": [-4, -4], "normal": [-1, 0.003921628, 0.003921628] },
{ "xyz": [-192, -128, 256], "st": [1.9990234375, -4], "normal": [-1, 0.003921628, 0.003921628] },
{ "xyz": [-192, -128, 272], "st": [1.9990234375, -4.25], "normal": [-1, 0.003921628, 0.003921628] },
{ "xyz": [-192, 256, 272], "st": [-4, -4.25], "normal": [-1, 0.003921628, 0.003921628] },
{ "xyz": [-192, -128, 256], "st": [-3, -4], "normal": [0.003921628, -1, 0.003921628] },
{ "xyz": [192, -128, 256], "st": [3, -4], "normal": [0.003921628, -1, 0.003921628] },
{ "xyz": [192, -128, 272], "st": [3, -4.25], "normal": [0.003921628, -1, 0.003921628] },
{ "xyz": [-192, -128, 272], "st": [-3, -4.25], "normal": [0.003921628, -1, 0.003921628] },
{ "xyz": [192, -128, 256], "st": [-2, -4], "normal": [1, 0.003921628, 0.003921628] },
{ "xyz": [192, 256, 256], "st": [4, -4], "normal": [1, 0.003921628, 0.003921628] },
{ "xyz": [192, 256, 272], "st": [4, -4.25], "normal": [1, 0.003921628, 0.003921628] },
{ "xyz": [192, -128, 272], "st": [-2, -4.25], "normal": [1, 0.003921628, 0.003921628] },
{ "xyz": [192, 256, 256], "st": [-3, -4], "normal": [0.003921628, 1, 0.003921628] },
{ "xyz": [-192, 256, 256], "st": [2.998046875, -4], "normal": [0.003921628, 1, 0.003921628] },
{ "xyz": [-192, 256, 272], "st": [2.998046875, -4.25], "normal": [0.003921628, 1, 0.003921628] },
{ "xyz": [192, 256, 272], "st": [-3, -4.25], "normal": [0.003921628, 1, 0.003921628] }
],
"polygons":
[
{ "material": "textures/base_wall/lfwall27d", "indices": [0, 1, 2, 3] },
{ "material": "textures/base_wall/lfwall27d", "indices": [4, 5, 6, 7] },
{ "material": "textures/base_wall/lfwall27d", "indices": [8, 9, 10, 11] },
{ "material": "textures/base_wall/lfwall27d", "indices": [12, 13, 14, 15] },
{ "material": "textures/base_wall/lfwall27d", "indices": [16, 17, 18, 19] },
{ "material": "textures/base_wall/lfwall27d", "indices": [20, 21, 22, 23] }
]
},
...
{
"entity": "1",
"classname": "info_player_start",
"name": "info_player_start_1",
"origin": "128 64 0",
"angle": "180"
},
{
"entity": "2",
"classname": "light",
"name": "light_2",
"origin": "-128 192 128",
"noshadows": "0",
"nospecular": "0",
"nodiffuse": "0",
"falloff": "0.000000",
"_color": "0.78 0.78 0.84",
"light_radius": "225 225 225"
},
{
"entity": "5",
"classname": "light",
"name": "light_5",
"origin": "128 -64 128",
"noshadows": "0",
"nospecular": "0",
"nodiffuse": "0",
"falloff": "0",
"_color": "0.78 0.78 0.84",
"light_radius": "225 225 225"
}
]
}