Forum

Dynamic buffer vertex coloring

This because of how indexed geometry works, for instance quad you have only 4 vertices, but you will need 6 indices (two triangles) so in the end your vertex count gonna be 6…
In the moment indexed geometry passed from CPU to GPU it gonna be decomposed to one large array or buffer and total amount of points will be amount indices needed to create all the triangles…

@schlonzo i think this approach is more what you want…
callmenames1.zip (7.4 KB)
@antokhio
I see your amazing help patch to import .obj as emitter in a lighter way…
one question, is here a way to use object texture to coloring vertexes or sprites?!
thanks in advance

Yes it’s quite easy, however geometry can have different layout and it’s hard to predict the layout of vertices user gonna use, so in most of cases this stuff provides most basic setup…

I’ll look for the help patch but, I suggest to look on layer emitter, since it gives much better and predictable results then a geometry emitter…

1 Like

I completely comfused ! :( layer emitter just load a small part of model !
I should notice .obj file is a approximately big size scanned building
I have tested different .obj file and everytime they have different layers in 4v as you said !
thanks for your consideration

Layout is not layers, layout means every vertex can have position, texcoord, normal, color, etc… and if you write something like “use texcoord” and there is no texcoord, then you get an exception in the shader, after which it would display nothing, there is ways to do checks in shader code, but then code get’s to bloated and cumbersome…

So the answer not that great for you, you need custom emitter and moded sprite node…
I would help, but i’m busy atm…

1 Like