Collision Against Uniform Grid (Voxel) Without Creating Mesh

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby JoeJ » Wed Oct 02, 2013 9:20 am

Ragdolls work very well with Newton - no jittering on corpses like in other engines, and i never saw serious interpenetration.
Julio works on some ArticulatedTransformManager that will even improve robustnes.
AFAIK this is not yet finished and may make the ragdoll demo code look unnecessary complex at the moment.

To start it may be easier to use only BallSocket and Hinge from packages\dCustomJoints.
For a while i made an alternative for ball socket, that may be better suited for ragdoll purpose: [url]packages\dCustomJoints[/url]
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Layla » Wed Oct 02, 2013 9:45 am

I think I'll be using 6dof because I need to limit angles in XYZ.
Layla
 
Posts: 54
Joined: Sat Sep 28, 2013 11:56 am

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Julio Jerez » Wed Oct 02, 2013 10:13 am

JoeJ wrote:Julio works on some ArticulatedTransformManager that will even improve robustnes.
AFAIK this is not yet finished and may make the ragdoll demo code look unnecessary complex at the moment.

yes I know of the degree of complexity :D, this si the dilemma that I face all the time. most people come to Newton because aft the buy of the propaganda started by dishonest self appointed experts like
Adrian Boing and mr Kenneth Bodin Holmlund form Virtual Reality Lab, which has being perpetuated on form like Ogre, Irrlicth and Game developer.net
But Newton is more complex that people give credit for and it I sonly when you use it that you can se how different it is.
This is why I am working on the editor, so that people can use the powerful features, and I can be free to do the programing of more advance features. WE have ot face reality and
accept that some thong are just more complex.


Take a look at this article recommendation for these self appointed expert from gamedev.net http://www.gamedev.net/topic/628765-what-physics-engine-is-better/
This moron is a moderator and this is what he said.
Krohm Crossbones+...
Newton has extreme issues with determinism. Or at least it had issues last time I checked their provided demos. And if they cannot be deterministic... well, you get the idea.
Newton is still fairly good, it has a lot of features which seems to be beginner-oriented. I like it but still without determinism... no way.

So the real battle is Bullet, PhysX, Havok.

I cannot say much about Havok. It seems you're supposed to pay for it.

PhysX appears to be better performing in general (on NV cards), it has more features (such as SPH and built-in destruction). The license is a bit odd.

Bullet is opensource and license is very clear (zlib). It's a bit rough here and there and although the API often does not support this or that, extra code is provided to help users in working around the limitation. For example, Bullet does not have destruction built in but it comes with extra code to support it. The code is not ready to go IMHO but a very good starting point. In general I think the maintainer is doing an excellent job at growing the library in a "clear" way. I'm not up to date with the new GPU-assisted OpenCL solver but it sounds very promising.


and there are more. This moron consider Open Source on some library a really good feature, but Open source in Newton is not
These are people of course AMD, Nvidea, Intel, Havok do paid advertisement in Game develop.net, there to do a hit job o Newton

Nvidea has a tool the that call PEEL, the write to compare Physics performed and accuracy. and the test again Bullet, Havok, and the release some preliminary reports.
They were trying to integrate Newton in that too but after some effort there could no get anything done. They were try to use Newton as if it was PhysX or bullet, but newton is very different
Everything was a complete disaster.
One of their senior guy contacted me at my work so that I integrated Newton to Nvidea Tool myself.
They game me the toll under NDA, and the promise that they will release the result. I guess because the thught that is was going to be a blow out.

I integrate Newton 3.10 in a couple of week, and when the got there results, Netwon kick the Ass of PhysX, Bullet and Havok in every aspect. but most importantly it beat PhysX 3.31 in all counts.
Next Email I get was a Email of praising Newton but unfortunately they were not going to be able to publish the result.

It made me very upset and I poste on their forum, asking why the so no release the Results. the reposed was a assault for the cheerleader. and some email of warnings.
do you ever believe three people are playing a once, three people are ruthless.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Julio Jerez » Wed Oct 02, 2013 11:15 am

