uv-mapping

J3D - How to use a UV mapping of an object to convert 2D coordinates to 3D ones

孤者浪人 提交于 2019-12-11 14:26:08
问题 I am currently working on trying to convert 2D coordinates to 3D ones. Basically, I have the texture in 2D and I would like to be able to show on a 3D object, having the same texture applied to it, where I am pointing at. Let's say I have the 2D texture of the world. I would like to be able to know, given U,V coordinates on the texture, to get the X,Y,Z coordinates on a sphere having the same texture applied to it. I am using J3D and now I am working with blender and figure out what is the

THREE.JS UV Mapping on ExtrudeGeometry

我的未来我决定 提交于 2019-12-11 09:37:51
问题 I need to apply a texture on a ExtrudeGeometry object. The shape is a circle and the extrude path is composed of 2 vectors : One for the top. One for the bottom. I didn't choose cylinderGeometry because I need to place top/bottom sections of my geometry at precise positions and because the geometry created will not be always purely vertical (like a oblique cylinder for example). Here is a picture of a section (one top vector, one bottom vector and a shape extruded between these 2 vectors).

UV mapping in THREE.js

巧了我就是萌 提交于 2019-12-11 09:32:31
问题 I'm trying to use SDF fonts in THREE.js, they come with a PNG map of characters and some character data such as each letters x offset, y offset, width, height and so on. Before I start using the character data with the offsets and widths and things for each character, I just wanted to simply try out mapping only a part of one of the example UV textures from the three.js/examples. JSFiddle: http://jsfiddle.net/b2zegeht/3/ So the image above is being rendered onto a quad, with the following

UV Mapping a cube in Three.js not joining faces correctly

六眼飞鱼酱① 提交于 2019-12-11 05:58:24
问题 I have successfully applied an image texture to a cube via UV mapping (to produce a photo-sphere viewer). Although the texture is perfectly aligned with cube faces, the lines at which faces join are visible as thin straight lines. The same problem does not happen if texture tiles are split via Canvas and applied to cube via MultiMaterial. The following image compares results of the two methods of applying a texture (click for larger image): Live example can be found at CodePen.io The image

Blender import three.js json model with UV map

醉酒当歌 提交于 2019-12-11 05:57:42
问题 I guess not much people need to import three.js json file to Blender, but I lost my original Blender file and want to recreate it from json that I exported earlier. Latest three.js git only has exporter and no importer. I tried using old json importer (from this link https://github.com/Bangybug/three.js/tree/master/utils/exporters/blender/2.71/scripts/addons/io_mesh_threejs) but it does not load back UV maps, only model and textures, so I wonder if there is some importer that could do this?

Calculating UV coordinates during mesh extrusion

纵然是瞬间 提交于 2019-12-11 05:05:12
问题 I'm currently implementing a mesh extrusion algorithm for plane shapes, let's assume for a rectangle. When I extrude this rectangle I create four new sides (resulting in 8 new triangles) and a new bottom for the 3d shape. This works fine when I duplicate all vertices so that my final cube has 24 of them. But I'd like to avoid these extra vertices now so that I have only 8 vertices. Unfortunately, in this case I do not know how to calculate the UV coordinates and I keep getting wrong results

Buggy UV coordinates of sphere in OpenGL?

匆匆过客 提交于 2019-12-11 00:30:51
问题 I am having buggy texture map on my sphere. The issue is well known but solution is rare. This is my code for generating UVs for a sphere. T = triangles, Nv = vertex normals. for (int i=0; i<nbF; i++) { float tx1 = atan2(Nv[T[i].v1].x, Nv[T[i].v1].z) / (2.0f*M_PI) + 0.5f; float ty1 = asinf(Nv[T[i].v1].y) / M_PI + 0.5f; float tx2 = atan2(Nv[T[i].v2].x, Nv[T[i].v2].z) / (2.0f*M_PI) + 0.5f; float ty2 = asinf(Nv[T[i].v2].y) / M_PI + 0.5f; float tx3 = atan2(Nv[T[i].v3].x, Nv[T[i].v3].z) / (2.0f*M

OpenGL ES texture mapping

て烟熏妆下的殇ゞ 提交于 2019-12-10 20:24:50
问题 I need to draw circles in my Android application. Actually it is a Pacman game and I need to draw tablets. Since there are many tablets on field I decided to draw each tablet with a single polygon. Here is the illustration of my idea: http://www.advancedigital.ru/ideal_circle_with_only_one_polygon.jpg Vertex coordrs: // (x, y) 0 : -R, R * (Math.sqrt(2) + 1) 1 : -R, -R 2 : R * (Math.sqrt(2) + 1), -R Vertex coords are calculated relative to circle center to place circles with ease later. The

Calculating planar UV coordinates for arbitrary meshes

我怕爱的太早我们不能终老 提交于 2019-12-09 11:07:23
问题 I have code that generates triangle mesh from 2d shapes. Because those shapes in most cases have uneven vertex distribution on the surface I have an issue with generation of UVs so that it wouldn't cause texture distortion. Anybody can suggest some articles, books, code samples that talk about techniques of UV calculation on planar meshes? Thanks 回答1: ok lets see if I understood your question. You have a planar mesh with vertices (x_i,y_i,z_i), since the mesh is planar you can find a rotation

Is animating a tile in a tilemap (quad per tile) mesh by changing quads uv position logical and efficient?

∥☆過路亽.° 提交于 2019-12-08 05:00:43
问题 I am new to procedural mesh generation and uv mapping from sprite atlas. So I don't know whether a solution that come to my mind is efficient, logical and "best way", or neither of these. I am currently making a procedural tile map "engine-y" in Unity. I had a question about it here few days ago, (i asked whether to use a mesh or multiple sprite objects) and by the given answers i am now proceeding with the mesh generation way. I've created the base structure-framework in my mind. I even made