Using material library

Hi,

I am trying to use CellMaterial but got 404 error for cell.vertex.fx. I followed this tutorial Babylon.js Playground, which mentioned nothing about vertex shader.

I’m using es6 module for material library, I wonder has it something to do with it? My import is like this:
import {CellMaterial} from "@babylonjs/materials";

Pinging @sebavan

w000t, this should definitely work, are you using the latest preview of 4.1 ???

I remember it has been fixed during 4.1.

Hi sebavan,

Sorry about late reply, I was on holiday for a month.

The playground displays the cell material correctly, the problem occurs when I try to use CellMaterial locally.

Babylon stuff in my package.json:
image

The code for using CellMaterial:


As you can see, with the line commented out, everything works fine.

But once I put it back:

The box becomes invisible, the wireframe is because I selected the box from inspector

And I get this error from console window:

yup your versions look out of sync, they should all point to the same @preview :slight_smile:

1 Like

Thanks man, I’ll give it a try after work :grin:

I used the same version, but it still reported an errorE~HML2S0G6))}IXM6`FEV

you can try :
“babylonjs”: “~4.2.0”,
“babylonjs-gui”: “~4.2.0”,
“babylonjs-loaders”: “~4.2.0”,
“babylonjs-materials”: “~4.2.0”,

2 Likes

ok,thank

1 Like