Jump to content
sixbyseven

BSP-Style level construction tool for Unity

Recommended Posts

I haven't had a chance to dig into this yet, but you mention using Hammer as a reference - have you spent much time with Radiant? It's a good bit less polished than its peers in Hammer and UnrealEd, but the speed factor is virtually unmatched for raw construction, mostly by removing the need to switch between different tools and modes as often. Might be some valuable reference there.

That said, great work! I think people are too quick to dismiss BSP-style construction these days; there's so much value to rapid in-editor building.

Interesting- I'll look into this! Any particular features that you liked best?

Share this post


Link to post
Share on other sites

Well this is neat! I have been thinking of moving to Unity lately. BSP takes a lot of flak sometimes because the technology behind it is outdated, but who doesn't want to build the level in the level editor, and who doesn't want to make walls out of walls? I really like the way your manipulation tools look to function.

Radiant made my mind break back when I was new.

Share this post


Link to post
Share on other sites

so there is a free try it out version now ? than i shall try !

Great! :D

Well this is neat! I have been thinking of moving to Unity lately. BSP takes a lot of flak sometimes because the technology behind it is outdated, but who doesn't want to build the level in the level editor, and who doesn't want to make walls out of walls? I really like the way your manipulation tools look to function.

Radiant made my mind break back when I was new.

Thanks for the compliments- other than functionality, the goal of ProBuilder was to be really, truly, simple and easy to use. And yes, BSP takes a lot of flak unfortunatly, but this system doesn't come with the need for portals/vis blocks/etc, so it should be much simpler for everyone.

Share this post


Link to post
Share on other sites

i watched your videos ( havent tried the tool yet) and i have some "concerns"

-PERFORMANCE o/ the way it looks from your videos (being able to assign materials per face and the unity vising making individual faces of a cube dissappear) id assume that every one of your cubes adds 6 drawcalls to the scene ? ( make that 2x or 3x depending on dynamic shadows being used). thats too much ! everything that has the same material within a "visleaf" or what ever untiy calls its vis zones needs to be merged into one drawcall.

-PRIMITIVES the steps of your stairs are really awkwardly build out of overlapping cubes rather than wedges do you really only support cubes at the moment ? you need wedges and cylinders man ! in fact any kind of convex geom should be doable. and they should be created with:

-CUT TOOLS manipulation beyond moving verts would be nice because in hammer i almost exclusively use the clip(cut) tool and in unrealed the extrude function (at least back in the day) a bit more advanced manipulation would be great :)

-COLLISION when i first heard of this tool my thought was: "i wonder how he handles the collision for this he cant just assign mesh colliders to every brush that would ruin the physics and the async level loading" but from your videos it looks like you do -_- mesh colliders introduce a huge amount of lag when you do background level loading merging all the geom of a room/zone/visleaf and just assigning one mesh collider would be better but really every primitive that is still in "cube" form should get a cube collider they are much fast and less laggy during async level loads and they fuck up the physics less frquently too.

LIGHTMAPSPACE. the way you have it right now every brush is essentially a func_wall or a func_detail and nothing really gets merged/culled so a large ground plane covering multiple rooms and corridors will get a lot of wasted light-map uv space. i think in order to avoid this you will need:

-CSG/MERGING this would fix a lot of the before mentioned problems to be able to do fast physics and reduce amount of draw-calls and not waste any light-map space you have to introduce a "pre-calculated csg step". no matter how much i hate pre-calculated stuff there is a reason why its done that way ... but compared to lighting and vising csg in other engines is lightning fast

i love that you are heading down this road ... unity really should have shipped with this functionality !

Share this post


Link to post
Share on other sites

Awesome write up Warby. That must have hurt like hell for you typing that up.

I agree on all points except the last bit about unity should have shipped with this functionality as I think that would take away from the fact that unity is made to work however you like and don't force you down a path of how to make your levels.

Share this post


Link to post
Share on other sites

Okay, proper response:

-PERFORMANCE: you are 98% correct, and this is a (if not "the") major focus of v2.0. Currently, Unity will batch all static meshes that have the same material, down to one drawcall. So, and I've tested this, 3000 boxes with 18,000 sides, will batch down to 1 draw call if 1 material, 2 if 2, and so forth. However, that all goes to (bleep) in a handbasket the instant you add in pixel lights, multi-drawcall shaders, and even lightmaps (though, that's a Unity bug). At that point, you end with applause-worthy drawcall numbers, and a lunchbreak between frames, heh.

So what is being done about this? Well for one, in v2.0, there will no longer be the current method of seperate planes- all ProBuilder objects (hint: more than cubes!) will be procedurally-built meshes, and instead of seperate "planes" will employ sub-meshes for per-face materials. Yes, I realize a sub-mesh has the same drawcall hit as a seperate mesh, however it allows for much, much better batching and all sorts of other exciting things. Related to this, it means the ability to "collapse" groups of objects down to a single mesh object, prefab and instantiate that object, and even un-collapse that object for further editing! I am ridiculously excited for this :D There will also be "auto-collapse" groups the user can create, something like visleafs, wherein the user will designate a group of Objects to collapse into a single mesh at build-time (or when hitting the "Play" button, but NOT on "Start()", no in-game hit). Again, the submesh drawcall applies, but this shouldn't be a major issue. For example, if you make a pillar from 16 boxes and 2 materials, it will collapse to 1 mesh, with 2 submeshes, thereby 2 base drawcalls and some seriously fine texturing due to the tiling and control. Of course, a savvy builder would find a way to do such a thing with just 1 material, but just for example...

