PDA

View Full Version : Newbie: color blending on terrain grid as triangle strip



Ultimaswc3
04-06-2013, 05:53 PM
Background:

Application: Android 3D Map
OpenGL version: ES 2.0

Problem:
I am displeased with how the application's vertex color blending looks on the terrain, which is a grid drawn using triangle strips. We apply static lightning values using a hillshade algorithm that darkens or lightens vertex color values that are packed into a buffer (lighting model not run on GPU). I have included a screen shot of some terrain in Unity which demonstrates the issue I am having (I can't post pictures of the application, but exact same issue). Just to clarify, neither the terrain in the 3D map or the terrain shown in the Unity screen shot have textures applied, just vertex colors.

*Forum not letting me add links, but here's most of the URL below:
i49.tinypic.com/2gwreb9.jpg

The picture shows the issue circled in red. Essentially the color blending looks like it is drawing a grid of dark lines with lighter patches in between.

Goal:
If possible, modify rendering to blend shading more smoothly and not produce grid-like outlines on the hills.

Recap / details:
A quick recap on how I am drawing: vertex array buffer with {position, color} pattern and a element array buffer to index each vertex for memory savings. The grid is being drawn using triangle strip in a pattern like this (I am not showing degenerate triangles):



1
2,10
9


3
4,10
11


5
6,14
13


7
8,16
15