Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
3D landscape sample code, and an odd graphical artifact - Gideros Forum

3D landscape sample code, and an odd graphical artifact

I'm attaching a sample project that creates a 3D landscape mesh from a heightfield image.

It generally works as it should, but I'm seeing a small, broken line of pixels in the top left corner of the screen that appear to correspond to a partial cross section of the mesh, possibly a slice on the Z axis. The greater the height of the mesh (range of Y values) relative to its horizontal size (range of X and Z) the farther down the screen these stray pixels appear. If the mesh has a height near zero, the pixels appear on the top row of screen pixels. If the mesh is relatively tall, those pixels may appear quite far down the screen. Here's a screenshot where those pixels are visible in the top left, curving like a slice of the landscape:



The code creates a Wavefront .obj file representing the landscape, then uses objloader.lua from the Graphics3D/3D-Horse example project to load that object. The object file doesn't contain any misplaced vertices or any values that would seem to account for the stray pixels.

The stray pixels don't necessarily cause much trouble, since they appear to be drawn at a very high value of Z, that is, very far from the location of the viewer. If we add a skybox to the scene, it appears to occlude the stray pixels and it looks fine. Still, it's an odd artifact. It could means there's an issue in Gideros, an issue in OpenGL, or perhaps this is expected behavior due to some aspect of one or the other that I don't understand.

Anyone have any thoughts, or experience anything similar?

Paul

PS - Feel free to use the landscape code.
Tagged:
+1 -1 (+4 / -0 ) Share on Facebook

Comments

Sign In or Register to comment.