FAQ Database Discussion Community

Finite Element - Plotting with stresses in triangle mesh

I'm making program where I need to plot some area which has been split up in many triangles. I have calculated strains in each node / each corner of the triangle. Now I need to plot the triangle with the strains. Now I have three ways of plotting the triangles....

Encode Mesh from text-file

I want to encode a 3D-Model with this text-syntax-structure to Blender: <p> c(255,84,22) fs(-1) p(-9,-8,27) p(-9,-23,27) p(-7,-24,63) p(-7,-11,63) </p> What's relevant to create the mesh are these: <p> marks a face-container (like in HTMLs) c marks the color p marks the vertex coordinates (min. of 3 in each face-container) </p>...

draw texture on triangle mesh

I am trying to draw a texture on a triangle mesh. I get the mesh but not the picture on it. See on the picture below. As you can see that's a plain triangle but no texture in it. String vertexShader = "attribute vec4 a_position; \n" + "attribute vec4 a_color;\n"...

Why my mesh vertices are moved by the same offset and not by offset calculated by bezier curve

I have a tough one (I think) problem. I am prepearing a game with a part, which is a race. I want to make it similar to oldschool "Lotus" games. Player will see a car from behind, a a road should have turns from time to time. So my idea...

Libgdx - map shader to world

I have a 2d level with box2d doing the physics. I have implemented the following water effect described in this tutorial. I am using one OrthographicCamera which is centred on the main character sprite. The camera follows the sprite and as it reaches the edges of the level the camera...

Unity Game Engine Crashing When Trying To Update The Vertex Positions Of A Mesh In Real Time Using A Script

So in unity I’ve created a script which successfully generates a plane mesh made up of triangles. The plane is has 400 vertices (20x20 grid) with 361 squares made up of 2 triangles comprising 3 vertices each (2166 indices). As was mentioned the vertices, indices and normals are set in...

What programs export .mesh?

I need to export some USGS (U.S. Geological Survey) DEM (Digital Elevation Model) data into .mesh format. I need it to be in the Roblox's .mesh format though. The only program that I know that does this is Anim8tor's program. Basically it makes the .mesh look like this: version 1.00...

Place MeshVIew in Scene

I want to display a 3D figures on a MeshView in JavaFX. Since I want to build a simple model viewer I created tabs for clarity. One of them contains a group (meshGroup) where I add a SubScene (with the MeshView in a group) on runtime. I'm not able to...

Connect devices using Multipeer connectivity in ios

I am trying to connect 10 devices (5 iOS and 5 not) to peer2peer lan using Multipeer connectivity. And then send file from first device to last throughout other 8 devises. Is it possible and how can I do it?

Interactive Meshes in Three.js

I new to javascript and three.js so this is probably a noob question. BTW, I'm working on the example interactive/cubes/tween and I'm trying to modify it to test something else. At the moment the MouseDown event gives the tween effect to the intersected geometry, here's the function: function onDocumentMouseDown( event...

combining several iterations of same object in different location using .add() or .merge()

I am trying to make a coil with several small loops. I have a custom function to create a single helix for each loop, and at first I was calling that within a for loop several hundred times, but it was taking too long to render and slowed down the...

Get a mesh node from a transform node in Maya C++ API

I want to get a shape/mesh object under a transform node active in Maya. If I select and object (e.g. a poly sphere) in Maya, when calling getActiveSelectionList method, it returns a transform node, not a shape/mesh one. I'm getting crazy reading the API classes (MDagPath, MSelectionList, MFnDependencyNode) and methods...

Difference between cell, mesh and samples

What is the difference between cell, mesh and samples from a graphics/Visualization point of view? I read a lot and I still cannot seem to figure out the difference between a cell and a mesh and how does that impact my samples?...

In D3D9, how to find the normal vector of a specific triangle in a mesh?

I load a mesh and use D3DXIntersect function to find out which triangle of that mesh I'm about to hit, next I need to know the normal vector of that triangle so I can align myself accordingly. D3DXIntersect lets me know the distance, the face index of the triangle and...

Three.js normals update on object rotation

