Would it be possible to make hidden layers to hide vertexes in the bge?Because that would hide it from the scene.
This sounds strange.
What do you expect to happen? Vertices are never visible. All you can see are faces. The faces are defined by vertices. But you can only see the pixels of the faces.
When you want to hide parts of a mesh you can play with the transparency (material).
If you are wanting to hide faces you can add them to a vertex group and use the mask modifier
Hide a face from the rasterizer in a hidden layer.When i use the mask modifier to hide vertexes it does work in the bge.But i wish had the ability to hide and unhide vertexes in the bge.Could it possible to activate and unactivate the mask modifier in the bge?Part of the functionality is there.It just needs improvement.
Weird, I thought you could just change the vertex color alpha as it has all these alpha specific functions and properties… Turns out we can’t?
But I think what would make the most sense here when talking about faces would be to just move them out of the view.
Don’t be mistaken, I don’t think there is any way to hide vertices or faces from the rasterizer.
You can’t gain performance in bge by trying to hide vertices, as the mesh does get processed as a whole.
They just won’t be visible.
When i used the mask modifier on a thousand spheres and let only half the vertexes be seen i got 60 frames,
Cool! Didn’t expect that.
Do you have the demo? So we could see before and after comparison.
Does the mask get created before or during the game run?
Does the mask/vertex groups create more draw calls?
Pretty sure it creates something along the lines of ‘two meshes’ before the game launch, meaning you can’t change the affected faces ingame. I could be wrong, but I’ll wait for the smarter people response.
can u explain what ur really trying to do?
Move vertexes or faces to hidden layer.When out off view.When in view move them back from hidden layer.since it is one mesh.It would better than instancing.Make vertexes or faces not visible to rasterizer when they are not in view.When they are in view show them.
You have not answered neither of our questions.
I think you were trying to answer cuervo1003 question, which was for what use-case do you need this, not 'please explain in the worst way possible what you are currently doing.
This is to limit the draw calls for openworld videogames.The less faces rasterizer sees the better the framrate.Heres is the blend.Look at layer1 and layer 2 through the cameras.Then compare what happens in the bge.https://www.sendspace.com/file/187hpt
Your test did not show anything improving nor was it even set up right.
Not even the test spheres were set up the same way…
But anyway, you were right.
At 27000 objects the ms was 111ms and 66ms.
All while the vertex count was the same in bge.
You are most likely interested whether A) It can be controlled in game and B) whether vertices can be randomly assigned/removed for masking.
As I have no idea how the mask modifier works in bge, maybe someone else could elaborate?
mask2.blend (528 KB)
Yes something like that.Then you would not have to move vertexes.I think it is better.