P
P
Pavel Kilin2013-12-08 06:58:11
JavaScript
Pavel Kilin, 2013-12-08 06:58:11

Dynamic Textures in Three.JS

Hello. I do not know how to implement the display of different textures on different parts of the map. I use Three.JS, the map is a regular Plane.
At first I wanted to draw a map in canvas, and then overlay it as a texture on Plane. Then I thought of making the whole map from small (128x128) Planes and applying their own texture to each. But in all cases, performance is a concern.
Example:
warcraft-3-battle-2.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SHVV, 2013-12-09
@borodyadka

The easiest option is to apply several textures to the mask. That is, we need a shader that will mix several textures depending on one controller. In this case, the control texture with masks must be unique for the entire map, and the rest of the textures can be repeated an arbitrary number of times.
There is a good article on mixing terrain textures in Unity. Shader basics should be the same for ThreeJS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question