Dynamic textures with diffuse reflections?

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

You may want to use the ambientTexture slot then:

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?

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”. :sweat_smile:aaa


1 Like

from gh

Babylon.js/babylon.customMaterial.min.js at master · BabylonJS/Babylon.js · GitHub

from npm

npm i @babylonjs/materials

from unpkg


intro by @nasimiasl

CustomMaterial Samples


Babylon.js/readme.md at preview · BabylonJS/Babylon.js · GitHub

1 Like

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 :grinning: