Holes in between adjacent faces. [Procedural geometry]

Hi to all,

I am generating procedural geometry and for some reason, there appear to be holes or empty lines in between two adjacent faces at certain points as I move around the scene; sometimes they show, other times they don’t. I tested it on both an old and new computer and the error exists in both computers, albeit it is more patent in the older computer than the relatively newer one. Here is the error as it appears in the old computer:

The specs for the old computer:

OS- Windows xp professional 32-bit (5.1, build 2600)
system model: dell optiplex 360
Processor: Pentium (R) Dual-Core CPU E5300 @ 2.60 GHz (2 cpus)
Memory: 1024 MB RAM
Directx version: 9.0c (4.09.0000.0904)

Intel(R) G33/G31 Express Chipset Family
Chip Type: Intel(R) GMA 3100
Total Memory: 384 MB
AGP Texture Acceleration: none

Main Driver: igxprd32.dll
Version: 6.14.0010.4957
Mini VDD: igxpmp32.sys
DDI version: 9(or higher)

And here is the error as it appears in the newer computer:

Another one from the newer computer:

Specs for the newer computer (a laptop…):


OS- Windows 8.1 Pro 64-bit(6.3 build 9600)
System model: HP 2000 Notebook PC
Processor: AMD E-350 Processor (2 CPUs), ~1.60 GHz
Memory: 3072MB RAM
DirectX version: DirectX 11


AMD Radeon HD 6310 Graphics
Chip Type: AMD Radeon HD 6310 Graphics (0x9802)
Memory: 1526MB
AGP Texture Acceleration: enabled


Main Driver: aticfx64.dll,aticfx64.dll,aticfx64.dll,a
Version: 13.251.9001.1001
Feature Levels: 11.0,10.1,10.0,9.3,9.2,9.1
Driver Model: WDDM 1.2

Now I understand if the error can’t be helped with the older computer since I’d probably be advised to move on from such antiquated systems (though I am intentionally using it so that the game I’m building has, in terms of system specs, a really low barrier to entry) but as you can see, the error still exists in the newer computer. I am using this version of Panda3d :

 - 2017-12-12T22:27:51Z

and I have not set any special settings on the config file. What could be the issue?

Thanks in advance.

Just to add, the faces are completely adjacent, as you can see below:


Another one featuring empty lines, on the old pc:

So where one face ends, another starts, the faces share edges.

Does it help if you add this line to Config.prc?

depth-bits 24

(or even 32)

No it does not, the error still persists:

The error is really negligible in the newer computer, it only shows minutely and I doubt the player would notice it. However, on the older computer, the error at times is visible on a large percentage of the model. I’ve attached a .bam version of a sample model produced procedurally in-game that you can view using pview, if that helps in any way:
dot_line_error.zip (165 KB)

I don’t know if I should be too worried about this, since it could be that most players have computers that are much more powerful than the one I’m testing the game on.

Thanks in advance.

Hi :wink: !

Well, I checked out the attached model on my machine and although it has a fairly good graphics card (NVIDIA GeForce GTX 750 Ti), I also notice the artifacts.

But the (potentially) good news is, that it can be fixed, although it will likely require you to build your geometry a bit differently. It seems that simply ensuring that vertices of shared edges have exactly the same positions isn’t enough; I created some adjacent quads with integer dimensions and positions, but I saw the issue as well. Only when all triangles are effectively connected within a single Geom does the problem seem to go away.

To check your terrain (which, without 2-sided rendering, looks like a Picasso, from his Triangle period :smiley: ) I imported its central geom into Panda3D Studio, where I replaced the disconnected triangles with new, connected ones. You can examine the resulting model attached below; it contains two versions of that central terrain piece, a more or less exact copy exhibiting the problem, and a scaled-up version that should look correct (I set the color to black so the bright background artifact pixels are easier to notice).

Fixed_terrain.bam (84.3 KB)

Not sure how useful this is, but I hope it can help you in some way.

Happy holidays :slight_smile: !


Happy Holidays,
Well, thanks for the help your advice does work, though as I said, the dots/lines aren’t that noticeable on my laptop. I only saw them because they were noticeable on the older computer and thus I was consciously looking for them when I tested the game on my laptop. I therefore have to ask, when you viewed the sample model on your machine, were the artifacts painfully obvious? Or were they negligible? Not gonna lie, it’s going to be a bit tough to go back and make the necessary changes in the main project :frowning: so please tell me it’s not that bad. :cry:

Also is this normal behaviour? That there are artifacts even when separate faces have points that share coordinates, and these artifacts only disappear when they not only share coordinates but are also part of the same geom? That doesn’t seem right to me…but if that was how the engine was designed I guess we have to live with it, of course I’m not complaining, I’m thankful that an easy to use engine like Panda3D exists, but some parts of it can be challenging in terms of subtleties like this one…

Don’t know if I should take that as a compliment… :confused: But criticism is always welcomed if it helps, though it’s too early to call that the final terrain-style…


Nah, it’s not really that bad; it’s just a couple of pixels here and there (never lines, like on your old PC).

One way to lessen the effect could be to place a single geometry quad, the size of the terrain, beneath the terrain and apply (a low-resolution version of) the terrain texture to it. The effectiveness of this approach will probably depend on the viewing angle and the lighting of the terrain.

Personally I can’t really say if this is expected behaviour or not, but I wouldn’t immediately blame Panda, as it’s more likely to be a problem related to how OpenGL renders adjacent polygons.

No, I wasn’t talking about the style of the terrain, but rather about the alternating facing direction of the triangles, like this:

Sorry for the confusion!

Ok, I did think of doing that too but I think your suggestion of connecting triangles together would be the way to go in the long-run, even though it’d require me doing a few changes here and there.

Alright it’s all good. Thanks for the help as always.

This is well-known problem of T-junction. In short, if 3 vertexes A, C, B lay on a line, where A and B belong to one triangle and C belong to others, interpolated screen-space coordinates between A and B not always exact match of calculated screen-space coordinates of C and you have pixel-wide gap. For more details google “T-junction mesh”

Best regards.