www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: airfoil on June 11, 2014, 12:59:31 pm

Title: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: airfoil on June 11, 2014, 12:59:31 pm
 :DHello,
I am a android app developer and want to make 3d terrain map using ASTER-GDEM(GeoTiff) file.
I find the following three samples.

1. appropriate 3d terrain generation source code from DEM files.
2. method or class of reading GeoTiff files.
3. method or class of applying on and offline map texture.

Thanks for advance.
SH.Woo
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: EgonOlsen on June 12, 2014, 08:42:25 pm
I'm not sure what your actual question is? If you ask if there is some magic class that does this, then i don't know of any.
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: airfoil on June 12, 2014, 09:08:48 pm
Dear EgonOlsen
Sorry for bothering you.

My question is too broad because I don't know anything.
Now, I am making a concept for my project.
Anyway, I want to change my question on detail or smaller.

1. How can I apply vertex array to plane?
2. How can I make group of plane? (Object3D mergeAll ?)
     When I mergeAll several Object3Ds, what is each Object3D's positioning method?
3. Is there different between plane's quard and mesh concept?

At first, here only. my question is poor yet.

Thanks
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: EgonOlsen on June 12, 2014, 09:19:45 pm
What do you mean by "apply vertex array to plane"? Dynamically alter a plane to that it forms some landscape or create an Object3D out of some vertex data at load time or...?
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: airfoil on June 12, 2014, 10:01:47 pm
I want to make a app like below picture.
(http://hangglider.co.kr/Auxiliary/Screenshot_2014-06-13-04-43-47.png)

The online map is consist of several tiles.
When I do zoom in or out, resolution of the tiles(plane) is changed for speed and detail focus.
Online map tiles(texture) and tile's vertex resolution is also updated.

ElevMaps app show excellent performance. But my project target is over it.
More detail terrain 3d map, track play, replay flying, etc...

What is your first tip for this project target?
I will start to study from that point.

Thanks
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: EgonOlsen on June 12, 2014, 11:12:31 pm
Sounds like a piece of work.... ;) There's a way to modify a mesh by extending the GenericVertexController. I would start with creating a plane with the desired polygon count and modify it based on the height map (asuming that you have something like this). That's one way of of adjusting a mesh at runtime. Creating new objects for each zoom level will be too expensive in terms of memory on processing power. The fastest solution might be to do the calculations in a shader instead that gets the height information as additional vertex attributes and applies them. But that means that you have to dive into GLSL as well. If you want to avoid that for now, i would try my luck with the GenericVertexController approach. Maybe encapsulated in a way that it's easy to replace it with a shader based approach if that's ever needed.

BTW: This seems to be similar to this: http://www.jpct.net/forum2/index.php/topic,3782.0.html (http://www.jpct.net/forum2/index.php/topic,3782.0.html)

Edit: Typos...
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: airfoil on June 18, 2014, 05:29:42 am
Dear EgonOlsen
Thanks for your correct answer.

Now, I can start my porject and I am trying to compose test code.

Here, I have a question.

1. If I use just one plane(have 75*75 mesh), how I can apply to several map tile texture?
    That plane will has 25(5*5) tiles. So, I have to add 25 map tiles into a plane at runtime.

2. I want to implement bird view mode. So, each rotateX, rotateY should be worked as limited angle or axis.
    For example, the plane has fixed camera position and should move only around center vertical axis and viewed X axis.
    Do you have an idea?

