SvenP Posted May 27, 2006 Share Posted May 27, 2006 I am working on a particle smoke shader and getting the particle positions into the shader so that i have my noise function in particle space with a per particle offset is easy but now i am trying to get the particle roations into the shader . What i want is to be able to get the noise to rotate around my particle centers but at the moment i have no idea how to do that . Would be nice if anyone could help me a bit. Sven Quote Link to comment Share on other sites More sharing options...
AdamJ Posted May 28, 2006 Share Posted May 28, 2006 Here's one way of doing it.. in this case I just rotated the lookup for texture to see the effect, but you could rotate the lookup for 3d space noise the same way. The 'pointNumber' is used as the multiplier for the angle rotation per grid. rotateLookup.zip Quote Link to comment Share on other sites More sharing options...
SvenP Posted May 28, 2006 Author Share Posted May 28, 2006 Thank you but i think i was not clear enough with explaining my problem. I know how to rotate something if i have an angle for the rotation but my problem is how to calculate the angles for every axis. In pops i have an up vector and an rot vector generated by angular velocity and now i need to calculate the rotation angles between my up and rot vector and i am doing the whole thing in code not in vops . Sven Quote Link to comment Share on other sites More sharing options...
AdamJ Posted May 28, 2006 Share Posted May 28, 2006 ah I see.. you could get the axis angles with direction cosines dirCos.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.