Jump to content
  • Advertisement
  • entries
  • comments
  • views

3D model

Sign in to follow this  


I did a lot of work in the game these days. Now, I can export meshes from Blender, read description files for fonts, materials, objects, levels and render the level. Everything still needs a lot of work but the results are encouraging and I can check visually what I was working on all this time.
Some screenshots of what I have (the jpg is killing the menu, I'll have to tweak the compression settings next time)...
The main menu can have a full 3D level behind it but I am not sure if I will use this feature. For now, the level is only one object as a unique geometry using a unique material (the code is made to handle more complex setup but it needs to be finalized). I am rendering it with a very simple shader. Loading of it is hard coded and it is used for any object present in the level for now. It may be my third shader ever so it is really basic (and not very well written) but to test what I currently have, it is more than enough.in vec4 pass_Color;in vec3 pass_Normal;in vec2 pass_UV;out vec4 out_Color;uniform sampler2D diffImage;void main(void){ // fixed light direction vec3 lightDir = normalize(vec3(-1.0, -1.0, -1.0)); // calculated diffuse float diffuse = max(0.0, dot(pass_Normal, lightDir)); // ambient float ambCoef = 0.25; out_Color = min(diffuse + ambCoef, 1.0) * vec4(pass_Color.rgb, 1) * vec4(texture(diffImage, pass_UV).rgb, 1);}
The spaceship is the player's one. The Blender export script produces a file with the vertices, colors, normals, UVs and bounding dimensions. The association with one or more materials is done in a separate file allowing the declaration of objects with the same geometry but different rendering properties.

The next things to do:
- finish the code to use more than one geometry and one material per object
- code more level content: cameras, lights, terrain description, enemy waves, ...
- more complex materials with specific shaders
- and a lot more items in my ever-growing todo list

Until next time...
Sign in to follow this  


Recommended Comments

The main menu can have a full 3D level behind it but I am not sure if I will use this feature.

This is an idea that I have always liked. I remember all the way back to my days of playing Age of Mythology, and watching the menu scene. A nice, peaceful little island. Oh wait, here comes a ship full of invaders to attack. Whoops, a kraken just rose up from the deeps and took the ship down. Stuff like that, I think, really makes a good menu state for me.

Share this comment

Link to comment

The menu in http://oilrush-game.com/ is a bit like that. In my case, as the game is meant to be a scrolling shoot'em up, I will have to find something to display with the limited view angle. I initially though of a scrolling infinite fully random terrain (a bit like in the game but with more randomness) featuring all the environments available with the player spaceship moving above it. I will have to see if it is possible.

Share this comment

Link to comment

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!