8.7.12

A more dynamic pouring

Hi again!

I modified the brush so we can apply velocity and acceleration on the particles based on the mouse movements. In the brush settings, we can set how much sand can drop while pouring it on the canvas, with the sand depletion marked. I will make a better way to control this behaviour in the widget since the values are pretty low for the real amount of sand (when you select the value "50" in the "amount" spinbox, you can add 5000 particles per stroke). The solution I'm thinking is to add a multiplier button, like in the Pixel brush, so the user can add more with low values of the "amount".




Another news is that we can't use the QGraphics Framework due to performance issues. The framework make the selection and collision more easy to handle, but it's really slow for what we had in mind, so I will work on my own code for that.

For now, I'm thinking in the way to divide the canvas in a grid. Using this division, I can use a faster data structure to retrieve particles close to the mouse position and do some processing on then. I already made something similar in the Granular Particles Simulation and I think it won't be a problem to adapt it to the brush.

Regards!

2 comentários:

  1. Pentalis8:50 PM

    Great job Francisco. We're back on track, blogging regularly, and the brush is starting to come to shape, I have no doubt it will turn out great =)

    ResponderExcluir
  2. Great Chicão, muito foda! Parabéns!

    ResponderExcluir