# createProceduralTexture not working with Generated NodeMaterial

**URL:** <https://forum.babylonjs.com/t/createproceduraltexture-not-working-with-generated-nodematerial/18313>\
**Category:** Bugs\
**Created:** [February 10, 2021, 9:23am UTC](https://forum.babylonjs.com/t/createproceduraltexture-not-working-with-generated-nodematerial/18313 "2021-02-10T09:23:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 10, 2021, 12:42pm UTC](https://forum.babylonjs.com/t/createproceduraltexture-not-working-with-generated-nodematerial/18313/2 "2021-02-10T12:42:34Z")

</div>

`setToDefaultProceduralTexture` is indeed not what you want as it creates the default blocks for a procedural texture node material that are just added to the existing blocks: it is used by the NME itself to create the starting state when you click on “Reset to default”.

Regarding your problem, it seems first that you did not generate the code corresponding to your latest iteration in the NME, some blocks are missing. Also, the “xy” input of the `VectorMerger` is named “xyIn” internally, so the generated code `positiond.output.connectTo(PositionD.xy );` should be `positiond.output.connectTo(PositionD.xyIn );` instead. Making those changes and adding `nodeMaterial._mode = BABYLON.NodeMaterialModes.ProceduralTexture;` does work:

[https://playground.babylonjs.com/#L8IJYI#3](https://playground.babylonjs.com/#L8IJYI#3)

Of course, you should not have to do those changes yourself (and updating a private property is not a solution, anyway).

Pinging @Deltakosh as I don’t really understand the code of `VectorMergerBlock` (the inputs are registered as "xyz " and "xy " with a space in them and not as “xyzIn” / “xyIn”) and I’m not sure how to fix those problems…

---

_[View the full topic](https://forum.babylonjs.com/t/createproceduraltexture-not-working-with-generated-nodematerial/18313)._
