in

OpenGL 3D Game Tutorial 10: Loading 3D Models



LWJGL tutorial series on how to create a 3D Java game with OpenGL!

This week we create an OBJ parser to load 3D models made in Blender into our game!

Download the stall model: https://www.dropbox.com/sh/7l598pr7b4zx63j/AAB_PzQl3zU2WS5hhlKgMb1Wa?dl=0

Download Blender for free: http://www.blender.org/download/

Common Problems:

-If you’re using your own model then make sure to texture it in Blender first using UV mapping!

-The size of the normals array is “vertices.size() * 3” and NOT “normals.size() * 3”. Check 6:38 in the video and make sure you got this right.

– Make sure your texture file has dimensions that are powers of 2 (128×128, 256×256, 512×512 etc.) The file may have got resized when you downloaded it.

-Make sure you used “1 – currentTex.y” in the processVertex() method.

-If you’re using your own model and the texture looks distorted in the game but fine in Blender then you may be experiencing the texture seam problem that I talked about in the previous episode. You can fix this by using the improved OBJLoader provided at the end of episode 16.

Support the series on Patreon: https://www.patreon.com/thinmatrix

Facebook Page: https://www.facebook.com/thinmatrix
Tumblr: http://thinmatrix.tumblr.com/
Instagram: http://instagram.com/thin_matrix
Twitter: https://twitter.com/ThinMatrix
Check out my game on IndieDB: http://www.indiedb.com/games/equilinox

End of video music- Kai Engel, “Waking Stars”:

http://freemusicarchive.org/music/Kai_Engel/Evening_Colors/01_-_Waking_Stars

Source

What do you think?

Days Gone : des nouvelles images sur PC avec le mode "Photo", c'est ultra détaillé

The Witcher 3 : Une mise à jour next-gen qui utilise des mods de fans ?