I’m currently trying to find the Batch. I see that you can get the Batch Group using app.batcher.getGroupByName BUT, that doesn’t reference the Batch in any way, it’s just the Batch Group that you create using the editor.
No idea how to find the actual batch and access its meshInstance.
Yeah, i’ve progressed a tad after that post. But still got nowhere tbh.
I set the console log to delay by 1 second, then I could access the properties. HOWEVER, setting the material shader params like I would set it on the individual mesh Instances material, doesn’t seem to work, it doesn’t do anything.
The material that the batch uses is correct and has the custom shader chunks, but still it doesn’t get the parameter updates.
Actually, the transformVS (vertex shader chunk) isn’t correct, it has been overriden to default.
When I try to set it directly on the batch meshInstance, the mesh disappears from the scene.
When I try to set it to a temporary material and then set the material to the batch meshInstance, the same happens…
Hey, you’re free to use this “as is”. It was an experiment and it includes:
Procedural mesh generation.
I don’t think you’ll be able to use it easily because it’s all kinda hacked together in a messy way. But if it can educate you into how to approach grass with this engine, you’re completely free to fork, study the code, and do whatever you please with it
I have plans of eventually releasing a proper grass system plugin when the PlayCanvas Team updates the Asset Store to allow for more stuff to be in etc.