fredag 20 maj 2016

Working under unfortunate conditions

Last night, we found ourselves stranded in a peculiar situation: we only had a single computer at our disposal. Starting out from the tutorial mentioned in our previous post, we attempted to reconfigure the force and deformation towards a color change within the vertices. By default, materials / shaders in Unity are not able to follow color change in vertices. Scouring the net we found an alternate shader which allowed for the change of colors at our leisure, unfortunately this disabled the use of textures.

Our approach towards the spreading of fire was borrowing the force system from the tutorial, creating impulses with dynamic intensity dependant on the distance.This meant that we had to loop over all the vertices once and apply an intensity. Each burning vertice would have a possibility to “spread” by creating another impulse at its position.

Another approach we thought of was creating a network of neighbors related to each individual vertice, meaning that the system might be more controllable. Unfortunately, the task of sorting neighbors into arrays was demanding and we didn’t understand it enough to make any significant progress.

We managed to get the colors to change depending on the mouse’s position over the object (see fig 1.), but when it came to spreading the color, it was uncontrollable. See you next time when we will escape this dire situation!


Fig 1.

Inga kommentarer:

Skicka en kommentar