Jump to content


Graphics for games?


31 replies to this topic

#1 krishnakeshan007

    New Member

  • Members
  • Pip
  • 9 posts

Posted 20 May 2012 - 04:43 AM

hey guys i am new to game development and wanted to know about the creation of graphics for video games. I am currently using blender. is it a good choice?

Thanks.

#2 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1590 posts

Posted 20 May 2012 - 06:37 PM

Yes, it's one of the best free modeling and animation packages. Sketchup is easy to learn, but is a little harder to get the models into games or other modelers, at least the free version.
Currently using Blender and Unity.

#3 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2725 posts

Posted 20 May 2012 - 11:24 PM

i personally use 3d coat, voxel modelling is amazing.

but its quite advanced, you have to angle reduce the models cause their hipoly and normal map them, but once youve done that its what made this->
Posted Image
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#4 krishnakeshan007

    New Member

  • Members
  • Pip
  • 9 posts

Posted 23 May 2012 - 06:16 AM

Thanx for the answers. So, after i make a 3d model of something ( eg : a gun ) how do i put the thing into my game.
Also, can I use photoshop to make images and animate them with opengl. If not please tell me how can I ?

Thanx.

#5 TheNut

    Senior Member

  • Moderators
  • 1701 posts
  • LocationCyberspace

Posted 23 May 2012 - 10:37 AM

krishnakeshan007 said:

So, after i make a 3d model of something ( eg : a gun ) how do i put the thing into my game.
You need to export the model to a format that your game will import. There are many choices out there (OBJ, 3DS, Collada) that you can chose from. You could optionally write your own exporter, which would better optimize your data. I submitted a sample Blender exporter that covers most situations that you can read and download here.

krishnakeshan007 said:

can I use photoshop to make images and animate them with opengl.
I wouldn't use Photoshop. It doesn't have sprite tools that allow you easily group together many images into a single, larger one. There are dedicated sprite sheet editors you can search for that will do the job much better. Once you have your sprite sheet, you just need to write an animation system in OpenGL to flip through each frame.
http://www.nutty.ca - Being a nut has its advantages.

#6 krishnakeshan007

    New Member

  • Members
  • Pip
  • 9 posts

Posted 25 May 2012 - 01:28 AM

I saw your exporter thingy, but i couldnt make out some parts. Can you guide me on how to make my own exporter.(also tell me the programming language)

Thanx.

#7 Alienizer

    Member

  • Members
  • PipPipPipPip
  • 435 posts

Posted 25 May 2012 - 01:40 AM

View Postkrishnakeshan007, on 25 May 2012 - 01:28 AM, said:

I saw your exporter thingy, but i couldnt make out some parts. Can you guide me on how to make my own exporter.(also tell me the programming language)

Thanx.

Which programming language do you use now?
Which 3D software are you using to make your 3D model?

Maybe start by using DarkBasic http://www.thegamecreators.com/

#8 krishnakeshan007

    New Member

  • Members
  • Pip
  • 9 posts

Posted 25 May 2012 - 09:59 AM

I am currently (just) learning c++. And for the modelling tool, I use Blender.

Thanx

#9 Mogoko

    Member

  • Members
  • PipPip
  • 10 posts

Posted 25 May 2012 - 05:51 PM

Graphics don't have to be realistic, but they have to be appealing and practical.

#10 Alienizer

    Member

  • Members
  • PipPipPipPip
  • 435 posts

Posted 25 May 2012 - 07:07 PM

View Postkrishnakeshan007, on 25 May 2012 - 09:59 AM, said:

I am currently (just) learning c++. And for the modelling tool, I use Blender.

Thanx

Well, if you are "just" learning C++ right now, then it's not going to be easy. C++ is a hard language, and you almost need to be an expert to make code that runs fast and optimized, let alone understanding the structure of C++

It would be too difficult for anyone here to "teach" you how to make your own exported. Beside, there are plenty already available for Blender, where you can look at the source codes see how they works.

#11 krishnakeshan007

    New Member

  • Members
  • Pip
  • 9 posts

Posted 26 May 2012 - 03:30 PM

I found an option in Blender which says "export". When i click it, it gives me formats to export in eg : COLLADA, Stl, 3ds Max, Autodesk Maya. Is this what a exporter do?

#12 Alienizer

    Member

  • Members
  • PipPipPipPip
  • 435 posts

Posted 26 May 2012 - 05:20 PM

View Postkrishnakeshan007, on 26 May 2012 - 03:30 PM, said:

I found an option in Blender which says "export". When i click it, it gives me formats to export in eg : COLLADA, Stl, 3ds Max, Autodesk Maya. Is this what a exporter do?

Yes they do.

#13 Stainless

    Member

  • Members
  • PipPipPipPip
  • 582 posts
  • LocationSouthampton

Posted 27 May 2012 - 09:54 AM

Working with 3d meshes can be a pain.

What usually happens is that you spend ages looking at 3d modellers, until you find one that you really like.
You spend days learning the modeller, and end up with a mesh you are really like.

Then you try and get the mesh you have spent hours working on into your game, and you find the modeller doesn't export to a format you have code to read.

So then you start looking for source code for model formats that your modeller supports, pretty quickly you find one, download the source code, then the source code doesn't build.

So you spend a few hours trying to get it to build, with no success. So you go back to searching the web for a different format.

This one builds, but when you put it on your game code and load your lovingly created mesh, it looks sh1t. Or just looks like a bunch of random points, or the object is inside out.

You can lose weeks in this morass of free source code.

