VTM render 3D Model

165 views
Skip to first unread message

Longri, Andre Höpfner

unread,
Sep 13, 2016, 9:21:10 AM9/13/16
to mapsforge-dev
Hi
I have seen that it give a 3D model from a tree. 



This 3D Model are loaded on org.oscim.test.gdx.poi3d.Poi3DLayer but with run Gdx3DTest it will never show!  
Any suggestion to show a 3D Model on a Layer! 

My Target is to render a 3D Model on my own position, like this:


Emux

unread,
Sep 13, 2016, 9:28:07 AM9/13/16
to mapsfo...@googlegroups.com
On 13/09/2016 04:21 μμ, 'Longri, Andre Höpfner' via mapsforge-dev wrote:
This 3D Model are loaded on org.oscim.test.gdx.poi3d.Poi3DLayer but with run Gdx3DTest it will never show! 

Are you sure?
Here is a screenshot from Gdx3DTest (see the tile coordinates).

--
Emux
trees.png

Longri, Andre Höpfner

unread,
Sep 13, 2016, 11:27:11 AM9/13/16
to mapsforge-dev
Thanks for fast answer.
I will check again with this coordinates.

Longri, Andre Höpfner

unread,
Sep 17, 2016, 2:46:48 AM9/17/16
to mapsfo...@googlegroups.com

Ok, you are right, the trees will be render!

So please give me a hint to set the right transformation to a 3D object that I can see this object on my location.


2016-09-13 17:27 GMT+02:00 'Longri, Andre Höpfner' via mapsforge-dev <mapsfo...@googlegroups.com>:
Thanks for fast answer.
I will check again with this coordinates.

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapsforge-dev/36c15b93-f88f-41a1-8e3b-8b9f02edbeab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Longri, Andre Höpfner

unread,
Sep 17, 2016, 4:32:13 AM9/17/16
to mapsfo...@googlegroups.com
Ok, I have found the LocationOverlay! But this has Android dependency’s!

Maybe it will be better to move it from ‘vtm-app’ to ‘vtm’ ?

And interface all platform dependency’s like compass!

2016-09-17 8:46 GMT+02:00 Longri, Andre Höpfner <www.lo...@googlemail.com>:

Ok, you are right, the trees will be render!

So please give me a hint to set the right transformation to a 3D object that I can see this object on my location.

Emux

unread,
Sep 17, 2016, 4:58:39 AM9/17/16
to mapsfo...@googlegroups.com
The important part is its LayerRenderer.

I'll check it later for how to make it more modular and improve its implementation (opened #171).

--
Emux

Longri, Andre Höpfner

unread,
Sep 17, 2016, 4:59:13 AM9/17/16
to mapsfo...@googlegroups.com
👍

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.

Longri, Andre Höpfner

unread,
Sep 17, 2016, 8:06:33 AM9/17/16
to mapsfo...@googlegroups.com
I have played with LocationOverlay and have a little problem with the shader program.
On Mac desktop I become a shader compile error with first line!
"precision mediump float;"

When I delete this line, so on Mac it will be render fine!

Do you have an idea, how to detect Mac?
So I can replace this line if I running on Mac!

Emux

unread,
Sep 17, 2016, 8:15:06 AM9/17/16
to mapsfo...@googlegroups.com
To recognize a macOS in Java (or you mean iOS ?) could be done with something like:

boolean isMac = System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("mac");

But eventually we better find why this simple call causes trouble..

BTW we can increase also here the shader precision to 'highp', but I have to perform tests before pushing any changes.

--
Emux

Emux

unread,
Sep 17, 2016, 8:18:43 AM9/17/16
to mapsfo...@googlegroups.com
For general issues we can add a new GDX_MAC_QUIRKS boolean in GLAdapter like the other ones.

--
Emux

Emux

unread,
Sep 17, 2016, 1:28:54 PM9/17/16
to mapsfo...@googlegroups.com
I pushed a standalone LocationRenderer in 'vtm' module #171.

With many improvements and needed fixes for working properly.
You can see its api in use at 'vtm-app'.

I also activated all fragment shaders.
We can create even more creative renders. :)

--
Emux

Emux

unread,
Sep 17, 2016, 2:12:28 PM9/17/16
to mapsfo...@googlegroups.com
I added in #171 screenshots of the two location shaders.

--
Emux

Longri, Andre Höpfner

unread,
Sep 21, 2016, 7:01:46 AM9/21/16
to mapsfo...@googlegroups.com
This looks good and I will certainly use, but my goal is a 3D model to draw.

Now I have tried the Poi3DLayer.java analyze, but unfortunately http://www.opensciencemap.org/ is straight down and in Maps Forge maps, there is no static 

...
final day TREE_TAG = new Day ("natural", "tree");
...

Also, in the maps of openandromaps, there are no trees. Do you have a map in the trees, I can use offline?

--
You received this message because you are subscribed to the Google Groups "mapsforge-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapsforge-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.

Emux

unread,
Sep 21, 2016, 7:09:00 AM9/21/16
to mapsfo...@googlegroups.com
On 21/09/2016 02:01 μμ, 'Longri, Andre Höpfner' via mapsforge-dev wrote:
unfortunately http://www.opensciencemap.org/ is straight down

Both the site and the vector tiles are offline..


Do you have a map in the trees, I can use offline?

I see Mapsforge tag-mapping doesn't have the natural=tree, so the built maps in our server.

I remember we had removed it some time ago, since they tend to fill all over the map.

You can still build a map file with a modified tag-mapping and trees.

--
Emux

Longri, Andre Höpfner

unread,
Sep 21, 2016, 7:45:55 AM9/21/16
to mapsfo...@googlegroups.com
now I use TREE_TAG = new Tag("highway", "bus_stop");

It's easier !

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/yFPoLr2iuwk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mapsforge-dev+unsubscribe@googlegroups.com.

To post to this group, send email to mapsfo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mapsforge-dev.
Reply all
Reply to author
Forward
0 new messages