I would like to use dynamic texture to add a picture to the existing texture, using the mode of illumination map, but it will cause the image to lose its original appearance. Is there any way to make dynamic texture have diffuse texture effect?Without overwriting the original diffuse texture
https://www.babylonjs-playground.com/#JUKXQD#427
You may want to use the ambientTexture slot then:
https://www.babylonjs-playground.com/#JUKXQD#430
Thank you very much for your answer, but it’s not my intention. I want to overlay the image of the dynamic texture on the basic texture of its original shape, based on the original diffuse of the model, such as paste effect, “use descals”. I want to place the image according to the UV coordinates
Emissive then?
https://www.babylonjs-playground.com/#JUKXQD#433
You can also do it with a custom material:
Thank you very much for your answer, but lighting is not the effect I want, I originally hope to add a logo pattern on the basic material of the clothes :咧嘴:
Thank you very much for your answer, this is exactly what I wanted, but I tried to use the material ‘CustomMaterial’ in the react project, but it’s not in the core babylonjs package.My babylonian js version is “4.1.0”.
from gh
from npm
npm i @babylonjs/materials
from unpkg
https://unpkg.com/browse/@babylonjs/materials@4.1.0/custom/
intro by @nasimiasl
readme
https://github.com/BabylonJS/Babylon.js/blob/preview/materialsLibrary/src/custom/readme.md
Thank you very much for your reply, but I installed ‘materials’ in the react project and introduced it in the way of the Babylon document, but it didn’t work. Did I cite the wrong way?
npm install --save babylonjs-materials
import * as BABYLON from ‘babylonjs’;
import ‘babylonjs-materials’; :沉思的:
import { CustomMaterial } from 'babylonjs-materials';
maybe.
or in vscode
import { <putCursorHereAndPressCtrl+Space> } from 'babylonjs-materials';
Thank you very much, but it didn’t work out. I’ll try something else :smoke_smile:
Thank you very much, I have succeeded in your method, just referring to the separate ‘CustomMaterial’ class,Then the instance object, without BABYLON