Questions tagged [wavefront]

OBJ (or .OBJ) is a geometry definition file format first developed by Wavefront Technologies for its Advanced Visualizer animation package.

334 questions
0
votes
1 answer

Reading obj files! (Indices)

What I want to do is read the faces(f), but they have "/" that I don't know how to remove? Basically what I want, is to get the faces number stored in a temporary variable. I have no idea how to do it in c++ fstream. std::string text; …
Matie
  • 67
  • 6
0
votes
1 answer

Problem when toggling between coordinates of a wavefront (.obj) in three.js

So I have a slider in my HTML with values ranging from 1 to 2. When I have the slider value set to 1, I want to set the coordinates of my wavefront to the one described by arrayMin and when the slider is set to 2, I want the coordinates of my…
aapap
  • 105
  • 14
0
votes
1 answer

Getting the texture scale with assimp

I'm trying the texture scale from the .mtl file. Opening the file in notepad I can see that it has map_Kd -s 4.000000 4.000000 1.000000 crate_diffuse.dds I am trying thte code below but it returns aiReturnFAILURE. for (UINT j = 0; j <…
Callum
  • 25
  • 1
  • 4
0
votes
1 answer

Is there a library for converting Wavefront .obj files to XAML?

I have a large number of Wavefront .obj files that I need to convert to XAML MeshGeometry3D elements. I can do this manually by importing them in Microsoft Expression Blend and copying the XAML, but it would help greatly if I could automate the…
Matthew
  • 28,056
  • 26
  • 104
  • 170
0
votes
1 answer

Does a wavefront material file need all color types specified, or can just one work?

The basic wavefront object file can omit or include many things. I am wondering if that is also true for the wavefront material file (.mtl). Available to me are: Ambient color Diffuse color Specular (Ks), weighted using the specular exponent…
Tyler Shellberg
  • 1,086
  • 11
  • 28
0
votes
1 answer

.OBJ OpenGL wrong render

anybody knows, why it happen? A try to render OBJ file with Opengl. // (0 - индекс вершины / 1 - индекс текстурной координаты / 2 - индекс нормали) for i := 0 to length(faces) - 1 do begin glBegin(faces[i].mode); Count :=…
Anna Robin
  • 33
  • 3
0
votes
0 answers

Find neighbor faces of selected face

I'm trying to make an algorithm to find the neighbor faces of a selected face. This is what I have so far that is not working: vector Face::DeterminarFacesVizinhas(vector Faces){ vector Lista = {}; bool flag = false; …
Karbust
  • 67
  • 2
  • 10
0
votes
2 answers

How to automatically crop an .OBJ 3D model to a bounding box?

In the now obsoleted Autodesk ReCap API it was possible to specify a "bounding box" around the scene to be generated from images. In the resulting models, any vertices outside the bounding box were discarded, and any volumes that extended beyond…
0
votes
1 answer

Change .OBJ's memory texture in runtime using Assimp

In my program (C++/OpenGL/Assimp/Windows10), I load and display a .OBJ file with its corresponding .MTL It all works fine, but I need to: load from memory instead of whatever is written in the .MTL file (ex : map_Kd output.jpg). I need to change…
Mrax
  • 63
  • 9
0
votes
2 answers

Getting Segmentation fault while loading OBJ file

I am getting 'Segmentation fault(core dumped)' in C++ using gcc after adding this piece of code to my OpenGL program vector vecTofloat(vector veca){ vector fa; for (int i = 0; i < veca.size(); i++){ …
SarojKr
  • 65
  • 3
  • 12
0
votes
3 answers

How to convert part of a big std::string into a float efficiently?

void OBJLoader::load_vec(const char* line_prefix) { size_t jump = 0; size_t strpos = 0; if (line_prefix == "v ") { while ((strpos = buffer.find(line_prefix, strpos)) != string::npos) { strpos++; …
Big Temp
  • 434
  • 4
  • 12
0
votes
0 answers

Broken textures with Mapbox GL and THREE.js

I've been using the Add a 3D Model Mapbox GL example as a template to add 3D objects to my Mapbox map. It works but sometimes has issues with textures. I'm loading an OBJ file and adding it to the scene. Here's what the model looks like in a plain…
danvk
  • 15,863
  • 5
  • 72
  • 116
0
votes
1 answer

Multiple OpenGL Textures not working in some instances?

I am trying to load OBJ files to use them in OpenGL. Every object in the OBJ file has its own texture. In my code I split up every object of the file into a struct that is defended like this: struct ObjModelComponent { std::vector
user11914177
  • 885
  • 11
  • 33
0
votes
0 answers

vertex index correspondence between two meshes

I have two wavefront obj of human face. One is a generic human-face and other is a mesh created from a 2D picture. I want to map the generated human-face mesh onto the generic mesh. The problem is that they have different vertex indices. generic…
Atqa Amir
  • 1
  • 4
0
votes
1 answer

Mapping multiple textures when converting files from .obj to .usdz

I want to convert an .obj file with multiple materials to an .usdz file. When running the command it only applies the last material in line to the whole object. The .usda file it creates shows that none of the textures are applied to each Material,…
julian3003
  • 11
  • 1
  • 3