Advice needed throughout my first 3D project
Posted: Fri Sep 27, 2013 4:44 pm
Hello everyone,
This is a project that is very new for me. I have very little experience of 3D graphics, but I do know a lot about PureBasic in general, XML, 2D graphics and SVG. However, I don't know how to proceed with this project or which tools to use. I don't even know if PB should be involved, though to retain control and options for myself I think it probably should be, rather than using third party software. So, here are some questions before I begin.
WHAT I'M STARTING WITH
A very complex 2D "map" of a town, in SVG format. The elements are coloured according to their elevation, so ground level is grey, elevated platforms are white with black dots, buildings are yellow, etc. - this is all very consistent. Here is a sample of the map:

WHAT I WANT TO END UP WITH
A 3D scene derived from the SVG. There is an infinite plane denoting "land", and the sky is pure blue. I can move around the town quite freely. The current camera position and orientation can be retrieved and set so that I can quickly return to "favourite" places later on. I can take screenshots or renders; one thing I might like to have is distance blur.
Obviously I could use a 3D CAD program to recreate the town in 3D manually, but that seems insane given that it would be much easier to write a PB program that automatically processed the SVG file and output a 3D version in some way. The height and Y-position of each element could be set according to its colour. For example, elevated platforms, identified by their white-with-black-dots colouring, would be at 10 feet above ground level and 2 feet thick, etc.
So the questions relating to PB's 3D engine...
This is a project that is very new for me. I have very little experience of 3D graphics, but I do know a lot about PureBasic in general, XML, 2D graphics and SVG. However, I don't know how to proceed with this project or which tools to use. I don't even know if PB should be involved, though to retain control and options for myself I think it probably should be, rather than using third party software. So, here are some questions before I begin.
WHAT I'M STARTING WITH
A very complex 2D "map" of a town, in SVG format. The elements are coloured according to their elevation, so ground level is grey, elevated platforms are white with black dots, buildings are yellow, etc. - this is all very consistent. Here is a sample of the map:

WHAT I WANT TO END UP WITH
A 3D scene derived from the SVG. There is an infinite plane denoting "land", and the sky is pure blue. I can move around the town quite freely. The current camera position and orientation can be retrieved and set so that I can quickly return to "favourite" places later on. I can take screenshots or renders; one thing I might like to have is distance blur.
Obviously I could use a 3D CAD program to recreate the town in 3D manually, but that seems insane given that it would be much easier to write a PB program that automatically processed the SVG file and output a 3D version in some way. The height and Y-position of each element could be set according to its colour. For example, elevated platforms, identified by their white-with-black-dots colouring, would be at 10 feet above ground level and 2 feet thick, etc.
So the questions relating to PB's 3D engine...
- can the current camera position/orientation be retrieved and set?
- can distance blur be achieved? (It needn't be used all the time, just when I press "render".)
- in 2D most of the elements (buildings, platforms, etc.) are rectangles, but some are more complex polygons. Obviously these would need to be translated into 3D shapes. I'm sure cuboids could be created on the fly in PB, but what about complex shapes?
- in the SVG, the roads have a "texture" such that the white dashed line follows the direction of the road. Could this be emulated in PB?
- is there a way to identify which shape is currently under the mouse cursor?


