View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005486||The Dark Mod||Coding||public||05.01.2021 18:18||08.01.2021 04:53|
|Product Version||TDM 2.08|
|Target Version||TDM 2.10|
|Summary||0005486: dmap: close vertices due to numeric errors, and bloomed sparklies|
|Description||Dmap seems to generate very close vertices, and consequently sliver triangles.|
These triangles have different attributes (normals?), hence specular highlight is very strong on them.
They look like "sparklies".
If bloom and 64-bit color are enabled, then sparklies turn into large over-bright spots.
|Steps To Reproduce||1) Choose NHAT fm.|
2) Run: dmap politics.
3) Now: map politics
4) From starting area, go ahead and turn left on the first occasion.
The fence is bad: it has very close vertices, and very sliver triangles.
And probably also sparklies.
|Additional Information||Originally reported here:|
|Tags||No tags attached.|
Found that svn rev 8558 broke it (TDM 2.08):
Date: 2 февраля 2020 г. 23:32:15
0004957. Reduce chance that close vertices would be snapped to different points in T-junctions removal.
Note the T-junctions removal algorithm also serves as a generic mesh cleaner.
It snaps triangle vertices exactly to each other, so that further mesh processing could work reliably.
The problem is that when vertex is snapped to some grid point, its coordinate is rounded to the nearest of two snap points.
If model has vertices exactly at the middle between snap points, then they get snapped into different directions depending on roundoff error.
Having vertex with coordinate (2*integer+1)/64 is quite likely in a real model.
The fix is to shift coordinate slightly, so that it gets rounded down in such cases.
Modified : /trunk/tools/compilers/dmap/tritjunction.cpp
nhat3_redmapped_flashes.jpg (813,400 bytes)
Added test map to SVN: maps\test\dmap_tjunc_nhat_fence.map
Added test map to SVN: maps\test\dmap_tjunc_newjob_sign.map
Added test map to SVN: maps\test\dmap_tjunc_stlucia_rope.map
The fence from "No Honor Among Thieves" uses custom material.
When extracting test map, I replaced it with stock material using the same textures.
As the result, I don't see such bloom-magnified plasma particles =)
Instead I see small bright sparklies running along edges of the fence.
The sign from "New Job" is also added as test map.
It is the entity which has mentioned related to the original "fix" (which broke this fence):
The problem is the same: sliver triangle on the top of the sign.
It is even displayed as bright white line, supposedly showing the same problem as the fence.
The last test map is from "Saint Lucia".
It has a rope right in front of the player, which has a very sliver hole in it.
It seems that the rope is composed of brushes, and I guess this hole happens due to close input vertices snapped to different hash vertices.
Regarding the rope: it is hardly fixable.
The problem happens due to "optimize" algorithm removing collinear vertices.
This algorithm works independently on every planar piece of the entity, and can remove almost collinear vertices, shifting boundary by up to 0.1.
It is possible that closed triangulation becomes non-closed due to this shift, introducing sliver holes of very low width.
I have no ideas how to fix it (disabling optimization would help, but is hardly an option).
|05.01.2021 18:18||stgatilov||New Issue|
|05.01.2021 18:18||stgatilov||Status||new => assigned|
|05.01.2021 18:18||stgatilov||Assigned To||=> stgatilov|
|05.01.2021 18:19||stgatilov||Note Added: 0013380|
|05.01.2021 18:19||stgatilov||Note Edited: 0013380||View Revisions|
|05.01.2021 18:20||stgatilov||Note Added: 0013381|
|05.01.2021 18:20||stgatilov||File Added: nhat3_redmapped_flashes.jpg|
|05.01.2021 18:20||stgatilov||Relationship added||related to 0005137|
|06.01.2021 04:28||stgatilov||Target Version||TDM 2.09 => TDM 2.10|
|06.01.2021 05:12||stgatilov||Relationship added||related to 0004957|
|07.01.2021 05:45||stgatilov||Note Added: 0013416|
|07.01.2021 05:59||stgatilov||Note Edited: 0013416||View Revisions|
|07.01.2021 11:27||stgatilov||Note Edited: 0013416||View Revisions|
|08.01.2021 04:53||stgatilov||Note Added: 0013426|