Skip to main content

Posts

Showing posts with the label sops

Deforming RBDs again!

In this one I have changed to adding up all of the impacts rather than the mixing that was going on with the attribute transfer in the last one. It is just a vopsop which loops through the impact points and adds up the deformation. One problem I was having was when I deformed the object, the centre of mass was in the wrong spot. I couldn't figure out a good way to modify that in DOPs... so i ended up moving it in the sop solver, to get it centred again. Another problem was that the object wouldn't be in contact with the ground after it was deformed, so it would end up in mid air with no velocity.. so I added a move attribute in the sop solver, then in DOPs I used a modify data node to move the rbds. The problem with this is that for one step of the sim it would be hanging out in mid air, and then snap to the ground. I ended up just adding the move to P in SOPs after the simulation.... not great because the object isn't solved at that position. At least it doesn't sn...

Wear Shader

Just playing around with shaders - curvature and occlusion in SOPs to make a wear shader. In SOPs, made a little curvature vopsop. It is a vopsop to do curvature since the curvature SOP doesn't give a normalised result. Inside the vopsop, the neighbors of a point are looped through and the dot product of the direction to a neighbor and N is averaged for all neighbors. I shamelessly copied the idea from Dan: And some occlusion in SOPs, done in SOPs so that it only needs to be done once for all frames This is mashed a bit to get the result I want: Mult the two together: This is to represent where the surface is likely to get worn or chipped. I started with the default reflective shader and added a displacement shader that gets the wear attribute, mults it with noise, then that goes through a contrast function to give a sharp edge. That 'matte' is exported to the surface shader to control a few things in there like reflections, colour etc. hipnc file i...

Growth and L-Systems

Have been reading about l-systems, mostly papers from here . Trying to get segment growth working as described in the growth functions section (1.9) of The Algorithmic Beauty of Plants . I don't understand a lot of it but I think I got the basic idea :D. It was really confusing after a certain point when reading about l-systems, they started making a lot more sense when I actually started trying to implement stuff! The important part is that F is getting rewritten. The g parameter is incremented each time to act as an age attribute, so g is the linear growth, and then length is set by using g in a funky smooth step type function thingy ((-2*g^3)+(3*g^2)) to get a kinda sigmoidal growth. The b variable is used to control the speed of the growth. The rest is just for controlling the branching so that the l-system came to some kind of end state. Like the m parameter in A(m) which decays over generations so that it stops getting replaced eventually. The generation paramet...