mesh

GMSH 3D surface mesh

隐身守侯 提交于 2020-01-06 07:28:32
问题 I've been trying without success to create a 3D SURFACE mesh using GMSH (v.3.0.6). The problem that I am having is, after creating the surface and generating the mesh, when I read the .MSH file, I get a bizarre node numbering, i.e., not all the normal vectors are oriented outward, some points inward. I tried to create a cube and a sphere, but I always face the very same problem. Below is the .GEO file I created using the GMSH GUI for the cube. // Gmsh project created on Fri Apr 20 17:08:44

Three.js material isn't applied correctly to hexagonal faces

让人想犯罪 __ 提交于 2020-01-05 12:28:11
问题 I have a mesh, created in blender and exported to .obj. The mesh looks valid and has UV map applied and exported into the same .obj as well. For some reason, when I try to apply a texture material, or even basic material to the mesh, only half of the hexagon is actually painted. This is a mesh This is the code var container; var camera, scene, renderer; init(); animate(); function init() { container = document.createElement( 'div' ); document.body.appendChild( container ); renderer = new

Three.js MeshBasicMaterial doesn't work as expected

回眸只為那壹抹淺笑 提交于 2020-01-05 10:07:11
问题 I am trying to create a texture with Three.js. My source of texture_f1 is a .png file witch means you can see the background through it. The problem is that if i try to set background color: 0xffffff it doesn't work in combination with map:. If i set only the color:0xffffff , it return a white, but when use with map: like this var material_f1 = new THREE.MeshBasicMaterial({ map: texture_f1, color: 0xffffff}); i can see the background through the .png black . 回答1: If you have a transparent

Creating spherical meshes with Direct x?

筅森魡賤 提交于 2020-01-04 15:17:13
问题 How do you go about creating a sphere with meshes in Direct-x? I'm using C++ and the program will be run on windows, only. Everything is currently rendered through an IDiRECT3DDEVICE9 object. 回答1: You could use the D3DXCreateSphere function. 回答2: There are lots of ways to create a sphere. One is to use polar coordinates to generate slices of the sphere. struct Vertex { float x, y, z; float nx, ny, nz; }; Given that struct you'd generate the sphere as follows (I haven't tested this so I may

degenerated vertices and GL_LINE_STRIP

倾然丶 夕夏残阳落幕 提交于 2020-01-04 06:33:57
问题 I'm on iOS 5.1 I was trying to display several batch of lines in the same vertex array and I wanted to separate them using degenerated vertices. But it does not seem to work. I line is drawn between each batch of vertices. Googling the problem gave me results that degenerated vertices was not compatible with GL_LINE_STRIP but I'm not really sure about it. Can someone confirm that? And also what's the alternative ? 回答1: As far as I know, you can only draw a continuous line using a single

Quadrilateral Meshing Library

跟風遠走 提交于 2020-01-04 02:05:36
问题 I am trying to find a meshing library written in C# to mesh custom shapes using quadrilateral meshes only. Here is an example of the algorithm/Code I’m looking for. But this isn’t free and written in ANSI C. http://members.ozemail.com.au/~comecau/quad_build.htm 来源: https://stackoverflow.com/questions/4638351/quadrilateral-meshing-library

good data structure for triangular mesh [closed]

心不动则不痛 提交于 2020-01-02 08:45:29
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . I am looking for a memory-efficient yet convenient data structure for a 3D mesh or face-set consisting of triangles. Currently I am using this 'classical' structure: a list of points, and a list of triangles. Each point has a X, Y, and Z value. Each triangle has three indices

Difference between visualizing a mesh and its point cloud

旧城冷巷雨未停 提交于 2020-01-02 06:42:07
问题 I'm working with PCL and a Mesh editor (MeshLab). I'm interested in importing my meshes to PCL to do some 3D processing. I've a mesh model in ply format. When I load the model with the code: PointCloud<PointXYZRGBA>::Ptr cloud (new PointCloud<PointXYZRGBA> ()); pcl::io::loadPLYFile<pcl::PointXYZRGBA>(argv[1], *cloud); and I visualize it as a point cloud: visualization::PCLVisualizer viewer ("Model"); viewer.addPointCloud (cloud,"model"); the geometry is different from loading and visualizing

How to merge adjacent coplanar faces on a mesh

佐手、 提交于 2020-01-02 05:07:15
问题 I am looking for a method / algorithm that will allow me to merge several adjacent coplanar faces on a 3d mesh into a single face. I am hoping that this will optimize my mesh generation program, because right now it generates many 'little' triangles. When I look at the final 3d object on the screen, I can see that they all are oriented in the same direction and they could be replaced with one bigger triangle that encompasses the whole lot! I hope that is clear what I am trying to do. Thanks

How to create a .mesh file with OGRE?

混江龙づ霸主 提交于 2020-01-02 04:38:09
问题 I'm relatively new to OGRE graphics engine, so my question may seem too obvious, but searching for relevant information was not successful. Given: I have an OGRE application with a scene created of some meshes, lights, cameras and textures. It is rather simple, I think. That all is represented by a tree of scene nodes(internal object). The goal: To save the full tree of scene nodes or, preferably, an indicated branch of nodes of the tree to a ".mesh" file. To be able load it later as any