Thanks in advance.
SH.Woo
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: EgonOlsen on June 18, 2014, 07:18:03 pm
I'm not sure what you mean exactly by the first question...
And almost the same applies to the second one. Do you want to rotate the camera or the plane? And what's the problem with doing so?
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: airfoil on June 18, 2014, 10:34:08 pm
(http://hangglider.co.kr/Auxiliary/question_tile_birdview.png)

I explain my questions again as above images.

1. A plane is consist of textures of 25 map tiles. each map tile will be downloaded in each thread.
    And the plane has 75*75 mesh. So I want to insert a tile to 15*15 mesh of the plane.

2. I don't want to move camera position. It's clear. I just move the plane on the above 2 axis.

Thanks in advance.
SH.Woo
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: EgonOlsen on June 19, 2014, 09:18:33 am
I'm still not sure what the actual question is...mainly because i'm not sure what the input format actually is. Do you have a height map or some mesh data or what? If it's a height map, i would create a plane of the required size and polygon count and modify it based on the data from the height map by using the IVertexController approach that i described above.
About the rotation...I think that the map consists of multiple planes/parts? If so, the best approach might be to create a dummy object and place it at the desired rotation pivot in world space. Then make all map tiles children of that dummy object and rotate the dummy to rotate all map tiles at once.
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: airfoil on June 19, 2014, 02:18:55 pm
Sorry for bothering you.
Every time, a wise answer to a silly question.
Anyway, question 2(rotate on plane's pivot axis) was solved.

Solution was this : mapPlane.rotateAxis(mapPlane.getZAxis(), touchTurn); mapPlane.rotateX(touchTurnUp);

About question 1:
Yes, I have a height map. But I use sample height map currently. Next time I'll make the real height map.

mapPlane = Primitives.getPlane(75, 1);
mapPlane.setTexture("mapTiles");

As above code, I can apply only one texture to a plane.
I want to apply several textures(matrix) to a plane.

The following is my current level.

(http://hangglider.co.kr/Auxiliary/egg.png)
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: EgonOlsen on June 19, 2014, 07:00:36 pm
You could create several smaller planes (one per texture), assign the textures and then merge the objects into one. You just have to make sure that they have been translated correctly and that the translation has been made permanent (translate/translateMesh). Another solution would be to use the PolygonManager on the plane. But this has to be done before calling build().
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: atreyu64 on June 24, 2014, 04:13:11 pm
Hi, it's really funny that I've just come across this topic right now, because I may soon have to develop an app using a much more bigger area than I had before.
So I was thinking of using "Geomipmapping" or other solution to load dynamically a huge terrain (huge model and huge texture, from real world).

I've given Ardor3D a try because it implements a solution ( https://github.com/Renanse/Ardor3D/wiki/Terrain ), but I'm giving up as it's poorly documented, much more difficult to use than jpct, and seems to be kind of obsolete.
So for now I don't know how to do it, I'll maybe just keep things static but try to reduce mesh / texture as less as possible, as the app would only have to run on a recent PC (no android version planned for now).
By the way do you know a GPU allowing to load textures bigger than 8192² ? And is there a limitation in the max number of polygons in JPCT / OpenGL ?

Anyway, I'm still working on my other apps (with reasonable mesh and texture sizes...), I've developped an editor allowing to pick/modify hiking ways (polylines), to create and place signs (billboards), etc... so as my partner (not a computer scientist) can at the same time create contents easily.
We still plan to release theses apps (one app for each montainous region) as soon as possible, but we really want to polish it a lot and it takes some time... I'll keep you in touch !
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: airfoil on August 24, 2014, 07:20:14 pm
Dear EgonOlsen
Long time no see. around 2 months.

My project is on final stage.
But there are the following many problems.
Last your simple comments are very helpful and correct.
Please, give your help again.

<Developing story>
1. To develop ASTER(world terrain elevation model) tile base service.
2. Flight track loading.

The following image is current level.
(http://wsh.myds.me/Auxiliary/Screenshot_2014-08-25-02-04-22.png)

The problems are...
1. JPCT loading time is too long.(around 10 seconds..)
    Resuming is also too long.
    Is there the solution for reducing loading time?
2. Track polylines is about 20,000~50,000 lines.
    I have to use different color in each interval. So I used polyline array.
    Finally, FPS is lowest.
    Polyline redraw is too heavy work in android phone.
    Is there any solution?
3. Even though this 3D track view activity was finished, when I restart the activity, many problems comes out.
    How can I destroy GLSurfaceView clearly?
Title: Re: How can I make Geomipmapping 3D terrain from GeoTiff(ASTER GDEM)+online map.
Post by: EgonOlsen on August 25, 2014, 07:45:49 am