Tag Info

Hot answers tagged

10

This is where I will use a 3D painting program. I primarily use Blender for my modeling, and it has a 3D painter built in. Being able to paint directly on the model in a 3D environment, makes the strokes continue across seams. I don't find the paint tools in Blender to be great, so I'll usually switch to something like GIMP once I've got a rough idea. Then ...


7

Texture mapping is a hard problem. For some primitives there is a mathematically sound way of finding the UV coordinates. This is only possible if we can think of a function F(u,v)->(x,y,z). An example of a figure where this is possible is the a cube. Here we can easily cut out a square for each of the surfaces. For a sphere this is also possible, here ...


5

One example is for light maps. Usually texture space is maximized by overlapping faces which have the same diffuse texture, like the six sides of a crate. With light mapping this would mean that all six sides get the same light and shadow, not to mention it would almost assuredly confuse the light mapper because it can't tell which point in space it should ...


4

I took a quick look at your example and your code. You're extremely close to solving this, so I don't mind helping with a question that looks suspiciously like homework ;). In data.js, you are assigning the same UV coordinates to the front and rear faces of the cube. The coordinates seem to be ([0,0], [0,0.5], [0.5,0.5], [0.5,0]). This means that you can ...


4

A quad with the texture coordinates 0,0 on the one corner and 2,2 on the other corner, means the texture is tiled 4 times, 2 times in each direction. Now if you have the same quad with 4,4 on the other corner instead you have the texture tiled 16 times, 4 times in each direction. If you increase the texture coordinates without increasing the size of the ...


2

I was able to get a reasonable wrap using this kind of UV layout: It's only got 2 seams, one in the top, and one in the bottom (edges 1 and 7 from the diagram above). The texture is tileable, so along the rest of the seam, it is seamless. I couldn't figure out another way to do it!


2

Try using Blender to Average then Pack your UV Map. When averaging, it fairly distributes texture space to each surface; and when packing, it fits all the islands into your texture. For a good quick tutorial on UV Unwrapping in Blender, check out this video from Blender Cookie. (It applies to the latest versions of blender) Here is a screenshot of a silly ...


2

In the edit UV's we have flatten mapping, make sure you check down all the three boxes and click ok. This will adjust your UV's automatically in the texture space. But from your image, it seems like you are texturing a track or road something like that. If in that case, i suggest you to follow this tutorial. Explains how to texture road/race track using ...


2

Golden rule when you are using floating point: count on every calculation to have an error in the result. It looks like your texture mapping is mapping a bit of memory past the edge of the textures. This may be because of floating point error. This part catches my attention: z = (1/z); uv.u = Math.round(uv.u * z *100);//*100 because my texture is ...


2

For simple shapes, you can usually find sensible unwrapping approaches by looking to papercraft (those guys are experts at unfolding shapes. Albeit backwards.) For an octohedron, you might consider the model here: http://psmay.com/wp-content/uploads/2012/01/logihedron.pdf This sort of approach doesn't entirely cover your texture the way that your ...


2

The way you could have this texture look more relaxed and less stretched out is by taking the two extreme corners, bottom left and top right and pulling them towards one another until each of them sits approximately 3x3 from squares from it's current position. If you want to keep using all of the texture image, you would need to distort the texture in the ...


2

I also thought just now about using a cubemap texture (ie 6 textures). My rationale is, if you were planning to use a 256x256=65536 texel image, you may as well use a 64x64x6=24576 texel image (cheaper!) and get less distortion and no poles. You lay the UV mapping out like this: Identifying what side is what and laying out the UV's this way is tedious ...


1

UV mapping does look like the correct way to go with this. I believe this answers your first question (but I may be wrong). About why Blender won't UV map this for you is because it's trying to unwrap it as one giant lump-thing. You need to add seams to the model so that Blender can split it appropriately - look at Blender's Official Guide to UV Mapping to ...


1

That is the general way to do it. Since OpenGL only supports one index per vertex you have to split the vertices if their attributes differ in any way. The modeling tool or exporter you use should take care of this for you (like the edge split modifier in Blender). I would say not to worry about the amount of duplicated vertices, since they're unavoidable. ...


1

You could texture map it by pretending it's a sphere or a cube. The quality of this approximation depends on how round your asteroids are. With sphere treat each vertex position as a normal and convert them to polar coordinates. This will create poles though, but at least it will be seamless. With cube you can create 6 faces that are seamless. ...


1

The texture you described with two textures packed in one is called a texture atlas. That can be useful for certain things, but I don't think it's an appropriate choice in this case, because as you found out, it breaks tiling. What you probably want is called multi-texturing or texture splatting (those are some good terms to google). This involves setting ...


1

Yep, you can export those. This is a bit of code I was using when I wrote a custom exporter: if len(mesh.uv_textures)>0: uvLayer=mesh.uv_textures.active uvLayer=uvLayer.data uv=uvLayer[faceIdx] uv=uv.uv1, uv.uv2, uv.uv3, uv.uv4 uvCoord=uv[vertIndex][0], 1.0-uv[vertIndex][1] uvCoord=roundVec2(uvCoord) else: uvCoord=v.uvco[0], ...


1

Not sure but maybe Triplanar mapping can get you going in the right direction. The link might not be the best but the graphics are good and explicit, here is another one with code.


1

UVLayout is a professional tool which is specialized in optimizing UV layouts and general UV editing. Here are some of the features (I highlighted the ones that are probably interesting for your use-case) (source): OBJ import and export Edge-loop Detection for quicker UV seam selection Symmetry Editing for faster flattening of symmetrical meshes ...



Only top voted, non community-wiki answers of a minimum length are eligible