-1

I am trying to create Voxel Engine in java with LWJGL 2.9+, but I have problems with creating model in Blender program. I have created a simple 1x1x1m cube and generated simple UV's in blender. I have exported .obj file, and here is the content of it (pastebin): http://pastebin.com/0FzQaVGf

My texture image is very simple, it is 64x64 orange colored quad .png file.

And here is how it looks after rendering two cubes (and other model downloaded from internet): Screen < click

Can somebody help me troubleshoting this problem? Thanks for any help! :)

Microz
  • 97
  • 1
  • 8

1 Answers1

2

This is a problem which I've also been facing these last days...

.obj files can contain multiple index buffers(v,vt,vn), however OpenGL uses only one index buffer to send to the shaders so it is your job to transform N index buffers into 1. and btw you should tick the triangulate option when exporting obj files in blender.

Robert
  • 49
  • 1
  • 4
  • I have did it. Look at my .obj loader: https://www.dropbox.com/sh/x1fyet1otejxk3z/AAAoCqArl4cIx0THdRk2poW3a?dl=0 – Microz Feb 23 '17 at 14:23
  • Ok.. I have downloaded blender 2.67 (from 2013) and now everything works with the same export configuration. Newest blender is broken, it needs to be fixed.. – Microz Feb 23 '17 at 15:24
  • thanks :) , i'll be sure to check that out , i have my blender up to date :D though . – Robert Feb 23 '17 at 15:29