Question: Learn the basics of how to use Blender to create a 3D object of your own. To make full use of Blender with your OpenGL
Learn the basics of how to use Blender to create a 3D object of your own. To make full use of Blender with your OpenGL applications, you’ll want to learn how to use Blender’s UV-unwrapping tools to generate texture coordinates and an associated texture image. You can then export your object as an OBJ file and load it using the code from Program 6.3.
Program 6.3![ImportedModel class public class ImportedModel { private Vector3f[] vertices; private Vector2f[] texCoords;](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1701/6/7/2/522656d764a028691701672521358.jpg)








![} // VBO for vertex locations gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); FloatBuffer vertBuf =](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1701/6/7/2/675656d76e3e55de1701672675023.jpg)

ImportedModel class public class ImportedModel { private Vector3f[] vertices; private Vector2f[] texCoords; private Vector3f[] normals; private int numVertices; public Imported Model(String filename) { Modellmporter modellmporter = new Modellmporter(); try {modellmporter.parseOBJ(filename); // uses modellmporter to get vertex information numVertices = modellmporter.getNumVertices(); float[] verts = modellmporter.getVertices(); float[] tcs = modellmporter.getTextureCoordinates(); float[] normals = modellmporter.getNormals(); vertices = new Vector3f[numVertices]; texCoords = new Vector2f[numVertices]; normals = new Vector3f[numVertices];
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
