12,950,268 members (67,817 online)
Rate this:
See more:
Hello guys!

So i have this problem when i'm programming in C# using openGL library. The main project is, to draw a road from x,y,z coordinates that i got from some trip i made.. Well.. i've managed to DRAW the road but it's visible like a simpel 'circle' in the openGL environment.

Like this: http://shrani.si/f/3H/wC/2XuyB7fp/untitlessd.png[^]

How i want it to be shown is on this picture:

http://static.usenix.org/event/usenix05/tech/freenix/full_papers/kirsch/kirsch_html/img/street.jpg[^]

The picture is just an example of how i want it to be visible. So the maint point is, to get a 3D feeling from the road.. not a simple perspective from 'above'. I've tried rotating the camera but i dont get the right results.

Can u please help me on this? or give me some tutorials where its shown how to get this 3D view of a line...

I hope i've explained it well...if not just ask me and i'll try better!

cheers
Posted 23-Nov-12 7:22am
tokano577
Sergey Alexandrovich Kryukov 23-Nov-12 13:55pm

This might be an interesting question, but I'm not sure your approach to asking questions might be not very productive. Tomorrow you will need to draw a piece of bread, and later a glass of water. Will each object make more and more questions? Even the simplest 3D models are more general...
--SA
tokano 23-Nov-12 16:51pm

Well yes, maybe i will have to draw different things..but the question is still simple. How to get this '3D LOOK' on the road i am drawing.. I got all the 3 coordinates, still the object looks like 2D. There is something i am not doing right..and any help in this direction would be usefull..

Maybe i am just searching for someone to push me in one direction i should search for the solution..

Rate this:

## Solution 3

Hi guys!

I've solved it! The biggest problem was the little difference between coordinates. As i drove with my car mapping the coordinates, the road was really up and down...and i thought, man i go very high, so this has to be seen on the program then!

After giving the coordinates in i saw nothing. I solved this using lines...so i draw each line at every point i've made and the line was long as the height!

The next problem was.. i got X Y Z coordinates.. and i used Z as the HEIGHT difference. The coordinate system of openGL uses Y axis as up and down... so i switched these and got a road from a better perspective! (the right one!) After drawing lines i got also the 3D feeling of the road.

Here the picture:

http://shrani.si/f/1Q/7k/3pocMfRv/untitled.png[^]
Rate this:

## Solution 1

It's not clear if you are asking about how to draw the road as a 3D object, or correct issues you have with manipulating the camera.

Your statements: "tried rotating the camera" and "get this 3D view of a line" seem to imply your problem is with the camera.

[EDIT] Sorry, this is a comment not a solution, no way to change status. [/EDIT]
v2
tokano 24-Nov-12 6:25am

Well, i do not know what should i FIX to make my road look like 3D. I just pointed out two of the things i might have the problem with. Maybe the solution is a third one. I thought that if i get draw the x y z coordinates, everything will be ok from that point on..but nope..it looks like 2D:S
cmk 24-Nov-12 7:37am

Again, not sure what you mean by "look like 3D".

Do you mean you expect to see the black line you have, but as you move the camera so you are looking 'edge on' you see the difference z values.

Or do you mean that you expect the line to look like an extruded rectangle.
tokano 24-Nov-12 8:19am

Well the picture i gave you, gives me the 3D feeling.

This one: http://static.usenix.org/event/usenix05/tech/freenix/full_papers/kirsch/kirsch_html/img/street.jpg

I dont want all the fancy texture and red dots..just the road in this kind of perspective.. What i get is in the first post, the first picture.
Rate this:

## Solution 2

You said you tried rotating the camera but ddin't get the 'right results'.
Do you have a picture of what you get when you rotate the camera ?
Nelek 24-Nov-12 13:52pm

- To add information to your message, you can use the widget "Improve question" / "Improve solution" at the bottom of your text.
- To ask/answer a user, you can use the widget "Have a question or comment?" (as I am doing right now with you) or the widget "reply" in another comment.

Top Experts
Last 24hrsThis month
 OriginalGriff 485 CPallini 295 Maciej Los 250 CHill60 185 RyanDev 155
 OriginalGriff 5,829 CHill60 3,460 Maciej Los 2,953 Jochen Arndt 1,975 ppolymorphe 1,820