Greetings!
I am trying to make a stencil for grass in my environment so that when the player gets inside it, he can see a certain area and I placed dummy objects in it that can be seen only if the player is near them and they can’t be seen if the player is outside the grass. Here is what I achieved so far by following this example:
https://developer.playcanvas.com/en/tutorials/stencil-buffer---3d-magic-card/
This is what it looks like
Now to the issue that I am having,
- The grass Y axis is higher than the ground obviously, so when the player gets it and the stenciled circle appears, its looks a bit odd. Here is what it looks like if the grass and ground have the same Y axis.
Notice the difference? This is exactly what I want but I want a different approach because this way in the environment, grass will not be like grass which will ruin the environment. Let me show you what I mean by that
This is when where the grass Y axis is higher in the editor.
And this is where it’s on the same level as the ground(Solve the issue but ruined the environment).
Now to Issue 2, If you zoom in you will notice that the half circle which is outside the grass is a bit different than the ground, this is again the issue with the Y axis, as I have made a duplicate of the ground and applied stencil on it, Which is again a bit higher then the ground on Y-axis.
This is difficult to explain, so if you have any part that you didn’t understand, feel free to ask, and here is the forked project. Dig in.
https://playcanvas.com/editor/scene/1491510
Any kind of help or guidance would be appreciated.