.obj

What types of geometry definition file format is best used with ray tracing to include the type of material

泄露秘密 提交于 2019-12-05 06:00:18
I wanted to use .obj format, but I noticed that it doesn't have representation for the type of material, i.e. opaque, transparent, reflective. Is there a common file format that includes that information as well, or should I just take the known .obj format and change it so that it'll include that info? you might want to check mtl-files. Haven't (yet) used it myself though ;) http://people.sc.fsu.edu/~jburkardt/data/mtl/mtl.html and http://people.sc.fsu.edu/~jburkardt/data/obj/obj.html Cheers .obj can referance .mtl files, which can hold opaque, transparent, reflective, colours, refractive

.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592

落爺英雄遲暮 提交于 2019-12-04 05:36:25
I am trying to load an .obj model into my c++ opengl 3 code but for some reason it gives me this error : 1>Linking... 1>.\bunny.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x6592 I tried to search for similar errors, but there were about .dll's or .lib's. Can you please help me out with this issue. I have also tried with different obj models but it always gives me this error. You are trying to load your object model with a C++ linker (probably you have just added it to the project, and now it tries to be compiled). The linker can process .obj files, but it waits them to

THREE.js OBJLoader - load to Geometry, manipulate, then save to BufferGeometry

会有一股神秘感。 提交于 2019-12-03 17:04:41
I'm trying establish why I can't smooth shade geometry loaded with OBJLoader. var loader = new THREE.OBJLoader(manager); loader.load('/manmodel/js/man.obj', function (object, materials) { console.log(object); console.log(materials); man = object; man.traverse(function (child) { if (child instanceof THREE.Mesh) { child.geometry.computeFaceNormals(); child.geometry.computeVertexNormals( true ); child.material = new THREE.MeshPhongMaterial({ color: 'white', shading: THREE.SmoothShading // <----------- THIS IS THE PROBLEM }); } }); man.position.y = -10; scene.add(man); }); This is the result: If I

Assimp and D3D model loading: Mesh not being displayed in D3D

限于喜欢 提交于 2019-12-02 09:01:44
问题 I would like to load models into D3D using Assimp. I would like to understand more how Assimp handles indices as I am having trouble getting it to work with obj models in a form i understand. For instance, for an obj model with faces as int/int/int, as I iterate through the number of faces: for (unsigned int x = 0 ; x < paiMesh->mNumFaces ; ++x) { const aiFace& Face = paiMesh->mFaces[x]; assert(Face.mNumIndices == 3); for (unsigned int k = 0; k< nidx;k++)//triangle list { i1 = Face.mIndices[k

Assimp and D3D model loading: Mesh not being displayed in D3D

霸气de小男生 提交于 2019-12-02 06:49:43
I would like to load models into D3D using Assimp. I would like to understand more how Assimp handles indices as I am having trouble getting it to work with obj models in a form i understand. For instance, for an obj model with faces as int/int/int, as I iterate through the number of faces: for (unsigned int x = 0 ; x < paiMesh->mNumFaces ; ++x) { const aiFace& Face = paiMesh->mFaces[x]; assert(Face.mNumIndices == 3); for (unsigned int k = 0; k< nidx;k++)//triangle list { i1 = Face.mIndices[k]; Indices.push_back(i1); } } i notice that my Indices vector seems to only contain numbers in an

Export a three js textured model to a .OBJ with .MTL file

左心房为你撑大大i 提交于 2019-12-01 01:19:52
问题 I would like to be able to export an obj file just like in this example http://threejs.org/examples/#webgl_exporter_obj However, i would like to export the .obj file with corresponding textures in the .mtl texture file (i have seen obj files with "usemtl someTextureNameFromMTL") I have seen this question but the exporter seems to be exporting only mesh. I have also found this question but that discusses importer only. The thing i wanted to implement is to make a 3d printable editor that would

Linking C .obj files into Delphi application, resolving standard C dependencies

£可爱£侵袭症+ 提交于 2019-11-30 10:50:54
I compiled libxml2 with BCC 5.5 command line compiler, now I have lots of .obj files which I'd like to link into my Delphi application. Unfortunately, I get lots of "Unsatisfied forward or external declaration" errors, pointing to standard C library functions like memcpy, open, recv etc ... What should I do to compile it correctly? I'd like to avoid depending on msvcrt.dll or any other external libraries. Thanks in advance! Depending on the version of Delphi you have, there should be a unit called crtl.dcu with which you can link. Just use the $L directive for each .obj file in a unit that

Linking C .obj files into Delphi application, resolving standard C dependencies

心不动则不痛 提交于 2019-11-29 15:41:39
问题 I compiled libxml2 with BCC 5.5 command line compiler, now I have lots of .obj files which I'd like to link into my Delphi application. Unfortunately, I get lots of "Unsatisfied forward or external declaration" errors, pointing to standard C library functions like memcpy, open, recv etc ... What should I do to compile it correctly? I'd like to avoid depending on msvcrt.dll or any other external libraries. Thanks in advance! 回答1: Depending on the version of Delphi you have, there should be a

Loading an .obj with JOGL

喜你入骨 提交于 2019-11-28 12:22:39
I have found may tutorials on loading an obj, but nothing on how to load it and use it with java, anyone have links to any useful tutorials? The closest that I could find were: JOGL-ES Chapter 2 - Loading OBJ Models OBJ File Format OBJ Loader, Renderer Independent Keep in mind that JOGL is a very low-level API. Some of the higher-level APIs (JMonkeyEngine, and Java3D) have sophisticated APIs built in for handling this sort of thing. With JOGL, you will be doing much of the work yourself. Obviously, there are advantages and disadvantages to each approach. Not a tutorial, but how about some