GridMaterial colored axis?

Hi here,

the GridMaterial exploration continue.
do is possible to have only the two main lines color as red for the x axis and blue for the z axis ?

this time i do not provide any scene exemple because i am like without any imaginative ideas to how approach this using the GridMaterial.

thx.

Hi lluull. SOME people do this…

https://www.babylonjs-playground.com/#1VFIK2#3 (lines 22-37)… coded by someone else.

I added the .001 values to all the Y values on the points… to make sure the axes lines were slightly above the ground… avoids any possible “z-fighting” problems. I don’t think there is a built-into-gridMaterial way to do this… but others might comment soon… with better ideas.

1 Like

Hi Wingnut,

thx for the answer.

yep of course, there is alway a way to create additional lines and manage them any time some changes are made to main grid (scaling, change global to local etc…).

i was hoping because we have this nice grid plane and material, it be nice to have also built in axis color with some minimal dedicate methode.

who know, maybe is a good ideas for future version of this great engine.

ps: i hope so the dev’s team see this :slight_smile:

1 Like

Hey this could be a good opportunity to do a PR :slight_smile:

Pinging @sebavan as he wrote the initial material to see if he has ideas on how to do it fast

not sure there is an easy way, @Wingnut answers is probably the easiest