Skip to main content
gamedev.net
🔒 Locked

Geomorphing Problem

Started by Gammastrahler Dec 17, 2005 at 6:24 AM 1 replies 700+ views
Original Post
Gammastrahler
Gammastrahler
Hi, i have added geomorphing to my terrain engine to eliminate the popping effect which occurs when a terrain patch changes it´s geomipmap level. My morphing algorithm is very basic: - Linear interpolation of the affected vertices of the patch with the higher resolution, to the corresponding direction So, the morphing from the lower level patch into the higher level works fine, but when morphing in the opposite direction, after morphing is complete and the lower res patch is then rendered, then popping still occurs very heavy... how can i eliminate this? thanks Gammastrahler
TheMeatMan
TheMeatMan
Do you mean when moving away from the patch the morphing vertice is going lower than the line segment between the non-morphing vertices? If so, you could clamp the morphing value to the interpolated value before switching level of details.
Gammastrahler
Gammastrahler
Hmm, i clamp the values already.

Here is part of my code:

v is a vertex from the high resolution patch

a and b are the neighboring verticesof v that form the line segment of the reduces LOD

c is the vertex to morph from v (or vice versa, depending on LOD increase/decrease)

CVertex c = LERP(a, b, 0.5);if (increaseLOD){    node->_geoMipMap[currLevel].vertices[idx] = LERP(c, v, CLAMP(node->_geoMorph._step, 0.0, 1.0));}else{    node->_geoMipMap[currLevel].vertices[idx] = LERP(c, v, CLAMP(1.0 - node->_geoMorph._step, 0.0, 1.0));}node->_geoMorph._step += 0.7 * TIME;


[Edited by - Gammastrahler on December 17, 2005 10:31:52 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.