Jump to content

  • Log In with Google      Sign In   
  • Create Account

Retro wireframe vector graphics


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
18 replies to this topic

#1 SparkyNZ   Members   -  Reputation: 121

Like
3Likes
Like

Posted 30 October 2013 - 02:45 AM

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?

Sponsor:

#2 tonemgub   Members   -  Reputation: 1146

Like
0Likes
Like

Posted 30 October 2013 - 03:20 AM

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.



#3 N.I.B.   Members   -  Reputation: 1195

Like
5Likes
Like

Posted 30 October 2013 - 03:25 AM

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.


Edited by satanir, 30 October 2013 - 03:27 AM.


#4 Paradigm Shifter   Crossbones+   -  Reputation: 5433

Like
3Likes
Like

Posted 30 October 2013 - 03:41 AM

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, 30 October 2013 - 03:54 AM.

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

#5 SparkyNZ   Members   -  Reputation: 121

Like
0Likes
Like

Posted 30 October 2013 - 11:22 AM

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?

#6 SparkyNZ   Members   -  Reputation: 121

Like
0Likes
Like

Posted 30 October 2013 - 11:26 AM

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?

#7 EddieV223   Members   -  Reputation: 1407

Like
3Likes
Like

Posted 30 October 2013 - 11:48 AM

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, 30 October 2013 - 12:08 PM.

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.1 Download http://www.sfml-dev.org/download.php

SFML2.1 Tutorials http://www.sfml-dev.org/tutorials/2.1/

 

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

 


#8 N.I.B.   Members   -  Reputation: 1195

Like
2Likes
Like

Posted 30 October 2013 - 12:01 PM


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



#9 Paradigm Shifter   Crossbones+   -  Reputation: 5433

Like
2Likes
Like

Posted 30 October 2013 - 02:01 PM

 

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, 30 October 2013 - 02:01 PM.

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

#10 SparkyNZ   Members   -  Reputation: 121

Like
0Likes
Like

Posted 30 October 2013 - 03:09 PM


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



#11 SparkyNZ   Members   -  Reputation: 121

Like
0Likes
Like

Posted 30 October 2013 - 03:11 PM


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

 

Thanks heaps for all that info Eddie! If it weren't for work, kids and my nerdy GeekTunes iPhone app, I'd be diving into that right now! I'm itching to have a play with all this. Its been 2 years since I last played with OpenGL but I still got my test apps, tutorials and books. :)

 

Be careful.. you may be hearing from me again. :)



#12 Paradigm Shifter   Crossbones+   -  Reputation: 5433

Like
2Likes
Like

Posted 30 October 2013 - 03:17 PM

Not used Blender, 3DS Max certainly allows you to view objects as wireframe with or without bakface culling.

 

Elite objects were just backface culled, they didn't draw filled black polygons, which is why you can see the starfield through the space station. You can see ships through other ships as well

 

elite-Space-Station.jpg

 

That's the spectrum version, but it worked in the same way as the BBC version. Later versions did draw filled polygons for the ships (and I expect they would use a zbuffer as well, it would look really bad otherwise). EDIT: Or they could just sort the objects and render them based on distance to camera, that wouldn't require a z buffer either. That was how PS1 games worked.


Edited by Paradigm Shifter, 30 October 2013 - 03:26 PM.

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

#13 Petrov_VA   Members   -  Reputation: 595

Like
3Likes
Like

Posted 30 October 2013 - 05:27 PM

Hi,

I'm also very old.

And for old people the best source to start with NeHe's OpenGL Lessons( c++ codes provided).

And for the latest versions Visual C++ MS VS 2010/2012 the above adapted:Concentration of all The Lessons in Common Library GLSummary in MFC ( codes and demo in source files provided)



#14 SparkyNZ   Members   -  Reputation: 121

Like
0Likes
Like

Posted 30 October 2013 - 05:32 PM


And for old people the best source to start with NeHe's OpenGL Lessons( c++ codes provided).

 

That site rocks! I bought his book "Beginning OpenGL Game Programming" (Luke Benstead). Don't know if I'd need the second book or not for what I want to do though..?



#15 Petrov_VA   Members   -  Reputation: 595

Like
0Likes
Like

Posted 30 October 2013 - 06:08 PM

Unfortunately I've never read this book. Thanks for advertising. As for me better to pick up ready working codes and learn the subject with attept to modify ones. Try to pick up Codes and Demo to NeHe's Lessons, look for demo you like, pick up the codes of project corresponding(or c++ code of NeHe's OpenGL Lessons) and modify it as you like.



#16 Paradigm Shifter   Crossbones+   -  Reputation: 5433

Like
0Likes
Like

Posted 30 October 2013 - 06:26 PM

One book should suffice you don't need lighting and shading to do wireframe.

 

Tau Ceti on the Spectrum did have lighting and shading! Very cool, not as smooth as Elite though

 

ftp://ftp.worldofspectrum.org/pub/sinclair/screens/in-game/t/TauCeti.gif

 

EDIT: Better pic

 

TauCeti2.gif

 

The sun moved and everything!


Edited by Paradigm Shifter, 30 October 2013 - 06:32 PM.

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

#17 SparkyNZ   Members   -  Reputation: 121

Like
0Likes
Like

Posted 31 October 2013 - 02:57 AM


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 );

 

Hehe! It works a treat! I just loaded NeHe lesson 05 onto my Mac, added the above line and Battlezone here we come! See-through wireframe spinning pyramid and cube.

 

I couldn't get ASSIMP working on my Windows laptop (probably useless gfx card - even the viewer wouldn't start with some DirectX 9 3D complaint) and getting it all to work on the Mac is currently in my 'too hard' basket for now. Got Blender installed though..

 

I may give http://ogldev.atspace.co.uk/www/tutorial22/tutorial22.html a go if I can find a way to get one of these libraries such as ASSIMP working - either on my Mac or laptop which is due replacement.



#18 N.I.B.   Members   -  Reputation: 1195

Like
0Likes
Like

Posted 31 October 2013 - 03:03 AM


I couldn't get ASSIMP working on my Windows laptop (probably useless gfx card - even the viewer wouldn't start with some DirectX 9 3D complaint)

Assimp(the library, not the viewer) has nothing to do with your graphics card. It parses and loads the model into its internal data structures, then you have to use them to create the GPU objects. Check the ASSIMP tutorial on ogldev.



#19 SparkyNZ   Members   -  Reputation: 121

Like
0Likes
Like

Posted 31 October 2013 - 03:05 AM


Assimp(the library, not the viewer) has nothing to do with your graphics card. It parses and loads the model into its internal data structures, then you have to use them to create the GPU objects. Check the ASSIMP tutorial on ogldev.

 

OK.. will do. I'd downloaded a couple of Blender objects and wanted to check them out with the viewer.. just to kid myself that they would load in something else other than Blender etc. Understand what you're saying. I'll give it a try tomorrow.. really do want a new laptop though.. May have to try it on the work laptop instead ;-) Thanks. I'm always torn between Mac and Windows laptop - Mac tends to win since the battery still works. :)


Edited by SparkyNZ, 31 October 2013 - 03:06 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS