Jump to content
  • Advertisement

OpenGL What's a good method for creating 3D (filled) wireframe models for an OpenGL game?

Recommended Posts

Hi all,

I'm just starting out learning OpenGL and I'm using it with SDL to create a bullet hell space shooter. I'm thinking I want an Asteroids aesthetic, except with 3D models so that I can add some depth and visual flair to the game without requiring heavy art assets (I'm no artist :P).

Now, I've made a little ship that can move around and rotate (as shown in the gif attached), but that's through hard coding the vertex and index buffers. Doing that for many different kinds of models, and more complex models, seems like it'd be an overwhelming task. I'm thinking the better option is to just model it in a program like Blender and then import it somehow or, if it's not much much harder than I think it is, create my own simplified mesh editor.

So what's the better option in your opinion? I'd personally like to try creating my own editor if only for the exercise and educational value it might have. Thanks for the help in advance!

Ship Model.gif

Share this post

Link to post
Share on other sites

Creating your own editor is an option, but I wouldn't underestimate the complexity of such a task. Here's a possible strategy. Start the process of creating a custom editor, and see how it goes. Maybe it'll go smoothly, but maybe once you dig into it a little, you'll find that using existing tools might be more practical.

Obviously hard coding isn't ideal. A next step up would be to type the model data into text files and then load from those files. Models like the one you posted would be fairly straightforward to create data for directly, but obviously that method doesn't scale very well. As you note, as model complexity increases, creating the data manually would quickly become impractical.

Based on what you posted I'd say using an existing tool like Blender would be the most practical solution. That's not to say though that you shouldn't try creating a custom editor if that interests you.

Share this post

Link to post
Share on other sites

Thanks for the suggestion! I've started work on an editor and I have already been met with some embarrassing trouble on setting up the multi-view with top-down and isometric perspectives, tho I did figure it out eventually.

My plan for right now is to have 4 perspectives: top, left or right, isometric front, and isometric back. I'm not sure if I want/need a movable camera as that seems it'd add a level of unnecessary complexity for my purposes (although I can imagine some not too difficult ways of implementing one). But if I do add a movable camera, I'd probably just have it rotate around the isometric model, and use the extra view for front or back. I'd only edit in the orthogonal perspectives too for the same reason, especially since I don't find modeling in 3D space very intuitive anyways.

I can imagine some trickiness showing up when trying to connect the vertices, but I have something of a plan for that as well. The real thing that stumps me is what I might do if/when I want the models to have moving components to them, but I guess that could just be an animation problem in general, of which I haven't really done anything yet.

Let me know if you think there are any major things I'm overlooking. I'm sure once I start diving in deeper I'll find them, but knowing ahead of time couldn't hurt. Thanks again!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!