My advice would be to decide on what features you really want in your meshes. Think hard about this bit. Obviously you are going to want to get the vertex positions, most probably you are going to want texture coordinates and normals, but do you need anything else? Do you need tangents, binormals, multitexturing, materials, etc. etc. etc.

When you have decided on the minimum set of what you need, then have a look at which file format and modeller you can use.

I'll try and explain what I mean with an example.

Blender is a very powerful modeller, loved and hated by many people. It can do whatever you need to do, but the learning curve is very steep. You could spend years just learning to get good at blender without spending a single hour writing a game.

It can output to Collada, which has an open source file handling library. So that is a really good option for handling complex meshes with lots of rendering stages.

The collada dom is supplied as 50 Meg of source code. (I'm looking at version 2.3.1) and relies on 8 external libraries.

Now if you are working on windows, you could probably get away with just building collada and using it as the libraries are easily available. I don't work on windows, so I would have to port all the libraries myself. I haven't looked at it in detail, but I can pretty much guarantee they also rely on other libraries, so I would have to port them as well.

So by the time I have learnt blender and got collada working, I could have been going a couple of years without actually doing ANY game coding at all.

Have a look at simple free tools like Anim8tor.

Anim8tor comes with a built in exporter that writes your mesh out as source code. With all the data in a simple to read and use format, you can concentrate on the game code rather than all the utilities.

Once you have some experience, then you can say "I hate this, think I'm going to add <insert feature here>"

The reason I am saying this is that when you are learning, you NEED the instant gratification of seeing your code come to life. You need to be able to sit in front of your computer for a couple of hours and actually see the results of your efforts.

Without that you could easily just give up.

#14 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2725 posts

Posted 27 May 2012 - 10:08 AM

Stainless is right, making games is a total bitch, wait till you get up to collision detection. ;)
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#15 v71

    Valued Member

  • Members
  • PipPipPipPip
  • 355 posts

Posted 27 May 2012 - 01:51 PM

I haven't had much problems using lib3ds and c++ you will need a little bit of 'cleaning' , becasue much of the models you'll find on the internet are a little bit unfinished and not optimized, lots of redundant vertices and surfaces , this is the thing i noticed most.
Check my code in the c/c++ section :
http://www.binpress.com/browse/c

#16 Stainless

    Member

  • Members
  • PipPipPipPip
  • 582 posts
  • LocationSouthampton

Posted 28 May 2012 - 09:40 AM

The main problems I find with them are ..

1) Missing textures

Since I am a coder, texturing a mesh is the part I am rubbish at. I hate finding the perfect mesh for the task I am working on and then finding out the textures are missing. :(

2) Vertex ordering / missing normals

So annoying loading up a mesh to find half the tri's are facing the wrong way. I haven't come up with a good way of using code to fix this issue either.

3) Degenerate triangles

It seems a lot of modellers really don't care if you end up with two coincident verts on a tri, or a tri with only two verts because the end guy has deleted one of them. Pain in the ass for me though.

3ds is one of the worst, it's gone through so many changes over time that you never know what's going to happen when you load one.

It amazes me that we have pretty well got a couple of standards for bitmaps now, but for 3d meshes...

#17 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 345 posts

Posted 28 May 2012 - 10:54 PM

3ds is definitely one of the worst formats - no, it is old, don't use it, run away!

A better choice is obj - simple, readable, robust ... with few extensions on that format you get really good format for quickly exchanging gfx between F.e. 3D Studio Max and your application. Then you just convert them to binary format (as obj is text-based), and you're ready to publish (never, never, never ever distribute your application with text formats for meshes, textures, skinned meshes + animations, etc.)

Collada, FBX, or some others are fine, but well ... very complex and they contain huge amount of useless stuff (and I really mean HUGE amount). Loading times are zillion-times slower than for obj (or modified obj), and well - I personally don't like them (too much useless stuff inside creating huge files).

As for now I don't have any problems with missing textures, vertex ordering or degenerate triangles (unless the graphics guy makes crappy model, but then I won't pay him, so...).

As for textures, the standard are S3TC compressed ones - mostly DDS, but there are other formats with S3TC compression (and one can always create his own one). Although you can as well go with some TGA files (quite easy to work, both Photoshop and GIMP can work with them, as well as 3DS Max, Blender, Maya, Mudox, XNormal, and lots of other useful programs).

There are also skinned meshes and animations - quite harder one, because it needs you to know a bit about skinning and a lot about math. Mostly you get some mesh + multiple weights for each vertex that describes how much is that vertex affected by different joints. Then you (in animation files) get information about how is every joint animated (be it matrix-based storage, or quaternion + position storage). This is enough for one to actually do skinned animation. There are some MD5, MDL, NIF (+ their animation formats), etc. etc.
My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#18 tyree

    Valued Member

  • Members
  • PipPipPipPip
  • 309 posts

Posted 29 May 2012 - 06:40 AM

collada is quite useful but you would need to delete anything you dont want exported. anything hidden would stay hidden but still be exported. delete everything except the character and bones controlling it. textures export with the model

#19 Alienizer

    Member

  • Members
  • PipPipPipPip
  • 435 posts

Posted 29 May 2012 - 03:12 PM

I find the OBJ way the best because...

1. All 3D CAD can export to obj format.

2. It can be edited, it's text, same with the texture (mtl) file

3. The textures can be edited and re-saved, renamed etc.

4. And because it's text, you can do a search/replace

5. Non of the binary counterparts have the above abilities.

6. It's very fast to load.

#20 tyree

    Valued Member

  • Members
  • PipPipPipPip
  • 309 posts

Posted 30 May 2012 - 02:19 AM

to the original poster, keep in mind object doesnt export animation. if the model has no animation go with object. but if its animated. another format will have to be used





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users