A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by PJani » Sun May 27, 2012 8:05 pm
Hey, i need to implement static collision for HUGE world(coordinates in double) which will change a lot(explosions n stuf) i dont want to have whole world loaded at once only parts which are containing dynamic bodies, i tought of using some kind of lru caching with k-d tree for fast retreval of collision mesh and threading for pre caching the collision mesh in prediction path of body.
Now i need to know if usermesh is good for such task which will cause lots of loading and unloading, morphing, destroying of verteces/faces....I dont know about tree mesh...rebuilding it every time?
I know i could test this stuff my self but i realy need feedback from who which knows newton very well from inside out. So i can't screw myself in the long run.
| 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 May 28, 2012 1:20 pm
streaming unlimited worlds is actually a planned feature of core 300
there are lot of element that nee to be in place, for that to happens.
I have being working adding them, but I have no put it all together yet
this is what I have in core 300 so far.
-worlds are boundary less
-There is a special collision shape name Collision Scene that is designed to manage large worlds, very quickly
-Added a extend Precision float class (this is because not all platform has support for double precision)
the technology will work like this.
Using the old technique of the segmented architecture of the Intel 8086 cpu, the global position of a shape in the world will be formed by segment and offset.
The segment will be an extended precision float and the offset will be a single 32 bit float. A physical address will be
Address = seg + offset
The broad phase will deal with physical and will always gritty that island will always have the same base segment.
Notice that by making the base segment of each shape, zero this is absolutely compatible with the existing engine.
There will be a set of functions that the application can use to control the scene
One will be SetBaseSegment.
The application can use this to pass the Camera position before and a Newton update, and all call back will have that segment in common. Therefore relative to the camera the entire simulation will be jitter free, and the visual jitter will increase as the object are father away from that segment origin. However this is not a problem with floats.
There will also be a set of interface function for asset streaming, there will be shape call back that the engine will use to let the application load data that is still invisible to some virtual work size.
Basically there ill be a virtual world side call umbra size, and Penumbra size.
When and asset touches the Penumbra size the engine will make the callback to load that asset.
The idea is that the asset should be ready before it is in the umbra size, therefore the app can use and background thread to stream the data.
Is that what you have in mind?
If the answer is yes , the task is more complex that what it looks, and it requres real tecnology support, a user collsion can
help but it is not a real solution
you can start by designing your world usin the scene collision, and asume that teh base segment i the p (0, 0, 0)
then after you have some prototye going we can start adding the rest of the functionality.
I have it all planned but I am only one person, so I work on what people are using.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by PJani » Tue May 29, 2012 9:21 am
Yeah something like that. The idea was to use this huge world "loader" and garbage colection for unused parts of world on server where ram capacity can became problem(100-200 clients). on clients i would still use float(because of graphics), but with algorimic mapping...when client player goes over some boundary client must realign all objects to new offset. positions would be caried over network in double, velocity and other stuff would be in float, after that the offset and fine position in float would be calculated. When this happens user/player should not even notice realigment because it would happen before graphics redraw/(client physic update).
Currently i am in a gutter of exams the project will need to wait till july.
| 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 » Fri Jun 01, 2012 3:43 pm
I searched in demo section for Mesh Collision but i didn't found any example.
I figured i need to use callbacks for feedbacks but i am not sure how to properly fill NewtonUserMeshCollisionRayHitDesc and NewtonUserMeshCollisionCollideDesc structs.
Using one body with mesh collision for whole world is good or bad idea?

| 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 3 guests