-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export Connected Mesh as a Patch *(Pls read) #21
Comments
try to fork to fix |
|
In principle: yes, whatever geometry you have in Blender can be exported to brushes without any loss of detail (in 'Faces' mode). Some things could need more work, but mostly very specific stuff, and usually there's a workaround. For instance, X-shaped foliage wouldn't work as a single brush entity, wall decals wouldn't work as worldspawn brushes, etc.
Yes, that's what 'Brush' mode export is for.
Unlikely. I'm seeing loops all around. There might be some specific way for grid topology to emerge from triangulation, but at that point you're not even treating all edges as equals, you're relegating actual silhouette-forming geometry to second class.
Well, wires are not convex, what do you expect? At best you'll get as many cross-sections as there are vertices length-wise. |
There is another (degenerate) triangle in your last image. Meaning that combined with the "enclosed" triangle it forms a quad. Meaning that by your rules, you should be able to lay it out as a grid. |
I'll make my point about edges again, visually. Let's say you've lucked out and your mesh neatly fits into a grid, with no edge splits required. But then the engine might have other ideas about what the grid represents. triangulation.mp4You don't control how the game will triangulate patches, so you don't have the luxury of ignoring "load-bearing" edges. Each triangle has to be treated as a whole quad, there's no way around this. All my other points still stand too. And as a side note, even the assumption that we can stack duplicate verts (to patch up missing corners and triangles) may be flawed. For all I know, lightmappers could interpret that as occlusion and fill it with shadow. |
We've been over this. Not impossible, but:
I've shown it with the icosphere. It means you add another vertex somewhere.
I wouldn't have to believe it if you just showed them fitting on a grid.
Like I said: you don't control it. One game might be doing it one way, another might do it differently, yet another might switch its method in a patch tomorrow, and GPU drivers might also be involved at every step. |
First one merges triangles, but okay, let's ignore that for now. Third one has been misread. Like I said, it's identical to the second one.
If the caulk sides are facing up/out, your Blender geometry might have flipped normals, or negative scale. The walls seem to be missing, possibly grid snapping set too high. |
'Brush' mode is for quite specific cases, I don't expect imported bsp to be one. Use 'Faces' instead.
Powerlines "should" be four 9x3 patches, but you won't get any better than four 9x200 patches from this input. Consider changing input. |
Wouldn't the brush count be significantly less? |
So if you were to add a vertex at every edge of a triangle that is shared by a neighboring triangle / add a new corner to every triangle that neighbors a quad you'd basically have a quad-based mesh, assuming the mesh originally was made of only tris and quads? bandicam.2024-02-05.13-50-29-673.mp4 |
I think I found a way to represent pretty much every connected mesh (whatever you'd actually call that) as a patch. Use the following Blender operations on the scene with the specified settings:
Quad Method: Longest Diagonal
N-gon Method: Clip
I think what was making it impossible were those t-junc verts created at bsp compile.
With the current method of exporting each face as a patch I get 156,911 brushes in my map file, whereas with the proposed method I could get roughly between 700-1500 brushes.
So basically then the only problem is fixing irregular mesh / mesh with divots at what should be corners. Any part of a mesh with the 'lightning' shape is what needs fixed. I'm working on that solution I just don't have time at the moment since I have to go to work. But basically you fill where the corner should be with necessary vertices then apply the 2 steps above to the new mesh.
Something like this won't work because the faces don't all meet (left hand side cut-quad doesn't meet the right quad with
its entire length):
Whereas something like this should work:
The text was updated successfully, but these errors were encountered: