Login
Username:
Password:

Blender 2.8 workflow for OpenGL ES

To import a model from Blender 2.8 using the .obj format into an OpenGL project based off of the model loader in the learnopengl.com tutorials by Joey de Vries, so for example my project: [link href="https://github.com/aliabbas299792/openglWASMTemplate/tree/model/"]OpenGL WASM Template (Model loader branch)[/link] I followed these steps: [ol] [li]Make an object in blender[/li] [li]Go to the UV editing tab (the list of tabs is at the top), and the window should now be split in two[/li] [li]Press the A key to select all the vertices, look in the window with the object in it, there should be a button labelled UV[/li] [li]Clicking it should show a dropdown menu, from there select Smart UV Project[/li] [li]Now go to the Texture Pain tab, and you should see in the right sidebar that there is a menu labelled "Draw"[/li] [li]Under Texture Slots (the first drop down area), there should be a dropdown labelled "Mode", select "Single Image"[/li] [li]Select New to make a new texture (or alternatively open one), the default options for a new image are good enough usually[/li] [li]A texture should now have appeared in the left window, and you can paint it there[/li] [li]Once you've finished painting it, you can export the model by going to "File->Export" and clicking on "Wavefront (.obj)" to export it as a .obj file[/li] [li]The default save options should be good enough[/li] [li]To save the texture as well just, go to the Texture Paint tab, in the left window, under Image, select "Save a Copy" and the default settings should be good enough, so just save it[/li] [li]Then open the .mtl file associated with the .obj file you saved, and at the bottom of the file add the line [b]map_Kd image.png[/b] where "image.png" is the texture you saved[/li] [li]And finally just import it in the program and your model should be textured[/li] [/ol]