<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19088">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2>    Justin, before thicking about reducing the 
size of the array passed to ode collide function to receive the colision 
contacts information, </FONT><FONT size=2>maybe you should remember what i told 
you about managed versus unmanaged memory use in the ode plugin.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>    Maybe you should think about what is being 
done by framework to convert the array from managed memory space to unmanaged 
and then back again on each call.</FONT></DIV>
<DIV><FONT size=2>    If you do that  (or just remember the 
details i told you) maybe you will see how to save some cpu without 
reducing the stability of the simulation to a useless state.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>    Also before doing hard testing with 
diferent ode supporting libs, maybe you should also review 
managed/unmanaged issues on other parts of the plugin. JointCreateContact 
? GeomHeightfieldDataBuildSingle ? ....</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>    Best Regards,</FONT></DIV>
<DIV><FONT size=2>Ubit Umarov</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=teravus@gmail.com href="mailto:teravus@gmail.com">Teravus Ovares</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=opensim-dev@lists.berlios.de 
  href="mailto:opensim-dev@lists.berlios.de">opensim-dev@lists.berlios.de</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, January 04, 2012 7:53 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Opensim-dev] Prospective 
  ODE physics changes</DIV>
  <DIV><BR></DIV>
  <DIV>ODE Documentation and examples :)</DIV>
  <DIV> </DIV>
  <DIV>Regards</DIV>
  <DIV><BR>Dan<BR><BR></DIV>
  <DIV class=gmail_quote>On Wed, Jan 4, 2012 at 2:46 PM, Justin Clark-Casey 
  <SPAN dir=ltr><<A 
  href="mailto:jjustincc@googlemail.com">jjustincc@googlemail.com</A>></SPAN> 
  wrote:<BR>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
  class=gmail_quote>Hi Teravus, nice to hear from you again!<BR><BR>Yes, more 
    testing is needed, hopefully on OSGrid.  But it seems there may be a 
    tradeoff between having super smooth physics objects and being able to get 
    more avatars in a scene without encountering cpu limits.  My perception 
    is having more avatars is a more common use case then lots of physics 
    objects, particularly as OpenSim's current ODE use does not seem to provide 
    a good physics simulation).  Anybody who does want to try for better 
    physics could always turn the collision number back up.<BR><BR>In any case, 
    what was the rationale for choosing 80 as the default? 
    <DIV class=im><BR><BR>On 03/01/12 22:30, Teravus Ovares wrote:<BR></DIV>
    <BLOCKQUOTE 
    style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" 
    class=gmail_quote>
      <DIV class=im>With ODE, it depends on the physics situation.<BR>With 
      Tri-Mesh and the heightfield collider specifically, ODE generates lots of 
      small effect contacts and then the<BR>stepper integrates them all into a 
      contact resolution force.  With tri-mesh and the heightfield, 
      depending on how an<BR>object collides with another, there could be 20 or 
      30 contacts that all factor into getting the object to react<BR>normally. 
        So, to test, you're going to want to use a stack of 
      'active'(physical in the client) tri-mesh objects.   You<BR>may also 
      want two or more trimesh LINKSETS to see how they react.<BR>My guess, is 
      the first thing that you're going to notice is that a tri-mesh object 
      sitting on another object will become<BR>more unstable (vibrate more). 
       Each mini-contact represents a part of the force to keep the object 
      from rotating from<BR>the other parts of the contact resolution force. 
        As the effect gets worse, you're going to notice 'rotation 
      anomolies'<BR>that occur when objects collide.<BR>Think of it like... 
         you have a cube shaped trimesh...   and the cube's 
      corners are touching a flat ground.   In<BR>theory, that would 
      generate 4 contact points for each of the vertices touching the flat 
      ground.   If you cut one off,<BR>then only three of the corners are 
      being held above ground.   On a larger scale,   If you do that 
      enough, then the<BR>object will partially fall through the ground and then 
      bounce back up from an excessive contact resolution force<BR>creating 
      instability and vibrating.<BR>Those are the indicators that I would use to 
      determine if it's OK to make that change.   Are 8 contacts enough for 
      ODE<BR>to react properly in our usage?   That remains to be seen 
      :).<BR>Regards<BR>Teravus<BR><BR></DIV>
      <DIV class=im>On Tue, Jan 3, 2012 at 4:58 PM, Adams, Robert <<A 
      href="mailto:robert.adams@intel.com" 
      target=_blank>robert.adams@intel.com</A> <mailto:<A 
      href="mailto:robert.adams@intel.com" 
      target=_blank>robert.adams@intel.com</A><U></U>>> 
      wrote:<BR><BR>    > ...<BR>    > According to 
      [2], the maximum reported scripting collision contacts is 8.<BR>  
        ><BR>    > Testing with 8 on Wright Plaza today in 
      the Tuesday meeting seemed to greatly reduce physics scene time compared 
      to<BR>    > previously without any apparent loss of required 
      fidelity (50ms with 18 avatars, albeit mostly sitting down -<BR>  
        > unfortunately I didn't record previous week's numbers but they 
      were higher.  Nebadon tested one of his vehicles).<BR><BR>  
       Looking at the code, contacts_per_collision is the number of 
      collision points reported by ODE for each collision --<BR>  
       like a prim sitting on rough terrain and touching multiple places on 
      the ground. Reducing the count to 8 means that<BR>   no more 
      than 8 contact points will be reported by ODE and, if there are more, you 
      can't be sure you get the 'best' ones.<BR><BR>   I suspect that 
      most of the time there are only a few contact points so it doesn't make 
      sense that reducing the<BR>   number from 80 to 8 would 
      significantly reduce the compute time. If it is the number of contact 
      points causing the<BR>   computation overhead then ODE must be 
      normally returning more than 8 contact points. Is this really the case? Or 
      is<BR>   something else going on?<BR><BR>   -- 
      ra<BR>  
       ______________________________<U></U>_________________<BR>  
       Opensim-dev mailing list<BR></DIV>   <A 
      href="mailto:Opensim-dev@lists.berlios.de" 
      target=_blank>Opensim-dev@lists.berlios.de</A> <mailto:<A 
      href="mailto:Opensim-dev@lists.berlios.de" 
      target=_blank>Opensim-dev@lists.<U></U>berlios.de</A>><BR>  
       <A href="https://lists.berlios.de/mailman/listinfo/opensim-dev" 
      target=_blank>https://lists.berlios.de/<U></U>mailman/listinfo/opensim-dev</A> 

      <DIV 
      class=im><BR><BR><BR><BR><BR>______________________________<U></U>_________________<BR>Opensim-dev 
      mailing list<BR><A href="mailto:Opensim-dev@lists.berlios.de" 
      target=_blank>Opensim-dev@lists.berlios.de</A><BR><A 
      href="https://lists.berlios.de/mailman/listinfo/opensim-dev" 
      target=_blank>https://lists.berlios.de/<U></U>mailman/listinfo/opensim-dev</A><BR></DIV></BLOCKQUOTE><BR>
    <DIV class=im><BR>-- <BR>Justin Clark-Casey (justincc)<BR><A 
    href="http://justincc.org/blog" 
    target=_blank>http://justincc.org/blog</A><BR><A 
    href="http://twitter.com/justincc" 
    target=_blank>http://twitter.com/justincc</A><BR></DIV>
    <DIV>
    <DIV></DIV>
    <DIV 
    class=h5>______________________________<U></U>_________________<BR>Opensim-dev 
    mailing list<BR><A href="mailto:Opensim-dev@lists.berlios.de" 
    target=_blank>Opensim-dev@lists.berlios.de</A><BR><A 
    href="https://lists.berlios.de/mailman/listinfo/opensim-dev" 
    target=_blank>https://lists.berlios.de/<U></U>mailman/listinfo/opensim-dev</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Opensim-dev mailing 
  list<BR>Opensim-dev@lists.berlios.de<BR>https://lists.berlios.de/mailman/listinfo/opensim-dev<BR></BLOCKQUOTE></BODY></HTML>