Category : .obj

#include <iostream> #include <fstream> using namespace std; int main(){ string myText; ifstream MyFile("obj_cube.obj"); while (getline (MyFile, myText)) { cout << myText; } MyFile.close(); } I am just able to read obj file for now. So how should I convert it into STL file after reading. Source: Windows Que..

Read more

I made an .OBJ loader with reference to the reference site. I would like to know how to set the normals and UV coordinates correctly. Comment section below ///// I want to know what to do with the internal code. I imported the .OBJ file with a blender. What I tried Set vertex data directly ..

Read more

There is a problem with drawing .obj file to the screen. I am using fast_obj.h libary. I give the .obj file path and initialize mesh: fastObjMesh* mesh = fast_obj_read(PATH); if (!mesh) printf("Error loading %s: file not foundn", PATH); // If path isnt correct, blow a message. And Here is my struct. struct Vertex { glm::vec3 ..

Read more

Half The Model Is not applying any texture properly I am currently using assimp to import .obj files and when I apply any texture to the model. Currently how I load in the model data bool Model::LoadModel(const std::string& filePath) { Assimp::Importer importer; const aiScene* pScene = importer.ReadFile ( filePath, aiProcess_Triangulate | aiProcess_ConvertToLeftHanded ); if (pScene ..

Read more