now I check in the very first version of the Newton Model editor that actually do something
it is in folder ..\applications\modelEditor\Win32


The editor si like a shell for adding dll command, all command will be supported by a dll plug in, a dll can contain more than one command,
and I am adding a standard DLL with a series of essential commands.

is far I added three, make a Cube, Triangulate Mesh, and Poligonize Mesh
There is also a plugin for loading a serialized newton world, this will be use to convert all of the demos to .ngd format, and there we can edit them.
There is also a loaded .ngd mesh
and I also have a Collada, and Val quake map loaded that I will re enable later.
I will be adding more essential commands, and different visualization modes.

Because this is all DLL based, any one can add there own functionality, for there own project

I still need to complete some of the basics functionality, and navigation, but so fart is has a cool undo/redo feature.
I hope thise make eassy for people to use. It will certally made it easier for me to expose functionality.

I will add some more file loader, but anyone can load there own loader. I essence this can be use lie the bases for a Game editor.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Layla » Wed Oct 02, 2013 1:33 pm

I'm not sure if it's okay to ask any questions I have about my project in here but it's better than opening a new thread I guess.

I just started using Convex Hulls, they seem to be working fine but there's a problem when adding a Convex Hull to a compound. Adding a Convex Hull to a compound and scaling down the compound grinds the application to a halt. I'm not sure if this is to be expected though because it works fine if I just scale down the bodies inside the compound. It would be easier to just scale the compound to scale everything inside it. Is this a bug or is it expected?

If it helps, the model i'm using as a convex hull is pretty large and needs scaling down by 0.05 so I just scale down the body by that much, scaling just the compound and not the child bodies slows the application right down. It does work fine, just very slow, that's why I think it could be a possible bug.
Layla
 
Posts: 54
Joined: Sat Sep 28, 2013 11:56 am

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Julio Jerez » Wed Oct 02, 2013 2:50 pm

Scale should generate a marginal cost, bu t hcoes si teh order of nanosecuds.
in fact everything is considered to have a unit scale in the engine

all shapes suport scale, but i have no have the time to complet non uniform scale functionalily for compound collision.

are you applying a non uniform scale to a compound collision? if no then you should not see any perfomance decrease. if there is any that would be a bug.


you world is a single scene collision, with lot of convexes, are you by any change scaling the entire world at run time? :?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Layla » Wed Oct 02, 2013 2:58 pm

I'm not scaling the world. I've put an oildrum convex collision into a compound. I then uniform scale the compound body to 0.05 once with a call to NewtonBodySetCollisionScale. It works fine but FPS goes down to < 5 FPS so something dodgy does seem to be going on. Scaling the oildrum convex with NewtonCollisionSetScale before I add it to the compound collision works fine and FPS is fine too.

I just tested scaling the compound with NewtonCollisionSetScale and that works without FPS drop.
Layla
 
Posts: 54
Joined: Sat Sep 28, 2013 11:56 am

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Julio Jerez » Wed Oct 02, 2013 3:04 pm

can you serialize you scene, to a file an load it the sdk sanbox demo?


to serialize a scene to a file you call
void NewtonSerializeToFile (const NewtonWorld* const newtonWorld, const char* const filename);

afte you add all the elemnet to the world.
you can test both scale cases and see if the sandbox shows the same problem.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby JoeJ » Wed Oct 02, 2013 3:15 pm

Layla wrote:I think I'll be using 6dof because I need to limit angles in XYZ.

Julio Jerez wrote:yes I know of the degree of complexity , this si the dilemma that I face all the time.


Because 6 dof creates a rectangular swing limit, it may not be the most natural choice.
Personally i wanted an ellyptical swing limit, but that's hard - the guy who made it for bullet said he failed on it (very unstable).
What i use now is a 'capsular' shaped limit (3d: two cones between two planes - 2d: two circles connected by a rectangle).
That's maybe 5 lines of additional code to the one i've linked.

