Change vertex positions on a plane by customizing the meshStandardMaterial

Hi !

First of all, sorry if I made a mistake asking the question here, i’m new to both three.js and this forum :slightly_smiling_face:

I would like to animate the vertex positions on a plane, using a meshStandardMaterial in order to benefit from it’s built-in PBR features.

This animation I have in mind is very much like this one (except they’re using a ShaderMaterial :sweat:) :

I’ve been using the onBeforeCompile method in order to customize the <begin_vertex> ShaderChunk on my meshStandardMaterial but i’m not even sure it’s the right way to do it :frowning_face_with_open_mouth:

Is this the only way of animating vertices on a meshStandardMaterial ?
What ShaderChunk should I be customizing in order to achieve the Sandbox example above ?

Thanks a lot :innocent:

You should be able to achieve all your hopes and dreams by simply using a displacement map (like this.)

It is built-in, it can be animated, it requires no math or custom materials :relieved:

damn I knew i was missing something obvious :sweat_smile:

Thank you so much !! I’ll look into it right now :stuck_out_tongue:

1 Like