RayCast from camera to particle test
#1
I've a task that requires me to RayCast from a camera to a particle to decide if particle should be visible.
I have an object that is scattered with particles that are bound to that object skin. As the object rotates and the camera moves, the object will occlude some of the particle's view from the camera. I'd like to turn off the rendering or de-shape those particles and have them come back on when they are seen by the camera. So this is a continuous test.

This must be possible. Anyone have a clue as to how this would be approached?

Andy
  Reply
#2
The Script operator has built-in raycasting functions that would make this very easy. Without the script operator...the Surface Test operator has a raycasting mode and within that mode you can choose 'direction from velocity' as the raycasting direction. So prior to that operator you just need to have your particles modify their velocity to move towards the camera...then do the test...then after the Surface Test operator clear the velocity so they don't actually move. Then you can test particles like that and move them in/out other events to do the shape swapping or whatever. Somewhat straightforward I guess, but messier than a script.
  Reply
#3
I think I got it figured out. And, it is with Surface Test and direction from velocity just like you said. The Object Bind and snap to surface works fine to hold in place with velocity. The flow is actually rather simple, thought it would be a mess. Test rendering now.

Andy

Although, I think I need to send the particle velocity toward the camera.


Attached Files Thumbnail(s)
   
  Reply


Forum Jump: