{"id":6839,"date":"2014-04-23T08:11:40","date_gmt":"2014-04-23T08:11:40","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/problem-about-mesh-collection-of-common-programming-errors\/"},"modified":"2014-04-23T08:11:40","modified_gmt":"2014-04-23T08:11:40","slug":"problem-about-mesh-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/problem-about-mesh-collection-of-common-programming-errors\/","title":{"rendered":"problem about mesh-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5c8fc02a881af739969e39d7982d2b6c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ngenpfault<br \/>\nc++ opengl mesh<br \/>\nI&#8217;m trying to load multiple objects into a vbo in opengl. If I want to be able to move these objects independently should I use a mesh for each object or should I load all the objects to a single mesh?Also in my code I have&#8230;loc1 = glGetAttribLocation(shaderP, &#8220;vertex_position&#8221;);Now I understand that this gets the vertex positions in my current program but if I want to load another object I load the mesh and then how can I get the vertex positions again but for only that mesh?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d68d1ea2daed3c2512f2018754b78b88?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ngman<br \/>\njavascript three.js mesh<br \/>\nI want to make parts of a mesh invisible at runtime. Can I set these parts invisible\/transparent, e.g. by changing attributes of single faces? The mesh itself uses only one material.Exemplary illustration as the editor understands this question: Imagine a mesh (here with a geometry of 20 vertices) where each quad of four vertices builds up a Face4. Now, some parts of the mesh should be made invisible (here two faces are invisible).<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7937b8534fc2c9b3cb17e2783c39e27a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAdrian Krupa<br \/>\njavascript unity3d mesh<br \/>\nI&#8217;m creating a randomly generated terrain game where an enemy will follow after you. The terrain is built after launch through java script. I am using Nav Mesh Agent for the enemies path finding but it is unable to find its way around the newly created objects. Is there a way to update the Nav Mesh after launch to accommodate the new objects? Thanks in advance!<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8c9c0c14149f3eab0f5edbbf5bfac9de?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nOli R.<br \/>\njavascript canvas three.js mesh texture-mapping<br \/>\nI created a cube using the canvas renderer with r59 of Three.js. The cube has different textures on different sides. This renders okay. I can also TWEEN this cube&#8217;s position and rotation, so it&#8217;s fine.Here&#8217;s what I want to do: A) The cube has an image texture on it&#8217;s front side. B) I move this cube out of the camera&#8217;s view. C) I change the image texture on the cube. D) I move the cube back to its original coordinates so it becomes visible again.So far, steps A, B and D are working. But when I tr<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3c5be51fdeec526e1f232d6b68cc0954?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJari Komppa<br \/>\n3d procedural-generation tree mesh<br \/>\nI did not find a question on these lines yet, correct me if I&#8217;m wrong.Trees (and fauna in general) are common in games. Due to their nature, they are a good candidate for procedural generation.There&#8217;s SpeedTree, of course, if you can afford it; as far as I can tell, it doesn&#8217;t provide the possibility of generating your tree meshes at runtime. Then there&#8217;s SnappyTree, an online webgl based tree generator based on the proctree.js which is some ~500 lines of javascript.One could use either of above<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/838d4ca64151a668542524acd8f1dda1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nWardy<br \/>\nc# unity optimization mesh<br \/>\nSo i have some procedurally generated mesh data and i want to reduce it down to its minimum number of verts. In case it matters this is a unity project. Working on the basis of a simple example, lets assume a typical flat surface of points 2 by 3.The point \/ vertex at [1,1] is used in many triangles.I&#8217;ve generated mesh for a voxel type engine that adds verts to a list based on face visiblility and now I want to remove all the duplicates.Can anyone come up with an efficient way of doing this beca<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/578f0700f1ffbae718d590af24657daf?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2527567<br \/>\nc++ glsl mesh triangle phong<br \/>\nI&#8217;m trying to render a triangle mesh with Phong shading using GLSL, here is my method to assign normals.void renderWireframe(Mesh *mesh) {glDepthMask(GL_TRUE);glBegin(GL_TRIANGLES);for(int i=0; i&lt;mesh-&gt;nt; i++) { \/\/nv is the mesh&#8217;s number of trianglesint i0 = mesh-&gt;triangles[i].vInds[0];int i1 = mesh-&gt;triangles[i].vInds[1];int i2 = mesh-&gt;triangles[i].vInds[2];\/\/Calculate normals for each vertexVector fv0 = getvertexnormal(mesh, i0);Vector fv1 = getvertexnormal(mesh, i1);Vector fv<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/39e7b43d501be2755f8a328996a2d654?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nErno<br \/>\nblender scripting assets mesh asset-workflow<br \/>\nI need a script for simplifying meshes, to run on a server in headless (no GUI) mode. Are there open source (or at least gratis) tools out there I could use for this? Or, how would I script Blender to do this? I&#8217;m aware of MeshLab but it&#8217;s way too unstable, crashes left and right. I can run on Ubuntu or Windows (but would prefer Ubuntu).I&#8217;m working with Collada and Ogre formats. I can incorporate steps for conversions to\/from other formats in in the batch script, given conversion tools.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2221930bacda44146d6f95d0eb0bd415?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nElrohir<br \/>\nc++ directx mesh<br \/>\nI have been having problems on making a Load Mesh function in C++ for Direct X. I seem to get this error: &#8220;Unhandled exception at 0x00401e64 in _.exe: 0xC00000005: Access violation reading loaction 0x83e05597&#8221;. I know it is crashing on this line:D3DXMATERIAL* tempMaterials = (D3DXMATERIAL*)bufMaterial-&gt;GetBufferPointer();The whole function looks like this (I have been following along directxtutorial.com so far for direct X help). void LoadModel(Model* model, LPCTSTR File){ LPD3DXBUFFER bufM<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4bb44b6096bd41d53e3b09a1c370568d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNick Udell<br \/>\nc# directx rendering mesh vertex<br \/>\nI have some code that generates a landscape, transforms it into a mesh and then renders it.The landscape is based on a three-dimensional table and generates 4 vertices per positive table entry. I define the table size at the start.The problem there isMesh mesh = new Mesh(indexes.Count\/3,vertexes.Count, MeshFlags.Managed, CustomVertex.PositionNormalTextured.Format, device);where indexes is an array of shorts for indices and vertexes is an array of CustomVertex.PositionNormalTextured holding my ve<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6cae12f2dba4416e009d4b74cdfcf6a2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1598801<br \/>\nactionscript-3 debugging crash mesh vertex<br \/>\nEdit02: The reason why the flash crash because the wrong distance cause the programm to divide something by 0 &#8211; well I found the error on my own, but my question still is, is there something like a crashreport that you can add \/ edit?Edit: I found the bug in the script its located hereif(baseVerticies[vertX]-boneObj.x &lt; 0){distance = distance*-1;}at one point it generates the wrong distance, but this is not what the program causes to crash, I know how to solve the bug but it would still be in<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7dd50888d5b10a8df9bebac386f66ce2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nStefan Lehmann<br \/>\nperformance frameworks webgl mesh<br \/>\nI have a mesh with about 108000 triangles that should be rendered with WebGL.At the moment I use no framework, just pure WebGL. I&#8217;ve already implemented object recognition via id mapping for picking with callback functionality as well as a basic camera manipulator. Now I want to switch over to a WebGL framework for maintenance issues.I&#8217;ve already tried Three.js, but it was to slow for large meshes. Do you know a suitable WebGL framework for large meshes?EDIT:I try to render a treemap with nearly<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3b2cd9c4e2c6255ffc5d9bd43eeb476c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDanny<br \/>\njavascript arrays mesh<br \/>\nI am trying to write a OBJMesh model reader and I&#8217;ve got the OBJMesh class setted up, but when I try to retrieve the stored data in the array by creating the OBJMesh object and call the get function, it doesn&#8217;t do it.Here&#8217;s the codeOBJMesh.jsfunction OBJMesh(file) {this.modelVertex = [];this.modelColor = [];this.init = false;var rawFile = new XMLHttpRequest();rawFile.open(&#8220;GET&#8221;, file, true);var objmesh = this;rawFile.onreadystatechange = function (){if(rawFile.readyState == 4){if(rawFile.status<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a00211a1e1aa4fe920302e7b76da0d91?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmrdoob<br \/>\njavascript geometry textures three.js mesh<br \/>\nI have a loop where I create a multiple Mesh with different geometry, because each mesh has one texture:var geoCube = new THREE.CubeGeometry(voxelSize, voxelSize, voxelSize); var geometry = new THREE.Geometry();for( var i = 0; i &lt; voxels.length; i++ ){var voxel = voxels[i];var object;color = voxel.color; texture = almacen.textPlaneTexture(voxel.texto,color,voxelSize); \/\/Return the texture with a color and a text for each face of the geometrymaterial = new THREE.MeshBasicMaterial({ map: textur<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c0f12705600a431ab3a5226bc6d1c99d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2148566<br \/>\ngeometry three.js mesh<br \/>\nDoes the OBJLoader not return an object with geometry?I want to merge a loaded model into an existing. My code looks like this:var loader = new THREE.OBJLoader(); loader.addEventListener( &#8216;load&#8217;, function ( event ) {var loadedObject = event.content;loadedObject.traverse( function ( child ) {if ( child instanceof THREE.Mesh ) {child.material = new THREE.MeshLambertMaterial( { color: 0x2D303D, shading: THREE.FlatShading });child.castShadow=true; \/\/erm\u00f6glicht das werfen von Schattenchild.receiveSha<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/Y0MaL.jpg?s=32&amp;g=1\" \/><br \/>\nDarren Engwirda<br \/>\nalgorithm geometry mesh triangulation convex-polygon<br \/>\nI have a triangulated mesh. Assume it looks like an bumpy surface. I want to be able to find all edges that fall on the surrounding border of the mesh. (forget about inner vertices) I know I have to find edges that are only connected to one triangle, and collect all these together and that is the answer. But I want to be sure that the vertices of these edges are ordered clockwise around the shape. I want to do this because I would like to get a polygon line around the outside of mesh.I hope this<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e9fb3404ce88e754eca76f9ad20df4a3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nScott S<br \/>\nc# .net sockets mesh udpclient<br \/>\nBefore anyone asks, I have looked on this site quite a bit and used google extensively looking for the answer to no avail.I am attempting to create a program for a wireless mesh (adhoc in all but name). Most of the network will deal with TCP messaging but to determine all neighbor IPs (as they will be unknown on startup), I choose to use UDP Broadcast for the initial discovery messages. That code for the most part is irrelevant as initial testing appeared to work and currently I do not call it.T<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>genpfault c++ opengl mesh I&#8217;m trying to load multiple objects into a vbo in opengl. If I want to be able to move these objects independently should I use a mesh for each object or should I load all the objects to a single mesh?Also in my code I have&#8230;loc1 = glGetAttribLocation(shaderP, &#8220;vertex_position&#8221;);Now I understand [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6839","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6839"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6839\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}