deviant-syndrome / blender-udmf-toolkit

Import UDMF maps from Doom PWADs into Blender
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Interesting concept #1

Open DwarfFighterCleric opened 8 months ago

DwarfFighterCleric commented 8 months ago

Thanks for this, sounds interesting.
Is there any screenshot or video of this in use?
Does it support HUGE maps such as Lost Civilization (Boom format) or Hocus Pocus Doom egypt maps? (this last one being Zdoom format)

deviant-syndrome commented 8 months ago

Hello. @DwarfFighterCleric .Thank you for expressing interest in the project. The main reason I started developing this Blender add-on is to be able to utilize Blender's built-in texture baking capabilities for creating lightmaps for my own ZDoom mod. While, conceptually, it works, there are the following shortcomings:

  1. Currently, the scene building code does not support ZDoom specific slopes and 3D sectors
  2. Since the scene is built exclusively on UDMF information without proper prior BSP/segs processing, the triangulation of sector polygons (especially concave ones) can be janky
  3. The lighting is rendered directly onto tiled textures. This means that for tiled texture, the lightmapped size would be equal to the total inner square of the level surface. Which means that the texture pack size is going to be enormous and could potentially lead to video memory spills in the engine. I chose this naive approach to avoid early commitments to modifying the engine's renderer.

Apparently, there is a well maintained Vulkan-focused ZDoom child port called VkDoom. It has support for lightmap and a standalone lightmap-baking utility called ZDRay. If your primary interest is lightmapping, this might be perfect for you. If you enable debug output from ZDRay, it will even output you an OBJ file of the map, which you can drop in Blender (and it looks way better than my code's output).

Sorry for the long intro waffle before answering your specific questions.

  1. I'll try to add some screenshots and walkthrough's to demonstrate what this utility can do at the moment. ETA is about a week
  2. This add-on currently supports UDMF exclusively, Boom support is not currently on the roadmap. Sorry
  3. My hunch is that this code can digest and load pretty huge maps into Blender scene (Blender should handle view distance clipping, and internal memory spills when working with large number of polygons) Since it creates one texture slot per wall and 2 textures per sector (floor/ceiling), memory consumption can become a problem.

After discovering ZDRay, I'm now rethinking the purpose and the structure of this add-on in the following way:

  1. I will port some of the ZDRay code into this add-on to be able to render ZDoom slopes/3D sectors properly and also elevate the seg data.
  2. I will make the output of this add-on baked textures compatible with VkDoom lightmaps. This could actually be beneficial, because Blender offline rendering engine has a much wider platform support, and it is more flexible as it could do lightweight previews with shadow-casting, also the material definition could be independent of the engine.

I also probably should put some of this into readme for expectations management. Cheers!

DwarfFighterCleric commented 8 months ago

That is AWESOME... Glad to find out about VulkanDoom...
Yeah I was meddling around with mods such as Relighting (Realistic Lighting compiled at map-load time...) DarkdoomZ and of course PRboom-RT which proved everyone that we can in fact add real-time 3D objects into the old Doom code (even if it's just lights and shadows this time)
Lots of interesting stuff coming out soon it seems... hope all these things develop into greater heights

DwarfFighterCleric commented 8 months ago

I'm also very excited with the prospects of projects such as Daggerfall Unity in terms of adding Real-Time Lighting and Shadows Ray Traced in such older 2D game, this combination looks so good and totally brings new life to older games...
Ok so if I could give one example of how Relighting works, take it Doom1 E1M3 that starting area the open area in the middle will "bleed" lights off the holes in the wall, causing the textures on the inner darker corridors to be illuminated... Is that how this "texture baking" kinda works? Well I will wait anxiously for the screenshots in a few weeks, thanks a lot bye o/
All these tools combined with Reshade Shaders will make for some pretty interesting Dooming this next decade. We finally reached the tech for it.