Jump to content
The Dark Mod Forums

Brush triangle splitting


R Soul

Recommended Posts

Could someone explain the cause of this problem, and suggest the best solution?

 

Here I have a path with a slight bend:

post-2153-0-45319200-1524178803_thumb.jpg

The curved part of the wall is a mesh, with a simple set of Caulked brushes behind it.

You can see that the triangles looks unpleasant. Long thin triangles don't seem like a good thing.

 

Here's a DarkRadiant screenshot with the func_statics turned off, and the brushes selected:

post-2153-0-95998100-1524178892_thumb.jpg

All the vertices are snapped to the grid (I think I had to go down to 1 to get the path texture lined up nicely at the corner).

 

If I turn the pathway brushes into func_statics (with Caulk underneath to seal), the in game result is much nicer:

post-2153-0-54925400-1524179067_thumb.jpg

 

It works, and the AI have no trouble walking over it, but is there a better solution? I can live with this for one part of the map, but if it occurs elsewhere I'd prefer a more elegant solution.

Link to comment
Share on other sites

AFAIK, brush will always split whenever they encounter a vertex, edge, or face of another brush. The only way to avoid this, is to replace brushes with static meshes, and use brushes only as an outer seal for your rooms (with caulk).

 

That's one of the reasons why modern games moved to static meshes exclusively. Brushes are used only in prototype phase and then replaced by models.

Edited by Judith
Link to comment
Share on other sites

You can see that the triangles looks unpleasant. Long thin triangles don't seem like a good thing.

 

 

 

Is it actually causing any noticeable problems?

Link to comment
Share on other sites

Graphic cards don't like long thin triangles according to an old investigation by Humus ( former ATI employee and engine architect for Ubisoft). We could change how DMAP triangulates to force it to split more triangles if the slope gets too steep. It would cost more memory though and if we still use stencil shadows with CPU derived silhouettes it would also cost a lot more CPU performance ( the latter might be irrelevant since Shadow Maps are working in SVN ).

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

If you make a junction brush out of that corner (connecting that inner vertex on the left to the three outer verts) you should be able to remove any shear angles for how far those triangles are stretching.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

Seeing as how the engine has worked this way for the past twelve years, I would have thought we'd have seen something specific if this was an actual problem. Is there something I've missed?

Link to comment
Share on other sites

Long thin triangles are more sensitive to rounding errors. This is a well investigated numerical issue. In case of graphics this would cause the pixels to have "wrong" colors. If the strength of the errors are relatively small, it is hardly noticeable, though. From my point of view the issue is less that such triangles are created, but more the unneccessary amount of tris generated. This can easely be bypassed by seperating geometry into different func_statics (brushes and patches belonging to the same func_static will still split up each other) or even better making use of modules.

 

We could change how DMAP triangulates to force it to split more triangles if the slope gets too steep.

Actually one would do this https://en.wikipedia.org/wiki/Delaunay_triangulation

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I would say imho, that we are seeing larger and more complex maps. Far larger than the original engine ever had to deal with.

 

What does that have to do with whether thin triangles cause any visible problems?

Link to comment
Share on other sites

What does that have to do with whether thin triangles cause any visible problems?

The context or my post was that its only rescently that we are seeing bigger maps, so the engine has been fine for the last 12y wars because maps never got above a certain size or complexity.

Link to comment
Share on other sites

The context or my post was that its only rescently that we are seeing bigger maps, so the engine has been fine for the last 12y wars because maps never got above a certain size or complexity.

 

That's only relevant if we are actually seeing any visible problems, as opposed to hypothetical ones. That's why I asked if I had missed any.

Link to comment
Share on other sites

That's only relevant if we are actually seeing any visible problems, as opposed to hypothetical ones. That's why I asked if I had missed any.

The potential is that we might be, due to the larger maps pushing the engine. For example the large map I am working on, due to the amount of brush work may well be causing the engine to create a larger amount of these triangles than has previously been seen over the last 12yrs. And what context would you have been expected to be looking for problems like these? as I understand it its an engine/code issue?

Edited by Bikerdude
Link to comment
Share on other sites

The potential is that we might be, due to the larger maps pushing the engine. For example the large map I am working on, due to the amount of brush work may well be causing the engine to create a larger amount of these triangles than has previously been seen over the last 12yrs. And what context would you have been expected to be looking for problems like these? as I understand it its an engine/code issue?

 

Internet communication is hard.

 

I asked whether or not the thin triangles were creating any visible problems, given that there haven't been any reports about any issues related to them.

 

You answered by saying "maps are bigger now".

 

That's not actually an answer to the question.

 

I was looking for answers like, "I haven't noticed anything either", or "I have noticed them cause a problem; here's the circumstance where it happens", or even possibly, "even though they aren't causing visible problems, they could cause problems we wouldn't be able to easily detect, such as x, y and z.".

 

All of those are potential data points that can be used to assess whether or not the issue requires a solution, or whether it can be ignored.

Link to comment
Share on other sites

Even though they aren't causing visible problems, they could cause problems we wouldn't be able to easily detect,

That's were I was leaning towards when I suggested that bigger maps might be highlighting the issue, as in more more brushes causing more splitting and more acute triangle.

 

Anyway this going off topic a bit as R-soul was I think, looking more towards best mapping practices than anything else.

Link to comment
Share on other sites

 

Is it actually causing any noticeable problems?

Last time i tried modding on 2.05, i had problems with sliver tris in brushwork that got removed by the engine because they where long/thin enough for the engine to treat them as degenerate. The only "fix" guaranteed to work was to export brushwork as model and reimport it.

Edited by Abusimplea
Link to comment
Share on other sites

There is no (direct) relationship between the size of a mission and the generation of thin triangles. Whether those are generated depends on the geometry. And normally they will not cause any issues. The combination of a thin triangle far away from the origin (which is more likely in a large mission) may cause the issue mentioned by abusimplea. If something like this happens it is easy to fix, though.

 

But it is definetely not an "issue". There are several approaches on how to triangulate surfaces, of which some are more straight forward and some are more advanced and are designed to avoid thin triangles. They are, however, normally only used in numerical simulations, where thin triangles can cause serious troubles. For us the effect is neglectable imho.

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Thanks for the responses. My situation has nothing to do with limits; the map is quite small. I followed a hunch and deleted the pillar models and the triangles on the ground became much simpler. The model has a custom shadow mesh (with a noshadows material for the visible model).

 

Here are three images showing different setups.

1: The initial setup (custom shadow mesh, path made from brushes):

post-2153-0-50552100-1524350367_thumb.jpg

 

2: Real shadow, path still made from brushes:

post-2153-0-76777700-1524350374_thumb.jpg

 

3: Shadow mesh, path converted to func_statics:

post-2153-0-49113700-1524350381_thumb.jpg

 

It bothers me that the shdw number goes down when I use real shadows. I'd expect it to go up.

Link to comment
Share on other sites

The combination of a thin triangle far away from the origin (which is more likely in a large mission) may cause the issue mentioned by abusimplea.

I experienced it in the initial experimentation phase right after starting to use DR. The map was tiny and only had one room.

 

But it is definetely not an "issue".

For me it was - never dared to start a real map because of it (might try after getting used to Blender).
Link to comment
Share on other sites

Then the problem occoured more stronger on your end than usual. At least I have experienced it very rarely. And I have experienced missing tris on func_static in the past even if the tris were not thin, so I am not a houndred percent sure whether those things are related to each other anyways.

 

@R Soul: If you turn those pillars into func_statics, they will not split up the ground.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
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.

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.

  • Recent Status Updates

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...