The external import model has two sets of uv, uv is for storing texture, uv2 is for storing lighting information, how should I store lightmap on uv2；code show as below
child.emissiveMap = "lightMap.jpg" ; and set
child.emissiveIntensity = 75 ; that should make ur material emit light.
The modeler stores the light and shadow information in lightmap.jpg. The lighting is normal, but three pastes the material into uv1 by default. My requirement is to paste the material into uv2.
u can copy the material from uv1 to uv2
Yes uv2 for lightMap. Here is custom shader used.
I’m a beginner, can you provide some demo reference?
I can explaine. Into 3ds max i export model with default UV to OBJ format.
Than in 3ds max make flatten UV for lightmap, bake lightmap and export to OBJ format.
In three.js load default model. then load second model which contain UV lightmap and set this UV lightmap to uv2 of default model. Second model not need to add to scene.
Thank you, I made a uv error when I converted the fbx model to the glb model, which caused the problem
Thank you, I made a uv error when I converted the fbx model to the glb model, which caused the problem, thank you very much