A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Julio Jerez » Fri May 21, 2010 2:09 pm
Well I am a work now, I will again try tomorrrow.
on the collision part, there are few ways to do what you want.
Usually moving the body by setting the matrix will lead to penetration problems.
But even doing that you still can use convex cast to figure out how much the body can move befire penetray oteh object.
but it ill no consider hwo objet touch by that oteh body will mive.
depends on what you want to do? how are you moving ther bodies? and what are you doing?
Is this an editor or a runtime game?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Sat May 22, 2010 12:51 am
Now the program crash saying
unhandle expeption ‘System.BadImageFormatException’ occurred in VisualOgreCore.exe [6036]
Could not load file or assembly 'Mogre, Version=1.7.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
If you want me to check this you are going to have to put everything in a directory that I can just unzip and run, I do not have time to check one file at a time waiting for the next missing file..
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Cyrus » Sat May 22, 2010 7:23 am
Thanks & sorry for the issue.
To answer your query -
This is an editor. I am attempting to pick & place the items without allowing the items to penetrate. I am moving the object using SetPositionOrientation. IS this fine?
Also, Is there a way to group a set of objects & move/rotate them together?
One other query - how can I enable debug line in Newton 2.
i.e. similar to MogreNewt.Debugger.Instance.ShowLines(m_World) in 1.53.
Thanks.
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Julio Jerez » Sat May 22, 2010 8:10 am
I am making an editor for content creation too, I will write a couple of functions for object placement.
one way woudl be to write a recusive function that get all bodies that are touching each other, then move then as a group using convex cast and a linear optimization problem
the player controller uses a similar function, to determing the player future position.
The function cna be call select and expand slect or somithingg like that.
This method can avoid relying of the physics solver to inforce non penetration when moving bodies since they will move to legal position.
I can help you wih that sicne I will use it myself in teh nex Newton Editor utility, But First I like to see what you have.
debug display is 2.0 is similar to debug display in 1.53 there are several sample functions in sdk file debugDisplay.cpp
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Cyrus » Tue May 25, 2010 1:14 pm
I ran into another issue. The CollisionTool.CollisionCollide crashed
In 1.53 it w did not have this problem.
But in 2.20 I tried setting threadindex=0, and it crashed.
I tried the debug build (using the info from other thread by Kane777) but no change.
Any idea how I can avoid using threadindex or what are the safe/correct values.
Thanks in advance.
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Julio Jerez » Tue May 25, 2010 2:20 pm
where does it crashes?
using thread equal 0 is fine.
The engine does not use thread index,
thread index if for the engine to tell the app where is calling from, so that the end app can make apropriate local pool.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Cyrus » Wed May 26, 2010 12:55 pm
It crashes in the call to CollisionTool.Collide()
Is there any other way to debug this?
Thanks.
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Julio Jerez » Wed May 26, 2010 1:43 pm
you are getting me confused,
is CollisionTool.Collide() a function in your wraper that resolve to some newton low level call?
you send me some instrutions to create a test level in your editor, are we talking aboout the same problem?
I am very interesting in working on this problem, but we need to work in one front,
I cannot follow when you start posting in PM and also in the front forum, I lose my focus because when I read the front page, to me it looks like a new bug.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Cyrus » Wed May 26, 2010 2:39 pm
Sorry for the confusion and multiple issues. Let us park the collisionCollide crash for now.
On the penetration issue , I tried setting NewtupUpdate (1/500) and this being called in timer every 2 milliseconds. The velocity was set to 10*mass. With that setting, the penetration did not occur. So the penetration seems to get solved with these settings. Is this kind of setting expected or am I doing something wrong?
But I had another query on the speed of items settling to a stable position - The items do not settle down fast on dropping them. I have loaded 2 screen shots to the skydrive location mentioned earlier in my PM. Kindly use them as reference.
Thanks again.
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
by Julio Jerez » Wed May 26, 2010 2:42 pm
We work on one problem at time.
when I get home I will make a scene like you told me, and I will check the problem where the body does not go to rest soon enought first.
them we move to the next issue.
A tiem step of 1/500 is very hard on prefomence, but it is goo for and editor.
However there may be some other issues, like degenerate matrices, bad geometries, or a Bug in the engine that I never saw.
let us see if the scene is clean first, and we move from there.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Cyrus » Wed May 26, 2010 10:46 pm
I have uploaded screenshots of the scene to the skydrive.
Also, the velocity for the body is set to vector3(0,(mass * 10 * -1),0). The mass ranges from 20 to 50 for different objects. Will that affect the speed of settling down?
Please let me know if you need any other info.
Thanks in advance,
-
Cyrus
-
- Posts: 49
- Joined: Mon May 17, 2010 1:04 am
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests