Jump to content
  • Advertisement
Sign in to follow this  
SparkyNZ

Retro wireframe vector graphics

This topic is 1721 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 )
Edited by EddieV223

Share this post


Link to post
Share on other sites


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...

Share this post


Link to post
Share on other sites

 

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.

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites


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!! :) )

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!