A list of puns related to "Wavefront .obj file"
I am building an iOS game in Swift 3 with OpenGL ES and trying to load in an .obj file. Looking around on the web all I can find is loaders written in C++, Objective-C & C. I'm wondering 2 things:
Any feedback would be super useful. Thanks in advance!
I have my own C++ code that creates OBJ files. I am wondering if OBJ is even supported with floating point textures files. All examples I have seen are using TGA files. I would like to use something like Blender to modify the geometry, but I want my textures to be preserved.
Related question 1: are single channel textures (say, only Red, or Luminance) even supported by OBJ?
Related question 2: My textures will have values > 1.0. I saw that OBJ has a "scale" optional parameter, so maybe I can use that to scale my textures to 0->1.0?
Thanks for any help!
Hello 3d scanning group!
I recently purchased a Sense 3d scanner from 3D systems for some work only to find out that the OBJ file format that the Sense software is able to create is Per Vertex color format OBJ where I need a Wavefront OBJ with corresponding MTL file. Does anyone know a way to translate a Per Vertex Color OBJ file to a Wavefront OBJ with either a texture map, or simple color information? I have 3DS Max, Maya, and Blender at my disposal to try to figure this out. The Sense scanner also exports STL and PLY files. I know STL does not store color information, and PLY is also Per Vertex. Thanks for any help you can provide.
As a follow-up to my earlier post, here are the shards exported as wavefront obj files (along with a simple .mtl describing the texture):
http://goo.gl/bdwN33
Example: https://skfb.ly/6nCWr
So I am working on a mod that focuses on special crystals that can be found in the world, but I want my crystals to be custom rendered using .obj files and blender. the problem is when I make a model on blender and then export it as a wavefront .obj file and try to use it it crashes giving me this in console.
[Client thread/ERROR] [FML]: The following problems were captured during this phase [15:24:10]
[Client thread/ERROR] [FML]: Caught exception from crystallinemagic net.minecraftforge.client.model.ModelFormatException: Error parsing entry ('f 29 30 31 26 25', line 68) in file 'crystallinemagic:obj/Crystal.obj' - Incorrect format
now from my understanding it has something to do with the way blender is writing the model code. Does anyone know how to fix this?
I wouldn't normally blog about hacking the internals of raylib, but to be honest it was a fair bit of work and it does opening up things quite a bit if you know about this particular change...
http://bedroomcoders.co.uk/raylib-upcoming-changes-to-wavefront-obj-loading/
Hello there!
This is just a small post to announce luminance got its third chapter released today, and itβs about loading a 3D object and rendering it with an omnidirectional light! Itβs a sequel to the second chapter that you should read too, but this is not necessary to understand the concepts of this new chapter.
You can find the wiki page here.
As always, feel free to provide feedback about the wiki and your experience with luminance. Keep the vibes!
Hi all,
Apologies in advance for my lack of technical knowledge as I have practically no experience in CAD or 3D modeling.
I want to load a 3D CAD model into a Unity application at runtime. I just want to visualize and perform simple manipulations on the model and all of its parts (e.g. transform, scale) within a 3D virtual scene. I found out that I can export the CAD model (specifically .prt from Creo) as a .obj (with associated .mtl file) and easily pull it into Unity. The resulting mesh seems to work out well for visualization purposes, but I am wondering what information is lost in this .prt->.obj conversion.
Is the .obj mesh inherently worse in quality? Is any metadata retained in the .obj or .mtl that I could access and query?
Another option to load a CAD model at runtime may be .fbx...Would this be preferable to .obj and why?
Thanks for any insight!
I needed a simple library to read .obj files, so I stumbled across what I thought would be a convenient library, libobj
. Things were going well until I found this method:
inline void obj::obj_parser::face_callbacks(const triangular_face_geometric_vertices_callback_type& triangular_face_geometric_vertices_callback, const triangular_face_geometric_vertices_texture_vertices_callback_type& triangular_face_geometric_vertices_texture_vertices_callback, const triangular_face_geometric_vertices_vertex_normals_callback_type& triangular_face_geometric_vertices_vertex_normals_callback, const triangular_face_geometric_vertices_texture_vertices_vertex_normals_callback_type& triangular_face_geometric_vertices_texture_vertices_vertex_normals_callback, const quadrilateral_face_geometric_vertices_callback_type& quadrilateral_face_geometric_vertices_callback, const quadrilateral_face_geometric_vertices_texture_vertices_callback_type& quadrilateral_face_geometric_vertices_texture_vertices_callback, const quadrilateral_face_geometric_vertices_vertex_normals_callback_type& quadrilateral_face_geometric_vertices_vertex_normals_callback, const quadrilateral_face_geometric_vertices_texture_vertices_vertex_normals_callback_type& quadrilateral_face_geometric_vertices_texture_vertices_vertex_normals_callback, const polygonal_face_geometric_vertices_begin_callback_type& polygonal_face_geometric_vertices_begin_callback, const polygonal_face_geometric_vertices_vertex_callback_type& polygonal_face_geometric_vertices_vertex_callback, const polygonal_face_geometric_vertices_end_callback_type& polygonal_face_geometric_vertices_end_callback, const polygonal_face_geometric_vertices_texture_vertices_begin_callback_type& polygonal_face_geometric_vertices_texture_vertices_begin_callback, const polygonal_face_geometric_vertices_texture_vertices_vertex_callback_type& polygonal_face_geometric_vertices_texture_vertices_vertex_callback, const polygonal_face_geometric_vertices_texture_vertices_end_callback_type& polygonal_face_geometric_vertices_texture_vertices_end_callback, const polygonal_face_geometric_vertices_vertex_normals_begin_callback_type& polygonal_face_geometric_vertices_vertex_normals_begin_callback, const polygonal_face_geometric_vertices_vertex_normals_vertex_callback_type& polygonal_face_geometric_vertices_vertex_normals_vertex_callback, const polygonal_face_geometric_vertices_vertex_normals_end_callback_type&
... keep reading on reddit β‘Hi guys,
For the past couple of days I've been having a crack at getting WaveFront OBJ files loaded, as well as finally getting around to having a go at some indexed drawing, but I'm having a few issues (and I'm not sure if it's my implementation or understanding).
I'm currently trying to draw the classic suzanne.obj exported straight from Blender with Triangular faces enabled, Up=Y-up, Forward=Z-forward and normals and uv co-ords disabled. However, when I go to draw, I get nothing drawn to the screen. I have got a triangle mesh class that draws correctly with glDrawArrays( ), so there's no issue with my context/shaders. Here's the code I'm using (sorry for the spaghetti)
#include <fstream>
#include <iostream>
#include "../include/wfobj.hpp"
int err = 0;
static std::vector<std::string> splitString(std::string& str, std::string delim)
{
std::vector<std::string> ret;
std::size_t pos;
while((pos = str.find(delim)) != std::string::npos)
{
ret.push_back(str.substr(0, pos));
str.erase(0, pos + 1); // Erase string and delimiter
}
ret.push_back(str); // Push back last string
return ret;
}
void objmdl::Load(const std::string& path)
{
std::string line;
std::ifstream objfile(path);
std::vector<std::string> split;
if(!objfile.is_open())
{
std::cerr << "Unable to open a handle to file: " << path << std::endl;
return;
}
char type;
while(std::getline(objfile, line))
{
type = line.c_str()[0];
if(type == '#' || type == ' ' || type == 'o' || type == 's')
continue;
if(type == 'v')
{
type = line.c_str()[1];
split = splitString(line, " ");
vertex3f v;
v.x = std::atoi(split.at(1).c_str());
v.y = std::atoi(split.at(2).c_str());
v.z = std::atoi(split.at(3).c_str());
verts.push_back(v);
}
else if(type == 'f')
{
split = splitString(line, " ");
vertex3u v;
v.i = std::atoi(split.at(1).c_str()) - 1;
v.j = std::atoi(split.at(2).c_str()) - 1;
v.k = std::atoi(split.at(3).c_str()) - 1;
index.push_back(v);
}
}
std::cout << "vert.size() == " << verts.size() << std::endl;
std::cout << "index.size() == " << index.size() << std::endl;
// First, we generate our VAO
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
// Now generate our buffer
glGenBuffers(1, &vbuff);
glBindBuffer(GL_ARRAY_BUFFER, vbuff); // Bind this VB
... keep reading on reddit β‘I know some people are interested in getting their hands on the various models found in the Ingress apk in a slightly more.... interchangeable format.
I posted this a while back in a thread about Ingress models, but I decided it was time to brush the dust off thing thing and update it to use the latest version of the parser I had written. I also realized that the version I had posted previously was a much earlier version.
Anyway, enjoy. Instructions are in the box. Parses out vertices, uvs, faces, and lines. Materials would have to be handled separately, but they're typically just flat u,v mappings into genericModTexture.png (with some exceptions, of course, i.e. shards).
I am writing a loader for wavefront obj files to learn opengl and because I will probably need it in the future. I finished the vertex loading and rendering. Now I am trying to implement materials. I was thinking of using a one-size fits all GLSL shader. I was wondering if there were any pre-made implementations of this or any tutorials for it.
I am modeling a scene as individual parts and intend to export these to obj files which will then be merged externally. I have put empties in my blend files to get reference points for how to place the objects relative to each other. When I tested exporting to obj, I saw no trace of the empties in the exported obj files. How can I preserve my empties?
I tried to import a model I made from blender to Zbrush it is an OBJ file. When I import it holes appear in the face and hands. I tried to triangulate them and then do triangulate to quad but, it had no effect. I am usure what the issue is as this is my first time with both softwares.
Thank you
https://preview.redd.it/2vmpm5ith3a81.png?width=780&format=png&auto=webp&s=a9b0e85eee0edd7eb515eedff499f76208e0bc58
https://i.redd.it/niva4djnmw281.gif
Since Autodesk is deprecating Meshmixer, is there any way to import an obj with the textures (defined in an .mtl file) into Fusion 360?
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.