<p>If you have the prerendered images, you can "simply" render them onto a grid of quads. This is done with texturing, i.e. you upload the image to your GPU as a texture and apply texturecoordinates to quads, such that when you render the quads, the textures are applied correctly to their surfaces.</p>

<p>You will however need to learn OpenGL (preferrably with GLSL), Direct3D with HLSL or even Vulkan, all of which will take some time. Depneding on where your goals lie, you may be better of going with a preexisting rendering engine and just learning like Unity or Unreal.</p>

<p>If you do want to learn one of the mentioned Graphics APIs, there are numerous tutorials on the web. For OpenGL I can recommend the <a href="https://www.youtube.com/watch?v=VS8wlS9hF8E&amp;list=PLRIWtICgwaX0u7Rf9zkZhLoLuZVfUksDP" rel="nofollow noreferrer">youtube tutorials by ThinMatrix</a>, for the other two APIs you'd need to ask someone else. Furthermore, there are splendid books online as well as offline. If you have some money to burn, the basics of rendering are covered in <a href="https://rads.stackoverflow.com/amzn/click/1568814240" rel="nofollow noreferrer">Real-Time Rendering</a> and <a href="https://rads.stackoverflow.com/amzn/click/1435458869" rel="nofollow noreferrer">Mathematics for 3d Game Programming and Computer Graphics</a>. In regards to OpenGL, there are the <a href="https://learnopengl.com/#!Introduction" rel="nofollow noreferrer">Online Tutorials of Learn OpenGL</a>, as well as offline books in <a href="https://learnopengl.com/book/learnopengl_book.pdf" rel="nofollow noreferrer">pdf</a> and <a href="https://learnopengl.com/book/learnopengl_book.epub" rel="nofollow noreferrer">epub</a> version.</p>

CC BY-SA 3.0
2017-12-13T09:27:14.377Z
2017-12-13T09:27:14.377Z
Tare
<p>I have OSM world data (essentially I processed the XML data into JSON containing arrays of objects (streets, buildings etc.) that each are represented by an array of lat/lon coordinates). Some of these are lines (roads etc.), others are areas that have to be filled (1st and last point close the area). </p>

<p>Anyhow, I would like to achieve an image similiar to google maps or mapbox but much simpler as I do not require city name labels or anything of the sort. For now all I really need is roads.  </p>

<p>I need this for a game I am making so the method itself must not be the most elegant one as I probably wont be doing this on the fly but rather prerendering the world to then send the images prerendered to the players. </p>

<p>My question is merely, where the heck do I start? I have no idea how the rendering of bitmaps is done (or whatever other format is best.)</p>

<p>I know C# and NodeJS and am not afraid of learning new frameworks or technologies.</p>

CC BY-SA 3.0
2017-12-13T10:12:03.283Z
There are several open-source libraries for rendering OSM data. Couldn't you use one of those?
Dan Hulme
CC BY-SA 3.0
2017-12-13T15:26:50.580Z
Well I found a few of those but they all dont seem customizable enough. Like what if I have my own data and e.g. would want to render a "hut" on the road side. The way I see it I have to either use the existing renderers and then insert the hut in the front end engine I am using, or render everything completely myself which is what I was going for.
ThatBrianDude
<rendering><mapping>
I need to build my own map renderer
ThatBrianDude
# I need to build my own map renderer

(Asked by: username_0 on 2017-12-12)

I have OSM world data (essentially I processed the XML data into JSON containing arrays of objects (streets, buildings etc.) that each are represented by an array of lat/lon coordinates). Some of these are lines (roads etc.), others are areas that have to be filled (1st and last point close the area).

Anyhow, I would like to achieve an image similiar to google maps or mapbox but much simpler as I do not require city name labels or anything of the sort. For now all I really need is roads.

I need this for a game I am making so the method itself must not be the most elegant one as I probably wont be doing this on the fly but rather prerendering the world to then send the images prerendered to the players.

My question is merely, where the heck do I start? I have no idea how the rendering of bitmaps is done (or whatever other format is best.)

I know C# and NodeJS and am not afraid of learning new frameworks or technologies.

**Tags:** rendering, mapping

> **Comments:**
> **username_1**: There are several open-source libraries for rendering OSM data. Couldn't you use one of those?  
> **username_0**: Well I found a few of those but they all dont seem customizable enough. Like what if I have my own data and e.g. would want to render a "hut" on the road side. The way I see it I have to either use the existing renderers and then insert the hut in the front end engine I am using, or render everything completely myself which is what I was going for.  

---

## 1 answers

### Answer by username_2 on 2017-12-13. Score: 1

If you have the prerendered images, you can "simply" render them onto a grid of quads. This is done with texturing, i.e. you upload the image to your GPU as a texture and apply texturecoordinates to quads, such that when you render the quads, the textures are applied correctly to their surfaces.

You will however need to learn OpenGL (preferrably with GLSL), Direct3D with HLSL or even Vulkan, all of which will take some time. Depneding on where your goals lie, you may be better of going with a preexisting rendering engine and just learning like Unity or Unreal.

If you do want to learn one of the mentioned Graphics APIs, there are numerous tutorials on the web. For OpenGL I can recommend the [youtube tutorials by ThinMatrix](https://www.youtube.com/watch?v=VS8wlS9hF8E&list=PLRIWtICgwaX0u7Rf9zkZhLoLuZVfUksDP), for the other two APIs you'd need to ask someone else. Furthermore, there are splendid books online as well as offline. If you have some money to burn, the basics of rendering are covered in [Real-Time Rendering](https://rads.stackoverflow.com/amzn/click/1568814240) and [Mathematics for 3d Game Programming and Computer Graphics](https://rads.stackoverflow.com/amzn/click/1435458869). In regards to OpenGL, there are the [Online Tutorials of Learn OpenGL](https://learnopengl.com/#!Introduction), as well as offline books in [pdf](https://learnopengl.com/book/learnopengl_book.pdf) and [epub](https://learnopengl.com/book/learnopengl_book.epub) version.


---