-PRIMITIVES: absolutly- this is another feature I'm really, really excited for. Since v2.0 will create all it's geo procedurally, there will be cylinders, tubes, triangles, arches, stairs, and more, all with the ability to set resolution of the mesh and other options, just like good 'ol Hammer does it.

-CUT TOOLS: here, I have to say...maybe. At the 3d studio I worked at till recently (www.studio2a.net), we called the Boolean tool "the evil one", and it was only used when there was absolutely zero other option. Clipping and cutting creates really, really nasty geometry when used incorrectly, and it's really easy to go crazy and do just that. In fact, on TF2maps.net, I believe they also regard it as generally evil and a no-no, except in very skilled hands. Personally, I never used it in Hammer, and never missed it. Oh, it also would be seriously tough to implement- but that part actually makes me WANT to add it in, ha, love a good challenge. So...maybe.

-COLLISION: Could you link me the supporting docs on this? I was not aware of that limitation. Seems very odd, since everything in Unity is mesh-based. Perhaps I'll have to figure out a "build collision" that would build one collision mesh from multiple boxes. Very doable, with the new system. Generally though, I wouldn't expect people to create complex collision requiring many boxes with this- just like hammer, you should only be building simple player clips, ramps for stairs, wall collision, etc. This does sound an issue though, and thanks for bringing it up!

-LIGHTMAPSPACE: Hmm. Wouldn't you would want to create multiple sections so the vis leafs could break things up properly? It's entirely possible that I remember that incorrectly, it's been a while since I worked in-depth with Hammer, sadly. Regardless, yes, some sort of merging/CSG/pre-calc would be great, that's partially where the "Auto-Collapse" groups are aiming. If you have any thoughts on how to best implement this, without going full-BSP (impossible for me technically, would infuriate and put off new users just coming in). Vis leafs and portals and hint brushes etc, I remember there was so much to optimizing in Hammer that it was just crazy as a newcomer. True, it did make for some amazingly efficient games/levels, but I hope to strike a compromise in the sweet spot- very easily usable with good enough performance for starters, but plenty of under-the-hood tweaking and optimizing available for those who know/care to really dig in and squeeze every last bit of FPS from the system.

Thanks again Warby!

PS, When I said (I think I said) "ProBuilder is being rebuilt from scratch", I meant exactly that- the ENTIRE code base is being scrapped for brand new. Even moving from Javascript to C# for every little performance boost and extra low-level capabilities. Also, I am honestly just an artist who wanted this tool so badly, I taught myself Unity editor scripting as best I could to create this tool to the best of my abilities, in a reasonable amount of time. For v2.0, I have found a "real" developer to do the heavy lifting, and build this thing proper- It's going to be a whole new beast!

Share this post


Link to post
Share on other sites

About the MeshCollider performance hit.

We noticed it on ponh when we loaded in levels we'd get a huge spike right as the progress reached 100% and it turned out it was because we used meshcolliders on everything. Then we set out to replace what we could with primitive colliders such as box colliders and cylinder and it turned out to be a hell of a lot better performance wise.

Share this post


Link to post
Share on other sites

PERFORMANCE AND SUCH: glad to see that you are on top of things and being an artist first before doing this ... thats even more impressive !

CUTTOOL: when i am talking about cut tool i dont mean carving/booleans i mean this tool were you draw a line and it splits the brush into 2 along that plane as long as you do that on the grid its perfectly safe and the extrude functions from unreal are perfectly safe too. ... so yeah stay away from the carving !!!

COLLISION: i dont think there is any documentation where unity warns of the dangers of mesh colldiers regarding physics fuck ups or async level loading we learned about it the hard way.

LIGHTMAPSPACE: yeah this is a lesser issue because it can be bypassed by working more clean and to answer your question YES i would build a separate fitted ground primitive for every cooridor and room ( probably more than one for all sorts of trims and decorative shit on the ground ) .... but the average joe might not and than blame your tool if lightmaps get inffecient/lowres.... but really if it forces the noobs to become better .... than i am actually all for that ^^

keep rocking man !

Share this post


Link to post
Share on other sites

-Thanks :)

-Ah, gotchya. Sounds like a good option!

-Unity seems to have a lot of little pitfalls like this, heh

-Okay, good to know I still remember!

Some exciting updates coming soon, regarding 2.0 progress, will post when that happens :)

Share this post


Link to post
Share on other sites

I saw this yesterday and this looks like an exciting tool !

Too bad I prefer the UDK for my project, but prototyping with this would be very cool and fast.

(I always feels that Maya and other 3D software could gain some cools tools just by looking at how Hammer create game geometry)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...