problem about mesh-Collection of common programming errors
genpfault
c++ opengl mesh
I’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…loc1 = glGetAttribLocation(shaderP, “vertex_position”);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?
gman
javascript three.js mesh
I 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).
Adrian Krupa
javascript unity3d mesh
I’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!
Oli R.
javascript canvas three.js mesh texture-mapping
I 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’s position and rotation, so it’s fine.Here’s what I want to do: A) The cube has an image texture on it’s front side. B) I move this cube out of the camera’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
Jari Komppa
3d procedural-generation tree mesh
I did not find a question on these lines yet, correct me if I’m wrong.Trees (and fauna in general) are common in games. Due to their nature, they are a good candidate for procedural generation.There’s SpeedTree, of course, if you can afford it; as far as I can tell, it doesn’t provide the possibility of generating your tree meshes at runtime. Then there’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
Wardy
c# unity optimization mesh
So 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’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
user2527567
c++ glsl mesh triangle phong
I’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<mesh->nt; i++) { //nv is the mesh’s number of trianglesint i0 = mesh->triangles[i].vInds[0];int i1 = mesh->triangles[i].vInds[1];int i2 = mesh->triangles[i].vInds[2];//Calculate normals for each vertexVector fv0 = getvertexnormal(mesh, i0);Vector fv1 = getvertexnormal(mesh, i1);Vector fv
Erno
blender scripting assets mesh asset-workflow
I 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’m aware of MeshLab but it’s way too unstable, crashes left and right. I can run on Ubuntu or Windows (but would prefer Ubuntu).I’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.
Elrohir
c++ directx mesh
I have been having problems on making a Load Mesh function in C++ for Direct X. I seem to get this error: “Unhandled exception at 0x00401e64 in _.exe: 0xC00000005: Access violation reading loaction 0x83e05597”. I know it is crashing on this line:D3DXMATERIAL* tempMaterials = (D3DXMATERIAL*)bufMaterial->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
Nick Udell
c# directx rendering mesh vertex
I 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
user1598801
actionscript-3 debugging crash mesh vertex
Edit02: The reason why the flash crash because the wrong distance cause the programm to divide something by 0 – 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 < 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
Stefan Lehmann
performance frameworks webgl mesh
I have a mesh with about 108000 triangles that should be rendered with WebGL.At the moment I use no framework, just pure WebGL. I’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’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
Danny
javascript arrays mesh
I am trying to write a OBJMesh model reader and I’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’t do it.Here’s the codeOBJMesh.jsfunction OBJMesh(file) {this.modelVertex = [];this.modelColor = [];this.init = false;var rawFile = new XMLHttpRequest();rawFile.open(“GET”, file, true);var objmesh = this;rawFile.onreadystatechange = function (){if(rawFile.readyState == 4){if(rawFile.status
mrdoob
javascript geometry textures three.js mesh
I 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 < 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
user2148566
geometry three.js mesh
Does 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( ‘load’, 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öglicht das werfen von Schattenchild.receiveSha
Darren Engwirda
algorithm geometry mesh triangulation convex-polygon
I 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
Scott S
c# .net sockets mesh udpclient
Before 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
Web site is in building