A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by PJani » Sun Jul 01, 2012 10:59 am
Oh i see

Is vertex pointer array(instead of index array) doable?
| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by Julio Jerez » Sun Jul 01, 2012 11:10 am
pointer to vertex array? where?
for the engine promitives no, for varius reasons. the data internally must be aligned, plus the data can organized differently depending on the data structue
for example a heighfield struture stored with indirect points to vertex is very cache unfriendly. where is the data is strored in tiles of say 4 by 4, or 8 by 8 is much better.
righ now it is stored row by row, but later I will add a compressed heighfield terrain that will use a Wavelet compresion in real time, this will stored the data in block tiles
this will be later when I made the unlimited broadphase with extended presicion floats.
another reason is that soon after I get the destruction demo running we are moving to OpenCL and remove the moronic AVX. there is it better to le teh drive have a copy of the data.
however for use defined mesh, it does not matter what the data is the you can save it anyway you want
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by PJani » Sun Jul 01, 2012 11:43 am
Nop not the engine primitves but for 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by PJani » Sun Jul 01, 2012 11:58 am
Example what i mean...
Instead of:
- Code: Select all
dFloat* vertexes_chunk0 = new dFloat*[3 * vertex_chunk_count];
dFloat* vertexes_chunk1 = new dFloat*[3 * vertex_chunk_count];
dFloat* vertexes_chunk2 = new dFloat*[3 * vertex_chunk_count];
...
...
...
//preparing the vertexes...because query can intersect multiple chunks
dFloat* output = new dFloat*[3*vertex_chunk_count + 3 * vertex_chunk_count + 3 * vertex_chunk_count ];
for(int i = 0;i<3 * vertex_chunk_count;i++)
{
output[i] = vertexes_chunk0[i];
}
for(int i = 0;i<3 * vertex_chunk_count;i++)
{
output[i + 3 * vertex_chunk_count] = vertexes_chunk1[i];
}
for(int i = 0;i<3 * vertex_chunk_count;i++)
{
output[i + 3 * vertex_chunk_count * 2] = vertexes_chunk2[i];
}
int* faceVertexIndex = new int[10];
faceVertexIndex[0] = 0;..
faceVertexIndex[1] = 150;..
faceVertexIndex[2] = 200;..
...
//collcolide_desc is function argument
collcolide_desc->m_vertex = vertexes;
collcolide_desc->m_faceVertexIndex = faceVertexIndex;
...
...
...
I would do
- Code: Select all
dFloat* vertexes_chunk0 = new dFloat*[3 * vertex_chunk_count];
dFloat* vertexes_chunk1 = new dFloat*[3 * vertex_chunk_count];
dFloat* vertexes_chunk2 = new dFloat*[3 * vertex_chunk_count];
...
...
...
//preparing the vertexes...because query can intersect multiple chunks
dFloat** faceVertex = new dFloat*[10];
faceVertex[0] = vertexes_chunk0;..
faceVertex[1] = vertexes_chunk1+20;..
faceVertex[2] = vertexes_chunk2+20;..
collcolide_desc->m_faceVertexPointers = faceVertex;
...
...
...
| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by PJani » Thu Jul 05, 2012 8:17 am
hey i am sory i bug you with this every few days but
is there anything new?
i checkout svn every day to see if there is anything new.
| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by Julio Jerez » Thu Jul 05, 2012 10:46 am
I started to write the demo and I realised that i have to complete a part in the low level instance, to support user mesh.
Let us do it this weekend, I have being focus in getting the Booleans so that I can complete the destruction demo.
I think I will have stable this saturday.
can you please make another post on saturday to remind me again?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by PJani » Thu Jul 05, 2012 12:36 pm
no problem

| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by PJani » Sat Jul 07, 2012 3:07 am
Here Its saturday

| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by PJani » Sat Jul 07, 2012 10:58 am
Hey one question i don't know how i could do usermesh queries in non continues memory(because query AABB can intersect multiple chunks and each chunk has its own array of vertexes)...i dont wan't to copy all vertexes into one array because that would cost memory space and performance. That why i was explaining to you i need vertex pointers to be accepted into NewtonUserMeshCollisionCollideDesc instead of index array and vertex array

| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by Julio Jerez » Mon Jul 09, 2012 9:39 am
The bollean is taking more tiem than I though, I am almost there, but now I do no beleive I can stimate how long it will take. Ther are many many special cases that I can no really predict, so I have to colve them as they appear.
I will hold on the boolean for teh moemnet and complete teh user mesh feature today.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by PJani » Mon Jul 09, 2012 6:23 pm
Cool

i am currently refining my mesh generator. So it will generate mesh faster and with lower memory foot print
| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by PJani » Wed Jul 11, 2012 10:45 am
Finally i did it.

per chunk i have ~0.03ms generation time(verticles + indexes) and for graphical part i have ~0.5ms generation time. Next mission is threading

Now only need user mesh.

to test caching of queries and chunk verticles merging for each query.
| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by PJani » Sat Jul 14, 2012 6:35 am
I finished raycast implementation for usermesh. Now i only need working user mesh in newton. Anything new on it?

| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by Julio Jerez » Sat Jul 21, 2012 1:27 pm
Ok I complete teh user mesj static collision.
look a the class ...\demosSandbox\sdkDemos\toolBox\UserPlaneCollision.cpp
see if you can use it for your meshes
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by PJani » Sat Jul 21, 2012 1:30 pm
Thank you

I will look into it

| 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# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests