Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Mar 2012
Offline Last Active Feb 10 2014 06:39 AM

Posts I've Made

In Topic: 3D complex polygons rendering on a sphere with GLU tessellation routines

09 February 2014 - 08:25 AM

After more research, it looks like you can just define a combine callback (GLU_TESS_COMBINE) and calculate a proper Z coordinate (radius away from center of sphere). I've never used GLU, so no promises. If that doesn't work, you could always just manually tessellate. Have you tried that and run into problems? I suspect there might be more people familiar with tessellating than using GLU's tessellation process. If you haven't tried, it's probably a lot easier than you might fear.


After tessellating, you might need to make sure the sphere doesn't bleed through. You can do that by making the continents higher than the sphere (radius + fudge factor away from center of sphere). I'm not sure just prioritizing continent data will get rid of all the bleed for this specific situation, but I guess you could try. You can either turn off depth buffer or do it in the shader or render the sphere to texture and use it as a skybox or any other way. But I'm betting for this situation you'll wind up just protruding the continents from the sphere.

Thanks, I will do some research on tessellation first.

In Topic: 3D complex polygons rendering on a sphere with GLU tessellation routines

07 February 2014 - 06:16 PM

The picture below shows what we have done in rendering continent in white and ocean in blue with GLU tessellation routines.




We need to do the same (shading continents in white) in 3D but have not figure it out.


In Topic: 3D complex polygons rendering on a sphere with GLU tessellation routines

07 January 2014 - 03:43 AM

The projection mentioned in my previous post is cartographic projections, not projection matrix.

The problem with the mesh method is that GLU tessellation routines work for polygons, not mesh. I wonder if OpenGL support triangulation of a mesh.

In Topic: 3D complex polygons rendering on a sphere with GLU tessellation routines

06 January 2014 - 08:15 AM

Why not just process the input data and separate the polygons into continents and non-continents before rendering? It would give you a lot more flexibility for future improvements, especially when you start wanting more classifications than just continent and non-continent. Then you can just draw the polygon data in a normal way, and apply any post-processing you might dream up in the future.


I just want to make sure you really do need to do render-time computations since it will be a lot harder and a lot less flexible. Continent boundaries don't change very often, so it just feels like this isn't something that benefits from information only known after you render.


Thank you for further discussion. Actually the polygons of the input data all represent continents. Among them, a small portion of polygons are continent boundaries and therefore of large length, whereas the rest (usually hundreds of) are all island and peninsular boundaries and of small length.

Let's take a look at a large polygon for example representing north American continent. As all the vertices of a polygon are on its boundary, the tessellation of this polygon is just a plane. So a possible solution is to make a mesh from a polygon by adding some vertices inside the polygon.

As to why I choose render-time computation, there are two reasons. First, we need to draw on the planet surface other iregular polygons, whose boundaries tend to change from time to time. Typical examples of these polygons are rainfall/drought/forest regions. Second, users may change projection types at runtime, which cause recalculation of boundary vertex coordinates.

In Topic: 3D complex polygons rendering on a sphere with GLU tessellation routines

05 January 2014 - 10:07 AM

http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/ is a simple tutorial covering render to texture.


I'm not sure the result is going to look right though. You're rendering concave results from GLU tessellation, so generating a texture from that to slap on a convex model doesn't sound right.


Can you explain how you're generating the data (what input data you have) and some of your thinking? It kind of sounds like you're just coming at this problem with the wrong tools, but I can't even tell if you're using a 3d model program, using procedural generation, or getting it from an external source for the "complex polygons" you have.


I am sorry for being so late to reply. I was sent on-site to our client to fix bugs in our system in the past two weeks.

What I want to do is just draw the continents in a different color (e.g. white) from the Earth surface color (e.g. light blue). The continent boundary data can be obtained from either authoritative agencies or open source GIS projects. The data is encoded in ISRI shape format and consists of thousands of complex polygons.