Alternatively, join us on Discord.

XBuilder - A Level Editor for X3D

Started by catastropher, December 30, 2016, 09:09:31 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

catastropher

So one of the things that's made developing anything for X3D difficult is the lack of tools. So, I've been working on a new level editor called XBuilder! It will provide GUI tools for easily making levels. It'll also handle a number of tasks (such as building light maps) that are currently done by the engine itself. This will greatly reduce the complexity of X3D's source code. Originally, it was just going to be an X3D application, but now I'm integrating in ImGui so it'll have a real GUI. Here are a few screenshots of what I have so far. Anything in red is geometry that already exists, blue means it's selected, and gray means it's a preview of what the resulting geometry would be. Also notice that it supports input in different distance units:

XBuilder: ShowHide








The source is of course on github. I'm going to be adding several more tools in the coming weeks. I'm going to need alpha testers so please let me know if you're interested! For the time being, I'm going to work on the texture tool so you can put a texture on a face :D
Creator of X3D, a 3D portal rendering game engine for Nspire, 68k, and PC

DJ Omnimaga

Nice to see an editor and level maker. Will we be able to import textures directly in it by the way? X3D is coming along pretty nicely :3=

catastropher

Quote from: DJ Omnimaga on December 31, 2016, 06:22:55 am
Nice to see an editor and level maker. Will we be able to import textures directly in it by the way? X3D is coming along pretty nicely :3=

Thanks! Indeed, textures can be imported into it directly (though they shouldn't be bigger than 128x128 for speed reasons!) Phase one of texture editing is done: you can now import textures and select a texture from a texture picker I created. Here's a screenshot with a bunch of textures I stole from a quake texture pack:

Texture Picker: ShowHide


The next phase is actually being able to attach a texture to a wall! This will require modifications to the level format, a new tool for the GUI, and various other changes. I'll post an update when I have it working! :D
Creator of X3D, a 3D portal rendering game engine for Nspire, 68k, and PC

DJ Omnimaga

Awesome! I definitively can't wait to give this a try :) (with my own textures too)

catastropher

I finally got the primary texture tool working! :D It allows you to put textures on the walls and adjust the following parameters:

  • texture coordinate offsets

  • angle

  • scale


This comes as part of a huge upgrade to how X3D does texture mapping. Instead of having separate wall textures, decal textures, lightmaps, etc, everything gets built into one combined "surface" for each wall. I will make a post later on explaining why surfaces are awesome, but for now, here are some screenshots of the primary texture tool:

Primary Texture Tool: ShowHide

Outside the level:


Top down:


Inside looking up:


Next up is working on putting decal textures on wall e.g. an Aperture Science logo :D After that, I'll be writing a new lightmap compiler and updating the surface rendering to do perspective-correction every 16 pixels. I'll post an update when I have more!
Creator of X3D, a 3D portal rendering game engine for Nspire, 68k, and PC

DJ Omnimaga

By having everything into one combined surface for each wall, does this mean this take more RAM? Because that could be problematic on lower-end platforms such as the TI-84 Plus CE if you ever decided to port X3D to them. Or is it just for the editor?

Nice to see new progress :)

catastropher

Indeed, each surface will take more RAM. However, I'm taking the approach that Quake did: surface caching. When the level first loads, none of the surfaces are built. When a wall is seen, the surface is built and cached. In subsequent frames, the cached version of the texture is used. If the wall hasn't been seen for a few frames though, the memory is released. As only a portion of the walls are ever visible at any given moment, the memory penalty shouldn't be too high. Quake reserved 500k for surface cache iirc. It's difficult to estimate how much memory will be necessary though... I'll have to experiment once I have a real level to play with :)
Creator of X3D, a 3D portal rendering game engine for Nspire, 68k, and PC

DJ Omnimaga

Maybe on lower-end platforms you could just use smaller textures? The PS1 and N64 often made use of low-res textures like this. The TI-84 Plus CE only has 150 KB of user RAM (I think 256 KB total?)

TheMachine02

Yeah I dont know if surface texture in the same way quake did could be possible. In my undrstanding it also add quite some work per pixel although this might come from the SBuffer. I would love to see X3D on CE though, keep up the good work !

catastropher

Thanks guys! :D I'm going to take development one step at a time. First I'm going to get it to run, then I'll make it run fast and with low amounts of memory. For now though, I have an exciting new feature working: decal textures! In addition to being to put a primary texture on a wall, you can now add decal textures (such as Walrii and the Aperture logo in the screenshot below!)

XBuilder Decal Textures: ShowHide


I have many more exciting features in the works! Mwhahahah- *cough cough wheeze*
Creator of X3D, a 3D portal rendering game engine for Nspire, 68k, and PC

DJ Omnimaga

Are decals textures textures that only takes a part of a surface or are not necessarily bitmaps?. Also looks cool, as always

:3=

Powered by EzPortal