地球信息科学学报
地毬信息科學學報
지구신식과학학보
GEO-INFORMATION SCIENCE
2015年
1期
31-36
,共6页
地形可视化%颜色模型%颜色渐变%光照计算
地形可視化%顏色模型%顏色漸變%光照計算
지형가시화%안색모형%안색점변%광조계산
terrain visualization%color model%color gradient%lighting computation
地形颜色渐变渲染是表达地形起伏变化或其他地学要素空间分布变化趋势的常用方法。在三维地学交互分析系统中观察分析三维地学信息时,需要依据观察位置和分析区域的范围大小不停地变化视角和视距。当观察距离很近时,利用包含一定颜色数的色带渲染地形会出现明显的颜色分层现象,不能很好地表达地形颜色的光滑过渡。针对三维地学交互分析系统对地形颜色渐变渲染的操作需求和存在的问题,分析了RGB和HSL两种颜色模型的特点,顾及OpenGL的颜色平滑过渡原理,在RGB颜色空间通过对所有颜色分量进行线性插值实现了地形双色渐变渲染,在HSL颜色空间通过固定饱和度、亮度,对色相进行线性插值实现了地形多色渐变渲染,并通过加入光照计算来增强地形颜色渐变晕渲的三维立体效果。实验结果表明:本文方法能很好地兼容OpenGL的平滑着色,实现三维交互环境下任意距离观察地形均能保持颜色之间光滑渐进过渡,达到更为光滑的地形颜色渐变渲染效果。
地形顏色漸變渲染是錶達地形起伏變化或其他地學要素空間分佈變化趨勢的常用方法。在三維地學交互分析繫統中觀察分析三維地學信息時,需要依據觀察位置和分析區域的範圍大小不停地變化視角和視距。噹觀察距離很近時,利用包含一定顏色數的色帶渲染地形會齣現明顯的顏色分層現象,不能很好地錶達地形顏色的光滑過渡。針對三維地學交互分析繫統對地形顏色漸變渲染的操作需求和存在的問題,分析瞭RGB和HSL兩種顏色模型的特點,顧及OpenGL的顏色平滑過渡原理,在RGB顏色空間通過對所有顏色分量進行線性插值實現瞭地形雙色漸變渲染,在HSL顏色空間通過固定飽和度、亮度,對色相進行線性插值實現瞭地形多色漸變渲染,併通過加入光照計算來增彊地形顏色漸變暈渲的三維立體效果。實驗結果錶明:本文方法能很好地兼容OpenGL的平滑著色,實現三維交互環境下任意距離觀察地形均能保持顏色之間光滑漸進過渡,達到更為光滑的地形顏色漸變渲染效果。
지형안색점변선염시표체지형기복변화혹기타지학요소공간분포변화추세적상용방법。재삼유지학교호분석계통중관찰분석삼유지학신식시,수요의거관찰위치화분석구역적범위대소불정지변화시각화시거。당관찰거리흔근시,이용포함일정안색수적색대선염지형회출현명현적안색분층현상,불능흔호지표체지형안색적광활과도。침대삼유지학교호분석계통대지형안색점변선염적조작수구화존재적문제,분석료RGB화HSL량충안색모형적특점,고급OpenGL적안색평활과도원리,재RGB안색공간통과대소유안색분량진행선성삽치실현료지형쌍색점변선염,재HSL안색공간통과고정포화도、량도,대색상진행선성삽치실현료지형다색점변선염,병통과가입광조계산래증강지형안색점변훈선적삼유입체효과。실험결과표명:본문방법능흔호지겸용OpenGL적평활착색,실현삼유교호배경하임의거리관찰지형균능보지안색지간광활점진과도,체도경위광활적지형안색점변선염효과。
Terrain rendering using gradient color is a common way to express spatial distribution and change of topography or other geological factors. Observation and analysis of geological information in the three-dimen-sional interactive analysis system require users to change the visual angle and distance of the sight according to the observation location and the extent of the analysis area. When the observation distance is very close, an obvi-ous stratification phenomenon will appear when using a color ribbon of selected colors to render terrain, which is unable to express perfectly the smooth transition effect of terrain color rendering. For operation requirements and to overcome existed problems of terrain gradient color rendering in the three dimensional geological interactive system, this paper analyzes characteristics of two color models:RGB and HSL. Combined with the color smooth transition principle of OpenGL, double-color gradient rendering for terrain is realized through interpolating lin-early every color component in the RGB color space respectively. And multi-color gradient rendering is achieved for terrain through interpolating hue linearly and fixing saturation and lightness in the color space HSL. In addi-tion, lighting calculation is proposed to be added to enhance the three-dimensional effect of color gradient shad-ed terrain. At last, a piece of terrain is selected to test the above methods. The rendered effects of the terrain us-ing the double-color gradient interpolation, the multi-color gradient interpolation and a color ramp with 30 colors are compared with each other. Experimental results show that these methods can provide better compatibility with smooth shading algorithms of the OpenGL library, keep smooth gradual transition between colors in a three-dimensional interactive environment when observing the terrain from any distance, and achieve smoother color gradient rendering for the terrain.