Ray Trace Sphere with Offset Display

I'm interested in creating a simple application like Google Earth (for overlaying my own information, and not on the huge amount of data that Google has). I would like this to be just a simple X11 application that transmits a ray sphere with biased (topographic) information. The intersection of the ray sphere is quite simple, but when the mapping of the image rushes there, it begins to become cloudy in my head.

I was wondering if there is an easy way to extend the main ray intersection to include offset data ...

+3
source share
3 answers

Displaying offsets is pretty simple - just tessellate the sphere, add offsets to the vertex positions based on the height selected from the maps, and draw the rays in all parts.

How far is the camera from the sphere / earth? If you're right at the surface, you probably shouldn't make a whole “sphere” at all, just create a “height field”. If you are far away (immediately viewing the entire planet), then even the highest mountains should not noticeably move the surface, so instead you should use a simple bump display. Think also, using a combination - rough tessellation, which is really crowded out, and display the image on the difference in the residual height.

, , , . OpenGL. , , .

+1

, Ray-Tracing - , , 20- 2k- , , . , , , .., , , , . , Ray-Casting .

, , , . :

  • Bump

, , , . , , , , - .

, - , .

0

Source: https://habr.com/ru/post/1780986/


All Articles