1
votes

Prehistory of the question:

Link to related question on CG (about UV unwrapping in some editor like 3dsmax for model mentioned below)

I have a model of single item. It is exported from 3DS Max (with texture coordinates).

Screenshot of UVWs and object. Useless part of UVWs are grouped on the top right corner.

3ds max UVW editor

I am using this texture as bump map (resized to take less place in the question, original size is 512x512).

Bump map for the question

This model is loaded with THREE.OBJMTLLoader and rendered in browser with threejs. Of course, this texture and UVWs become useless if I need to reuse this mapping to add another texture that would require all parts of the object.

Now lest go out of 3DS Max, because this question is not about building a model there.

Now lets imagine a cube (let it be simply THREE.BoxGeometry) that exists somewhere in the scene (scene.add( cube );).

I want to draw an image on the left size of the cube. On the right side I need to place a bump map and on the top side will be a light map. On the other sides texture maps could be somehow combined or just empty - I guess thats not critical point.

Like so:

Question UVs example

But in this case each map will take only 1/16 of avalable place. Like so:

Question UVs example 1 in 12

Of course, some blocks could be be moved and each map will obtain up to 1/9 of avalable space, but I need good quality of each texture, so it would be excellent to use entire block (1/1) for each texture like so.

Question UVs example 1 in 1

For example, textures could be 512x512, bump map could be tiled (see image from prehistory).

The question is:

  • Whats steps I need to perform to use all avalable space for each texture?
  • What technique(s) could help to achieve such result?
  • Best practice / guideline / advice / link to an article / example - something that lead to right direction
1

1 Answers

2
votes

Is it possible to use several different UWVs for single object to add different textures?

Three.js materials basically support up to 2 UVs channels, but give no controls over which channel use for a given texture. The first channel is used for tilable texture (diffuse, roughness etc). the 2nd one is used for non tilable (AO, lightmaps)

That said, with a custom geometry and a custom material, you can use as many uvs channels as you want. The only limit is the maximum attributes available in your shader (at least 8)

3DS Max has no limits for the number of uvs channels either.

The main issue is to export/import your models in a format which also support multiple UVs channels. OBJ don't.

Is it possible to use UWVs only for part of model to avoid space wasting?

You can simply use different material for the part which do not need texture