To do stuff like that i needed to learn joint coding, which is super easy if i remember the days where i tried to do all this with my own physics engine.
That said just as an example for: "If you're willing to take that unavoidable 'degree of complexity' you get a lot back here."
I don't want to drive you away from 6 dof or anything now. But it's good to now that you can create your own joint behaviour with newton,
without buying source code and / or being a math wizard.

Julio Jerez wrote:It made me very upset

Julio, you should not worry too much about such things. It's their way to say: "We have spent much money, manpower and time,
but this single guy does a better job than we all together. So let's unite and isolate and hide him, what else could we do now?".
I hope they will not begin to steal your work now that they know your's is not only more stable but also faster.
I understand this really makes you angry! I hope such things don't happen so easily, maybe also due complexity.
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Layla » Wed Oct 02, 2013 3:17 pm

It doesn't seem to slow down in the sandbox so it must be a problem on my end. The serialize function is really useful though.

I did narrow it down a bit more though, the problem happens on my end if I scale the compound shape with NewtonCollisionSetScale AFTER I create the body but works fine if I do the call before. I kind of need it working after I create the compound body though so I can scale the body whenever I like. I'll try and find the problem because it must be on my end, not a problem with newton.
Layla
 
Posts: 54
Joined: Sat Sep 28, 2013 11:56 am

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Julio Jerez » Wed Oct 02, 2013 4:58 pm

On the joint stuff, the problem wi th any 6DOF joints, is that there wuler angle are not independent,
bascially any the angle cna generate up (3 * 2 * 1) different orientations, dependading on the order of concatantion.
Is essecnet what teh mean is that teh do no obey the commutativity property, and a physic solver rerquire tha the quantities to be independent,
of values and order. Tha mean they must comute.

I said before that I was going to make a 6DOF joint that use smal angular aproximation, bu I never did it.
This weekend I am going to fiox a bug that I added to teh joint about six month ago,
after tha I will make this new 6 DOF joint and using with the rag doll demos.

If I am correct and I beleive I am, I beleive that I can make such that all three angle can be cosidred independent variable.

the is correct because the produc of small angular oriation is comutative, (comute wit a small error of quadric order)
so if you make teh joint suc that it doe sno tryu to riach teh target orination in one step, instead it does a fraition of the angle, teh the josin is alway stable apredictable.
The one problem is that a joint like that need a a max angel step (or angular velocity) as a parameter, or teh simulation woudl have to be runned at higher fps.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Layla » Wed Oct 02, 2013 5:17 pm

I'm unable to find the cause of scaling compounds after the body is created being extremely slow. I can't replicate it in the sandbox but I'm not doing anything out of the ordinary. All I'm doing is putting a very big convex collision in a compound, creating a body with the compound and then scaling the compound down by 0.05f, scaling either the collision or body has the same problem.

What I have noticed though is that there's no slow down if I remove the scene collision and just have the compounds colliding with each other. Maybe that will help find the cause because I can't see anything I'm doing wrong.
Layla
 
Posts: 54
Joined: Sat Sep 28, 2013 11:56 am

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Julio Jerez » Wed Oct 02, 2013 5:22 pm

has you implemented any of the debug display?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Layla » Wed Oct 02, 2013 5:26 pm

Not yet, It may take a while to get it integrated with my project.
Layla
 
Posts: 54
Joined: Sat Sep 28, 2013 11:56 am

Re: Collision Against Uniform Grid (Voxel) Without Creating

Postby Julio Jerez » Wed Oct 02, 2013 5:28 pm

my guess is that you are scaling the wrong collision, when you attach a shape to a body, the body makes an instance of the collision.
you should either scale the shape before adding it to the body, or get the shape from the body after you created and scale that.
My guess is that teh huge shape if intesecting a huge sector to the scene collision which has hundreds of tousand of sub shapes.
debug display help to find those errors.
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