I use a 3D object as a container for a few meshes. I am using an Orthographic camera. I vertically rotate the container by 90° like this: meshContainer.rotation.x = 0; meshContainer.rotation.y = - 90 * Math.PI / 180; meshContainer.rotation.z = 0; camera.updateProjectionMatrix(); I have to do operations on the meshes...

Detect hole in geometry

I am working with a serialization pipeline. I am taking a model and exporting it. I do not wish to export any model with a hole in a face. How would I detect a hole and report a error? I have access to all vertexes, edges, faces etc. Here is...

Mesh tilemap and scrolling

I'm working on a top-down game where the player can move up, down, left, or right. I've come across tilemaps but since using Unity, I'm seeing the idea of using Meshes. I don't quite understand how this works. Is it one mesh (two triangles) per tile? If I want to...

How to draw each a vertex of a mesh as a circle

How to draw each a vertex of a mesh as a circle?

What mesh file types are supported for input by the C++ library CGAL?

I've searched through the documentation, and it appears that they at least support .off files. http://doc.cgal.org/latest/Mesh_3/index.html However, I want to know if they allow for input of STL files as well, before I trouble myself with trying to use the library....

Algorithm for cutting a mesh using another mesh

I am looking for an algorithm that given two meshes could clip one using another. The simplest form of this is clipping a mesh using a plane. I've already implemented that by following something similar to what is described here. What it does is basically inspecting all mesh vertices and...

Save an OpenGL mesh from the current viewing point

I have an OpenGL visualizer (using OpenTK). It's supposed to open a mesh file in the PLY format, and display it. The user is able to move around the object, rotate or scale it. At the end, the user should be able to save the mesh into a PLY file...

THREE.js Migration r60 to r70: now cannot write: mesh.position = myVector3()

I am migrating a THREE.js app from r60 to r70. Amongst other changes I notice that r60 constructs of the following form no longer work in r70. mesh.position.set(0,0,0); myVector3 = new THREE.Vector3 (100,200,300); mesh.position = myVector3; This applies to meshes, pointLights, presumably to all Object3D's but I havent tested further....

Something wrong with weighting

I have some model, on which I am trying to weight some parts of mesh. On one part something goes wrong - part of textures of mesh is deforms on weight painting. For example, if I use instrument Mix in Weight Paint, some textures goes sticky to some points, which...

How to draw different tiles using an IBO?

My aim is to draw a bunch of "blocks" using a mesh in OpenGL. I can draw a mesh with a VBO and an IBO. But I don't know how to handle texture coordinates because in my "concept" not each adjacent block shares the same texture coordinates. But by using...

MeshNormalMaterial color

In default MeshNormalMaterial example, the color of cube wall is changing because it uses this THREE.ShaderLib[ 'normal' ] shader. This shader sets gl_FragColor by this gl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );. Can anyone explain me this formula? which vector of cube is normalized? Are...

Rotate Object around Pivot Point

I am creating gizmos on all the vertices in a mesh, but when I do this, the object is straight up and down, but the gizmos are sideways. As you can see in this image, the character is straight up and down, but the gizmos are rotated 90 degrees, so...

Mesh data structure used in popular 3D software [closed]

Anyone knows what kind of mesh representation data structures (half-edge, quad-edge, winged-edge etc) popular software like Lightwave 3D, Maya, Softimage, 3D studio and others use?

Mesh class called with default constructor not working OpenGL C++

I created a Mesh class for OpenGL 3.3, it works fine when I create the class with a non-default constructor, when I create the vertices when I create the object. However, I now want to have multiple objects that I can create dynamically by putting them in a vector, so...

How to read in FBX 2014 indices properly for DirectX?

I've been having this very annoying problem for the past weekend. I have to be able to to read in a triangulated 2014 FBX file that contains a mesh exported from Maya and read in it's vertices and indices to be passed to the renderer (DirectX) for the DrawIndexed call....

Create 3D model of text with rounded/filleted or beveled corners

I am trying to programmatically create the 3D model of text with beveled or rounded corners. See the following image for an example. Another requirement is speed. It should be possible to create a model for a 10 letter word in less than 10s. OpenScad is to slow. I also...