NewtonTreeCollisionAddFace slow as hell

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: NewtonTreeCollisionAddFace slow as hell

Postby Julio Jerez » Sun Jun 24, 2012 9:30 am

I do not undestand, were are you getting 2^125 so fat I know there is nothing in the visuble univese that can have a 2^128 combinatorial interation.

you are talking larger than astronomical figures. Some is wrong with that figure you are asuming that maybe each valeu in aset can interat with other value by that is never the case.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Sun Jun 24, 2012 9:44 am

REMOVED text
Last edited by PJani on Mon Jun 25, 2012 1:42 pm, edited 2 times in total.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby Julio Jerez » Sun Jun 24, 2012 10:24 am

I am confused, what it is that you are doing?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Sun Jun 24, 2012 10:25 am

REMOVED text
Last edited by PJani on Mon Jun 25, 2012 1:42 pm, edited 2 times in total.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby Julio Jerez » Sun Jun 24, 2012 10:33 am

static collsion is a base class internally, there are tree subcaless that derive form it:
collsiontree (done), higpmap (done), used collsion (not ready yet)
I will add that demo sometime today.
and I will make with a flat plane, so that is simpel and you can use it for you game.

if your data is so neetlly organized, they maybe you are right the user collsion is the best solution.
they you do not even have to make a collsion you can generated it on demand, like the highfield collision does.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Sun Jun 24, 2012 10:54 am

I have seen your usermesh collision is bounded with min and max...
Code: Select all
NewtonCreateUserMeshCollision(world,vec_min,vec_max, this, &_usermeshCollideCallback, &_usermeshRayHitCallback, &_usermeshDestroyCallback, &_usermeshGetCollisionInfo, &_usermeshGetFacesInAABB, 0);

is possible to make this inf collision so i don't need to create new body(so i conserve memory and lower de/alloc calls) every time there is need for loading a chunk!? And when newton makes AABB query i would generate coresponding chunk/s and cache vertexes indexes into memory.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby Julio Jerez » Sun Jun 24, 2012 11:00 am

I believ you are no underthadin hwo the funtion works.
Min and Max is for passing the face that inteset the box.

wait for the flat palne demo demo so that you can use it.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Sun Jun 24, 2012 7:28 pm

Hmm you mean its __out or __in parameter? because i am little confused what you mean by face of box(AABB?)
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby Julio Jerez » Sun Jun 24, 2012 7:31 pm

I am going to add the user plane and use terrain, you can use those to make your game. Let me bring what I am doing to a stable point.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Mon Jun 25, 2012 1:46 pm

Okie, let me know when you update demos :) tnx!
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Fri Jun 29, 2012 9:27 am

Any news on usermesh?
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby Julio Jerez » Fri Jun 29, 2012 9:31 am

the weekend
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Sat Jun 30, 2012 2:11 pm

I have just one more question does UserMesh work or not? Because i was playing later this morning with it and it doesn't call collide callback.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby PJani » Sun Jul 01, 2012 7:31 am

Hmm i was thinking and would it be possible to have pointer array(each pointer pointing to one vertex) instead of index array and therefore vertex array can be removed, and data doesn't need to be stored in one vertex array, but in smaller buckets/batches. therefore there would be no need for copying together chunks of vertex arrays into one vertex array. And then i only need to update vertex pointers...atributes and face count arrays. And there is one BIG I MEAN VERY big plus i dont need to recalculate offsets for indexes, just concat precalculated vertex pointers into bigger array and send it to the engine! And that should be fast as lightning.

:D
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: NewtonTreeCollisionAddFace slow as hell

Postby Julio Jerez » Sun Jul 01, 2012 7:51 am

PJani wrote:I have just one more question does UserMesh work or not? Because i was playing later this morning with it and it doesn't call collide callback.

No. that is why I could not complet the demo last week. I see if I can completed today.
The user mesh is just a subclass of the mesh collision, must the work is done it is just thet I have not converetd to be instance base.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest