Retro wireframe vector graphics

Started by
17 comments, last by SparkyNZ 10 years, 5 months ago
Hi. For many years I have had a secret desire to knock up a game similar to Mercenary. What I would like to do is create a world with see-through 3d vector models, or wireframe models.

I am very experienced in C/C++ and have had a little play with OpenGL in the past.

What I would like to know is whether somebody could point me in the direction of a good free modelling tool what will do 3d wireframe objects and export to an easy to use common format which I can then easily pull into a program of my own and render .. Probably via OpenGL. Hidden line removal modelling option could be useful.

Anybody have any useful recommendations please?
Advertisement

Wow... you must be really old. :) Any 3D modeling program can do what you ask, and the "hidden line removal" techniquie is no longer used... since ages. Now, you can use "backface culling" for that.

Retro wireframe... Long live Battlezone! (yep, I'm that old)

Check blender for modeling.

There are a lot of websites were you can get free model from - I like Turbosquid and BlenderSwap.

File formats I use are usually Collada and Wavefront(obj). I use ASSIMP to load models, it supports a lot of file formats, no need to write your own loader.

Check out http://ogldev.atspace.co.uk/ for OGL tutorials - it has a tutorial on loading models, animations, etc.

Wow... you must be really old. smile.png Any 3D modeling program can do what you ask, and the "hidden line removal" techniquie is no longer used... since ages. Now, you can use "backface culling" for that.

Elite on the BBC Model B micro and other computers in the 80s did backface culling. It only works for convex shapes. You need to use a Z buffer as well for non-convex shapes. (You don't need to use a Z buffer for hidden line removal, but it's supported by hardware and other solutions are much more complicated).

Elitebbc.jpg

As you can see, you can't see the back faces there but you can see the starfield through the space station. Note that the space station is convex (it's a cuboctahedron. 610px-Cuboctahedron.jpg

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

Wow... you must be really old. :) Any 3D modeling program can do what you ask, and the "hidden line removal" techniquie is no longer used... since ages. Now, you can use "backface culling" for that.


40 in Jan.. I am one of the wise ones. Now what was I saying? My Ram fails me..

I guess the reason you can do blackface culling is because you would draw the faces as polygons
.. Same as you would if filled polygons only they are non filled (outlined) polygons yes?

Retro wireframe... Long live Battlezone! (yep, I'm that old)

Check blender for modeling.

Check out http://ogldev.atspace.co.uk/ for OGL tutorials - it has a tutorial on loading models, animations, etc.

Thanks I will check these out. Blender did pop up lots when I did some searching but I wasn't sure if it would suit for Battlezone/Elite/Mercenary style models.

The big question though : how would I render a model as wireframe only?

I LOVE BATTLEZONE, I would dedicate years to making a new Battlezone like game if I could find other people willing to as well! I can code.

Drawing in wire frame mode with openGL is very easy you simply set a state in openGL

to switch on,

glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );

to go back to normal.

glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );

Also I think you can just call draw like this

glDrawArrays( GL_LINES, .... )

glDrawElements( GL_LINES, .... )

You can render any geometry as wireframe in openGL this way. Also if you turn off zbuffer and culling then you'll get see through as well I think.

What format you choose is up to you. That said, I would suggest using AssImp since its a library that supports lots of different formats. That will load your models in to a AssImp data structures, then you can read from it uniformly in your code. If you really want to write your own file loader go with something easy like .obj files, to start with.

http://assimp.sourceforge.net/

Supported file formats for assimp importing ( loading )

An asterisk indicates limited support. For a list of planned formats, see the wishlist.

COMMON INTERCHANGE FORMATS

  • Collada ( .dae )
  • Blender 3D ( .blend )
  • 3ds Max 3DS ( .3ds )
  • 3ds Max ASE ( .ase )
  • Wavefront Object ( .obj )
  • Industry Foundation Classes (IFC/Step) ( .ifc )
  • XGL ( .xgl,.zgl )
  • Stanford Polygon Library ( .ply )
  • *AutoCAD DXF ( .dxf )
  • LightWave ( .lwo )
  • LightWave Scene ( .lws )
  • Modo ( .lxo )
  • Stereolithography ( .stl )
  • DirectX X ( .x )
  • AC3D ( .ac )
  • Milkshape 3D ( .ms3d )
  • * TrueSpace ( .cob,.scn )
MOTION CAPTURE FORMATS
  • Biovision BVH ( .bvh )
  • * CharacterStudio Motion ( .csm )
GRAPHICS ENGINE FORMATS
  • Ogre XML ( .xml )
  • Irrlicht Mesh ( .irrmesh )
  • * Irrlicht Scene ( .irr )
GAME FILE FORMATS
  • Quake I ( .mdl )
  • Quake II ( .md2 )
  • Quake III Mesh ( .md3 )
  • Quake III Map/BSP ( .pk3 )
  • * Return to Castle Wolfenstein ( .mdc )
  • Doom 3 ( .md5* )
  • *Valve Model ( .smd,.vta )
  • *Starcraft II M3 ( .m3 )
  • *Unreal ( .3d )
OTHER FILE FORMATS
  • BlitzBasic 3D ( .b3d )
  • Quick3D ( .q3d,.q3s )
  • Neutral File Format ( .nff )
  • Sense8 WorldToolKit ( .nff )
  • Object File Format ( .off )
  • PovRAY Raw ( .raw )
  • Terragen Terrain ( .ter )
  • 3D GameStudio (3DGS) ( .mdl )
  • 3D GameStudio (3DGS) Terrain ( .hmp )
  • Izware Nendo ( .ndo )

If this post or signature was helpful and/or constructive please give rep.

// C++ Video tutorials

http://www.youtube.com/watch?v=Wo60USYV9Ik

// Easy to learn 2D Game Library c++

SFML2.2 Download http://www.sfml-dev.org/download.php

SFML2.2 Tutorials http://www.sfml-dev.org/tutorials/2.2/

// Excellent 2d physics library Box2D

http://box2d.org/about/

// SFML 2 book

http://www.amazon.com/gp/product/1849696845/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1849696845&linkCode=as2&tag=gamer2creator-20


ps I LOVE BATTLEZONE, I would dedicate years to making a new Battlezone like game if I could find other people willing to as well! I can code.

Just say when...

Wow... you must be really old. smile.png Any 3D modeling program can do what you ask, and the "hidden line removal" techniquie is no longer used... since ages. Now, you can use "backface culling" for that.


40 in Jan.. I am one of the wise ones. Now what was I saying? My Ram fails me..

I guess the reason you can do blackface culling is because you would draw the faces as polygons
.. Same as you would if filled polygons only they are non filled (outlined) polygons yes?

I guess it checked the polygons for facing (via sign of cross product component which points into the screen of the vertices in screen space) and built an edge visibility table from that. As I said it only works for convex shape (but in Elite, everything was convex). An easy way to do it these days would be to draw a black polygon and then draw the edges of the polygon as lines over the top, which would mean shapes occlude each other as well (as long as you write to the z buffer as well), unless you are gong for a true retro look (i.e. can see through objects even if they have backface culling), in which case you wouldn't draw the black polygon, just the edges. If you have non triangular faces you also need to store data about whether an edge is an exterior edge (i.e. on the boundary of the polygon) or not.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley


As I said it only works for convex shape (but in Elite, everything was convex). An easy way to do it these days would be to draw a black polygon and then draw the edges of the polygon as lines over the top, which would mean shapes occlude each other as well (as long as you write to the z buffer as well), unless you are gong for a true retro look (i.e. can see through objects even if they have backface culling), in which case you wouldn't draw the black polygon, just the edges. If you have non triangular faces you also need to store data about whether an edge is an exterior edge (i.e. on the boundary of the polygon) or not.

I hadn't actually realised how smart Elite was (I always knew it was really smart but..) I forgot it didn't have truly transparent objects. Now that is really cool. :) Mercenary was "see through" for everything.. Its actually something like Mercenary that I would like to have a go at creating. I keep Googling for "games like mercenary damocles" but never find anything. Sure, I got MDDClone etc but it would be really good (for an old retro like me) to play something very similar but different. And like I said.. I've wanted to have a go at creating my own world since I was 17 or so.. I think the Elite-style "non totally transparent" wireframe objects would be good to try.

I gave the NeHe tutorials a blast a couple of years ago but that was a distraction from the 2-D OpenGL stuff that I was doing at the time. I'll have a play over the weekend hopefully. Big question is does Blender allow you to see objects in wireframe in this manner or would I have to construct objects filled? Surely it will allow a wireframe preview? (Wish I had more time!! :) )

This topic is closed to new replies.

Advertisement