I've used the obj2opengl script to convert some model and I got compilation error when I used it in the project.
it turns out that the texCoord array contains some blank value and cannot be compiled . I tried to delete those blank value but then the program won't work. how do I solve this problem?
here's some of the blank value on the .h file
float dog_02TexCoords [] = {
// f 3/1431/3 197/1/197 4/2/4
0.235946, 0.395279,
0.212643, 0.327336,
0.217045, 0.388558,
// f 197/1430/197 3/3/3 1/4/1
0.212643, 0.327336,
0.235946, 0.395279,
0.262182, 0.301458,
// f 199/5/199 1/6/1 18/7/18
0.336774, 0.296922,
0.262182, 0.301458,
0.322877, 0.372427,
// f 3/8/3 18/9/18 1/10/1
0.235946, 0.395279,
0.322877, 0.372427,
0.262182, 0.301458,
// f 2/11/2 7/12/7 6/13/6
0.417335, 0.193511,
0.448565, 0.226249,
0.483148, 0.171084,
// f 786//786 785//785 775//775 776//776
, ,
, ,
, ,
// f 787//787 786//786 776//776 777//777
, ,
, ,
, ,
// f 787//787 786//786 776//776 777//777
, ,
, ,
, ,
// f 788//788 787//787 777//777 778//778
, ,
, ,
, ,
// f 788//788 787//787 777//777 778//778
, ,
, ,
, ,
// f 789//789 788//788 778//778 779//779
, ,
, ,
, ,
// f 789//789 788//788 778//778 779//779
, ,
, ,
, ,
// f 790//790 789//789 779//779 780//780
, ,
, ,
, ,
// f 790//790 789//789 779//779 780//780
, ,
, ,
, ,
// f 791//791 790//790 780//780 781//781
, ,
, ,
, ,
// f 791//791 790//790 780//780 781//781
, ,
, ,
, ,
// f 792//792 791//791 781//781 782//782
, ,
, ,
, ,
// f 792//792 791//791 781//781 782//782
, ,
, ,
, ,
// f 783//783 792//792 782//782 773//773
, ,
, ,
, ,
header file generated from obj2opengl fail to compile
Hi, can you PM me your OBJ mesh file ? I can take a look at it.
header file generated from obj2opengl fail to compile
Hi, I looked at your file and tried to convert, and indeed the generated file is missing coordinates;
it could be a bug in the conversion script, maybe try exporting the OBJ again from Blender or test with different models;
header file generated from obj2opengl fail to compile
Okay thank you for the help.
I have gone through opening the OBJ with blender and re-export it.
but no luck. the texture is missing. well maybe I'll take a look at it again
thanks :)
header file generated from obj2opengl fail to compile
Hi fugogugo,
I hope you can sort it out; in my experience, creating simple meshes in Blender and then exporting to OBJ usually does not create such problems like the one you experience; however I never tried with more complex models.
header file generated from obj2opengl fail to compile
hi AlessandroB ,
the link you give brings to 404 pages. but luckily after I googled I got the right link http://ksolek.fm.interia.pl/Blender/
thanks for the idea. I'll give it a try.
header file generated from obj2opengl fail to compile
Hi,
if you have models made up of multiple parts, where each part has a different material/texture, then the easiest would be to export the individual parts of the complex model, creating more than one exported file;
header file generated from obj2opengl fail to compile
hehe I am afraid that's not a feasible option.
I'm still new in this 3D development and don't really understand about it. plus I don't know how to exporting models per part. LOL
maybe I'll look after different model though.
header file generated from obj2opengl fail to compile
I see.
Thanks for the Blender export tip; very helpful to share this here !