A
A
amorphine2016-07-15 00:40:54
JavaScript
amorphine, 2016-07-15 00:40:54

What strategy should be used to change the texture of individual parts of an object using three.js methods?

There is a task to create a constructor for products in which users can change some visual characteristics. For example, put your logo on a flash drive or phone case.
During the day I was studying three.js and decided that the best way to do this is to do the following:

  1. A 3d artist in a 3d editor (I tried blender) draws a solid object. For example a flash drive.
  2. Breaks an object into component meshes. For example, a flash drive connector has a permanent metal texture, and it will not change, but the main part will be changed by the user.
  3. Applies default materials to permanent elements.
  4. Exports each part to a separate json file.
  5. On the backend, all json files are imported into the stage. When exporting, blender saves the coordinates of the object, so as a result of importing all parts, a whole flash drive / case / something else is visually obtained.
  6. In jsons, you can set some flags for individual meshes, on the basis of which the GUI component will create the necessary buttons for editing - load the texture, shift the texture, etc.

This is my first look at the problem, I will be glad if you offer your own version. The task is to avoid the need for software rendering, because for each type of flash drive (and there can be many) we cannot write code to apply default textures, etc. The maximum possible work should be done in the editor.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Grabko, 2016-07-15
@amorphine

everything is correct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question