is there any way possible to to edit vertex colours during run-time in UDK, with a script or actor somesort, i want to try and make something based on some natural selection 2 art and want to find a way to do infestation that is slowly over taking the map.
which visually i can pully off easily with a vertex paint shader and some tessellation, but i can olny paint that in, im hoping there is a way i can make it spread at runtime.
Replies
cheers
ya i could do that paint in some vertex data, than animate a scaler value that it is multiplied by by the painted in vertex data. but in that case it would all fade it around the whole map at the same rate, instead of starting in 1 location and spreading out, unless i try to paint the vertex data in as gradients, and if i wanted to make it climb something i could mess about with a vector and the world position, but i'm not sure how i could make it spread outwards on the floor.
i was really hopeing there was some way to access vertex colour data during runtime so i could just script a actor that changes vertex colour data around a user set radius.
im sure there prolly is some way possible using world position and vectors, but not sure how i would go about it.
it would be the same every time i guess unless you linked in some random variable that was generated at runtime (i'm not 100% on how to do this but i'm sure it's possible with kismet) or did you want the infection to be dynamic based on the player? you could probably do that with some trigger volumes affecting the material somehow (again not 100% - havent used kismet that much but i'd bet it's possible)
how exactly did you want to animate the vertex colour data without using gradients?
if you post up the concept you want i'll try and have a look at knocking up a shader tomorrow if i have time.
If i just make this for portfolio reasons i could just fudge it with the vertex colour gradients and the worldpostion, dot product and animated vector. but ya i really was more just wondering if there was some dynamic way to access the vertex colour data, was thinking if i could get the data and figure out how it works i could write some uscript that essentially re-colours a vertex than spreads to the vertex's it's attached to and repeats the the whole function with maybe a radius around the actor where this stops happening, since it would have been cool if it was a dynamic effect that would happen around say a alien structure that was placed by the player.
and yes it is possible in both Uscript and kismet to take a make a random number and place it into a scaler material paramater, and the same can be done with vectors in uscript but not kismet.
dont worry about trying to make a shader up most of these work arounds i have already used the core elements from in other shaders of my and have experience with those ideas.
thinking i may be able to take advtange of this, http://udn.epicgames.com/Three/ScriptedTextures.html
edit: found a realy easy and cheap way of doing it too.
i can just plug the "World Position" node into a "SphereMasks" A input than into B plug in a vector 3 that contains the coordinates of the origin of the spread, than hook in a scaler parameter into the radius that i can up to cause it to spread out more from the initial location.
with the addition of some maskes i might be able to make that look ok, and maybe even some pre painted vertex colour too to give it a interesting path as it grows in.