Digital Art Zone

 
     
Raycasting
Posted: 28 September 2012 05:22 AM   [ Ignore ]
Member
Avatar
Rank
Total Posts:  109
Joined  2007-09-12

Hello,
I have talked to my relator today and we thought about implementing a plugin for DAZ Studio.

For working with this plugin I need to know if there are available methods to raycast from a point A to B and get the list of objects hit by the ray (or even just the first one).

Can I achieve this using the DZLine3 Class?

Thank you all.

Mattias

 Signature 

Favourite Figure: Victoria 5
My Art Gallery: http://mattiascibien.deviantart.com/
Developer of AutoCam (commercial follow-up of my thesis project).

Profile
 
 
Posted: 15 October 2012 11:55 AM   [ Ignore ]   [ # 1 ]
Member
Rank
Total Posts:  62
Joined  2004-12-26

There is no sdk provided class that provides ray casting.  You would have to implement it.  The line class will tell you if a particular line strikes a particular face, but you’d need to try this on the appropriate faces in the scene.  An acceleration structure is highly recommended if you are going to attempt this.

Profile
 
 
Posted: 16 October 2012 05:55 AM   [ Ignore ]   [ # 2 ]
Member
Avatar
Rank
Total Posts:  109
Joined  2007-09-12

thank you. I have made it work using an external library.

 Signature 

Favourite Figure: Victoria 5
My Art Gallery: http://mattiascibien.deviantart.com/
Developer of AutoCam (commercial follow-up of my thesis project).

Profile