Home Technical Talk

Setting vertex index numbers

polycounter lvl 9
Offline / Send Message
felipefrango polycounter lvl 9
We're experimenting with GFX in Unity and there's a particular effect that could be achieved using a Mesh Emitter on Systematic mode, where particles spawn on a mesh's vertexes at random - or, on Systematic mode - following what I believe to be the order of the vertex indexes.

My question is, is there any way I can easily assign indexes to a mesh? A script where I could "vertex paint" the numbers or something? Or at least select them in succession? Thanks in advance.

Replies

  • Rick Stirling
    Options
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    Have a look at Morphix for Max.
  • felipefrango
    Options
    Offline / Send Message
    felipefrango polycounter lvl 9
    Thanks for the suggestion, but I don't think it'll do the trick. Actually I don't think there's anything like what I need. Basically we're trying to make shield GFXs for our spaceships and we'd like to use the very ship mesh to spawn the particles, but if I could renumber the verts I could make particles spawn from the front to the back of the ship in a customized pattern, for example.
  • Eric Chadwick
    Options
    Offline / Send Message
    Maybe you could assign vertex colors to the vertices in a gradient, then possibly use those RGB values to control your particle events? Like, vertices with gray (22,22,22) fire first, then vertices with gray (23,23,23) fire next, etc. You could even store different patterns in each of the vertex color channels (RGB, maybe even Alpha)
  • felipefrango
    Options
    Offline / Send Message
    felipefrango polycounter lvl 9
    That is a good idea indeed, but unfortunately I'll have to keep it in mind for another time as Unity's particle system is so limited it's not even funny. It doesn't even support particle rotation. :poly127: Maybe it would be possible through some custom scripting but that's way out of my league, and the guy who could probably do it has tons of stuff to do with higher priority. Either way, thanks for taking the time to answer, at least I learned a bit in the end. :)
Sign In or Register to comment.