Ir para o conteúdo
ou

Software livre Brasil

 Voltar a Projeto Soft...
Tela cheia Sugerir um artigo

Francisco Fernandes: A more dynamic pouring

8 de Julho de 2012, 0:00 , por Software Livre Brasil - 0sem comentários ainda | Ninguém está seguindo este artigo ainda.
Visualizado 44 vezes

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!


Fonte: http://pedepinico.blogspot.com/2012/07/more-dynamic-pouring.html

0sem comentários ainda

Enviar um comentário

Os campos são obrigatórios.

Se você é um usuário registrado, pode se identificar e ser reconhecido automaticamente.