  | | | Volume selection ? | Volume selection ? 2004-06-17 - By Raffaele "ThE_JacO" Fragapane
Back There is no straightforward way.
Volume and collision objects in the SDK are logged wishes (I logged them myself during the last two cycles and I’m sure others want them as well) but they are not an easy implementation.
You’ll have to write your own volume checking, that with a polygonal object can be fairly expensive.
It’s now about a year I’m struggling to keep my library updated but it takes some proper coding to do it properly (caching and optimized progressive checks).
If you feel like tackling the task, game tutorials are your best bets, since all collision and volume detection systems in games need to be real-time you can find some pretty good examples of blazing fast code.
If all you need is checking for centers inside a bounding box volume then it’s pretty fast to write.
All you need to do is get the bbox for that volume and check center coordinates against deltas of the box’ corners.
anything more complex, like checking for actual objects and not just their centers or using actual shape volumes, requires expensive custom code.
If anybody can correct me and prove me wrong about the toughness of the task I’d love it, since it’s now a long time I struggle with this kind of issues.
~Raffaele Fragapane ~Freelance Technical Animator & TD ~Senior TA @ Peerless Camera
__ __
From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of Harry Bardak Sent: Thursday, June 17, 2004 10:58 AM To: XSI@(protected) Subject: [scripting] Volume selection ?
hi everyone.
Well i would like to script something like this :
When i select a box, every object in this box is select.
So in other word how can i detect if an object is inside another one. Wich way should i follow to do that ?
thanks by advance.
harry.
--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft -com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1= "urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC -html40">
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252 (See http://ows-1252.ora-code.com)">
<meta name=Generator content="Microsoft Word 11 (filtered medium)"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName" downloadurl="http://www.microsoft.com"/> <!--[if !mso]> <style> st1\:*{behavior:url(#default#ieooui) } </style> <![endif]--> <style> <!-- /* Font Definitions */ @(protected) {font-family:Tahoma; panose-1 (See http://ose-1.ora-code.com):2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} p {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; font-size:12.0pt; font-family:"Times New Roman";} span.EmailStyle17 {mso-style-type:personal-reply; font-family:Arial; color:navy;} @(protected) Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head>
<body bgcolor=silver lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>There is no straightforward way.<o:p></o:p ></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>Volume and collision objects in the SDK are logged wishes (I logged them myself during the last two cycles and I’m sure others want them as well) but they are not an easy implementation.<o:p></o :p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>You’ll have to write your own volume checking, that with a polygonal object can be fairly expensive.<o:p></o:p>< /span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>It’s now about a year I’m struggling to keep my library updated but it takes some proper coding to do it properly (caching and optimized progressive checks).<o:p></o:p></span></font>< /p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>If you feel like tackling the task, game tutorials are your best bets, since all collision and volume detection systems in games need to be real-time you can find some pretty good examples of blazing fast code.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>If all you need is checking for centers inside a bounding box volume then it’s pretty fast to write.<o:p></o:p>< /span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>All you need to do is get the bbox for that volume and check center coordinates against deltas of the box’ corners.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>anything more complex, like checking for actual objects and not just their centers or using actual shape volumes, requires expensive custom code.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size: 10.0pt;font-family:Arial;color:navy'>If anybody can correct me and prove me wrong about the toughness of the task I’d love it, since it’s now a long time I struggle with this kind of issues.<o:p></o:p></span></font></p>
<div>
<p><font size=2 color=navy face="Times New Roman"><span style='font-size:10.0pt; color:navy'>~Raffaele Fragapane<br> ~Freelance Technical Animator & TD<br> ~Senior TA @ Peerless Camera</span></font><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'> <font size=3 face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal style='margin-left:36.0pt'><b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font ></b><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <b><span style='font-weight:bold'>On Behalf Of </span></b>Harry Bardak<br> <b><span style='font-weight:bold'>Sent:</span></b> Thursday, June 17, 2004 10:58 AM<br> <b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">XSI @(protected)</st1:PersonName><br> <b><span style='font-weight:bold'>Subject:</span></b> [scripting] Volume selection ? </span></font><o:p></o:p></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span>< /font></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>hi everyone.</span></font><o:p></o:p ></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span>< /font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Well i would like to script something like this : </span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>When i select a box, every object in this box is select. </span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span>< /font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>So in other word how can i detect if an object is inside another one. <br> Wich way should i follow to do that ? </span></font><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span>< /font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>thanks by advance. </span></font><o :p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span>< /font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>harry.</span></font><o:p></o:p></p>
</div>
</div>
</body>
</html> <BR>
<P><FONT SIZE=2>---<BR> Incoming mail is certified Virus Free.<BR> Checked by AVG anti-virus system (http://www.grisoft.com).<BR> Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)<BR> </FONT> </P><BR>
<P><FONT SIZE=2>---<BR> Outgoing mail is certified Virus Free.<BR> Checked by AVG anti-virus system (http://www.grisoft.com).<BR> Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)<BR> </FONT> </P>
|
|
 |