How to effect different parts of 1 mesh

I have a mesh out of Blender with different materials and 1 texture on it. I use just 1 UV-mapped PNG 24 texture with everything on it to texture the mesh in threes including transparency.
Here is the mesh and texture in blender.
Blender%20Mesh
In three.js this is working so far so good. The mesh is visible as it should and as it looks like in Blender.
Here is the mesh in three.js
Threes%20Mesh
Now my material code in the loader is effecting the hole mesh (texture?), light, transparency, etc…
Here is the code.
Code%20Loader
On this way, I can not have different influences on different parts of the mesh. I would like to have the possibility to influence different parts of the mesh in a different way (transparency, opacity, shininess,…)

How can I get for example reflecting eyes, but without the skin reflecting the same way?
Is this possible with just 1 texture or do I need 2 or 3 textures, depending how many parts of the mesh I want to influence differently?

How can I achieve it in three.js, so it is possible to effect different parts of 1 mesh with materials (?) / textures (?) / light?
Thank you verry much… (and also for trying to understand my english)

Why does my answer in Shining Eyes on json Character not work for you? Have you tried it out?

1 Like

Too much to read perhaps :smile:

@Markus1

Please post formatted code, not a screenshot.

Yes, I have tried it. In Blender I assigned a material to the eyemoisture everything else has another material and in Blender, it is there and it can be rendered… But in three.js the material is not visible at all, I only see the texture on the eyemoisture, even when no texture is assigned to the material. Some UV-mapping problem maybe…(?) or the export…

Maybe you get better results if you work with a glTF exporter instead. You can use the following for Blender:

This example show how to load the exported asset via GLTFLoader:

https://threejs.org/examples/webgl_loader_gltf.html

I have to use json files. It seems a bit tricky to have a mesh and 1 texture applied to it and than want, that just 2 parts of the same mesh (it has 77’000 faces) is not effected by this one texture, but by another texture or just a material. Or is this possible with just one texture?
When this is possible by just use one texture, how has the code in three.js to look like to do this?