wavefront

Do Wavefront .obj files support animation?

*爱你&永不变心* 提交于 2019-12-17 19:57:39
问题 How does one export a 3D Studio animated model to OBJ format (if possible)? What will be the resulting file like? How would I read that? 回答1: No, .obj files do not support animation. You can check the .obj specification for details of what it does support. You could potentially export one .obj per frame, but that would be cumbersome. Depending on the tools, it may be possible to export one .obj per keyframe. 回答2: Blender 2.63 can export animations in .obj, with each keyframe (as hypothesized

Mixed topology (quad/tri) with ModelIO

青春壹個敷衍的年華 提交于 2019-12-13 17:07:11
问题 I'm importing some simple OBJ assets using ModelIO like so: let mdlAsset = MDLAsset(url: url, vertexDescriptor: nil, bufferAllocator: nil, preserveTopology: true, error: nil) ... and then adding them to a SceneKit SCN file. But, whenever I have meshes that have both quads/tris (often the case, for example eyeball meshes), the resulting mesh is jumbled: Incorrect mesh topology Re-topologizing isn't a good option since I sometimes have low-poly meshes with very specific topology, so I can't

Problems Using Wavefront .obj's texture coordinates in Android OpenGL ES

不想你离开。 提交于 2019-12-13 15:55:20
问题 I'm writing an android app using openGL ES. I followed some online tutorials and managed to load up a textured cube using hard-coded vertices/indices/texture coordinates As a next step I wrote a parser for wavefront .obj files. I made a mock file using the vertices etc from the tutorial, which loads fine. However, when I use a file made using a 3d modelling package, all the textures get messed up Below is how I'm currently getting the texture coordinates: First I load all the texture

Loading big OBJ files results in model corruption?

余生长醉 提交于 2019-12-13 06:27:00
问题 I wrote a obj loader. It's very simple but I'm sure it works. I checked values in file and the ones printed by the loader and they match. Problem occurs when I try to load a big obj file like stanford dragon or Bunny. Utah teapot (3664 verts) works perfectly fine, however dragon (50k verts) is rendered horribly wrong: As You can see something is wrong with the dragon. It seems like only part of triangles is being rendered. P.S. All models have been triangulated. Mesh loading: void Mesh::load

Parsing wavefront obj file consists of polygons in three.js

情到浓时终转凉″ 提交于 2019-12-11 11:13:22
问题 In my 3D object; I have several boxes like; But if I try to load and display obj and mtl file with three.js, 5-sided or more-sided objects not loaded properly ( like below ) . Then; I discover that three.js supports only 3-sided or 4-sided faces. Is there any solution to divide these faces in object file and load them ? 回答1: You need to triangulate your model before exporting it. Most 3D editors out there have this option. Some editors have that as option in the OBJ exporter options. If that

How to parse or load .obj file in JOGL? [closed]

旧城冷巷雨未停 提交于 2019-12-10 12:12:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I'm trying to load a car object made with 3DS Max into a JOGL program but I don't know how to do that. I have searched online but haven't gotten a good result. I tried this but got no result. Is there a tutorial on how to do that? or how to write your own loader? or an already written class that I can use? 回答1:

Loading an OBJ file, how to use normals (#vertices < #normals)

一世执手 提交于 2019-12-09 20:11:36
问题 I have an obj file and have succesfully loaded the object to opengl without using the normals given. This is how it looks: The format of the file is: v x y z vn x y z f x//x' y//y' z//z' The displaying function of the mesh is like that: glBegin(GL_TRIANGLES); for all faces { glVertex3f(.., .., ..); glVertex3f(.., .., ..); glVertex3f(.., .., ..); } glEnd(); And the result is this: I've read that the object might look flat due to the default normal vector that OpenGL uses for lighting equations

Understanding normals indices with Wavefront Obj

别来无恙 提交于 2019-12-09 19:17:22
问题 I've written a C++ Obj file loader that I can't get to work correctly. The problem is that while parsing a simple obj file like the following: # Blender v2.62 (sub 0) OBJ File: '' # www.blender.org mtllib cube.mtl o Cube v 1.000000 -1.000000 -1.000000 v 1.000000 -1.000000 1.000000 v -1.000000 -1.000000 1.000000 v -1.000000 -1.000000 -1.000000 v 1.000000 1.000000 -0.999999 v 0.999999 1.000000 1.000001 v -1.000000 1.000000 1.000000 v -1.000000 1.000000 -1.000000 vn 0.000000 0.000000 -1.000000

Writing my own OBJ parser that loads the data in VBOs, how to re-order data to match single index list?

大兔子大兔子 提交于 2019-12-08 12:39:08
问题 I've been trying to convert an OBJ parser that I wrote previously that used display lists to use VBOs instead, and have attempted to see if I could figure out the issue myself without any outside help, but now I think I have been looking at the code too long and am unable to find any errors. This is an Android App, through OpenGLES 2.0, and I end up with some triangles up on the screen, but not in the correct places at all. I have a feeling that my attempt to get all of the elements of each

OBJ Parser with Boost Spirit - Ignoring comments

半世苍凉 提交于 2019-12-08 01:03:46
问题 I'm trying to write a basic OBJ file loader using the Boost Spirit library. Although I got it working using the standard std::ifstreams, I'm wondering if it's possible to do a phrase_parse on the entire file using a memory mapped file, since it seems to provide the best performance as posted here. I have the following code, which seems to work well, but it breaks when there is a comment in the file. So, my question is how do you ignore a comment that starts with a '#' in the OBJ file using