CustomMultiBodyVehicle Joint

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

CustomMultiBodyVehicle Joint

Postby PJani » Wed Jan 13, 2010 2:20 pm

Does CustomMultiBodyVehicle work? If it does i will implement it in OgreNewt.
| 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: CustomMultiBodyVehicle Joint

Postby PJani » Fri Jan 15, 2010 9:33 am

i managed to implement custommultibodyvehicle, in ogrenewt vehicle, and it works but the only problem is the vehicle goes allways very crazy when wheels are touching ground. I made some changes to jointlibrary, i created overloaded version of addSingleSuspendedTire so instead of creating tires inside that function i can now create tire body manualy assign to it proper forcecallback(and i can very simply attach scene mesh to it) and then i pass tire body ptr to addSingleSuspension.

sory for very bad english.
| 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: CustomMultiBodyVehicle Joint

Postby PJani » Fri Jan 15, 2010 9:41 am

I am writing from mobile phone so i can not write more than few hundred chars.
Anyway i wanted to ask what exacly is missing in multibodyvehicle joint i will try to upgrade and make it working.
| 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: CustomMultiBodyVehicle Joint

Postby kallaspriit » Sun Jan 17, 2010 12:16 pm

Any progress with the multibody vehicle? If you can get it to work, I could add it as a demo :)
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: CustomMultiBodyVehicle Joint

Postby Julio Jerez » Sun Jan 17, 2010 3:11 pm

I will add all of teh joint the are already in the joint library, It is just that I am in a face that is taking me a long time.

I have the Collada scene import/export working, but when I try to enable teh Leak tracker I realize it si hard o do it since all of the Open source simple Gui out there are either too hard too buggy or too limited.

I tried GLUI, then I spend about 5 days trying to get FLTK to work and it is hopeless, somehow some open though that s is a good idea to create static pointer tah allocate pool and never release them,
it you try to fix it you are in for a huge fight.
I end up using WxWidget 2.8.10 it seems to be the most complete and mope polishes library out here, plus it give the look and feel of the native operating system while being cross platform.
The only problem is the it is huge, but using it with care I can be cut down to few megabyte of source.
This is taking me some time before I move back to OgreNewt, Because I need to make sure that the Newton Library are perfect, no malfunction of any kind is acceptable.

I guess that I still have a week to go on this but as soon as I get this, I will move back to Ogre Newt and finish all the work.
that include all of the Custom joint in the joint library, plus a scene loader that can import and expert complete scenes to Ogre and it is ready to go.

Be patient, it will be ready some time this month.

It is my interest to get Ogre Newt up to dat because some of the new features I am planning to add to Netwon require a better graphics engine that a simple OpenGl demo.
all this work is just to get OgreNewt up to date, it is after we get it on part of Netwon2.0 that the fun will begin.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CustomMultiBodyVehicle Joint

Postby PJani » Sun Jan 17, 2010 3:34 pm

Hmm i finaly implemented CustomMultiBodyVehicleJoint. It works but i have very big problem with material friction i had to set wheel_mat->setDefaultFriction(20,19.9); otherwise car was going straight. When too much torque is applied to wheels car goes to left or right. I have some weard direction problems. I frontDir vector is not front wheels are rotated for 90° Y.

Here is picture of CustomMultiBodyVehicleJoint and Ural 375 in action.
Image
I know graphics * its sandbox.
| 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: CustomMultiBodyVehicle Joint

Postby PJani » Mon Jan 18, 2010 8:11 am

Im rewriting code for OgreNewt_Vehicle which i was using for 1 day. It was to specific and un extendable. :P
This interface for creating wheels is making me crazy. Its very hard to create layer for OgreNewt, which will bypass including CustomJoint directory.

I will try to solve this problem till the end of this week, i will see how much time i will have because i have 3 exams this week and another week 2.

Edit. i forgot to say i will try to add performance counter and grapher to OgreNewt::Debugger which i was developing a while a go. :oops:
| 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: CustomMultiBodyVehicle Joint

Postby PJani » Mon Jan 18, 2010 3:10 pm

Here is very short and simple video of cmbv test

Last edited by PJani on Wed Jan 20, 2010 5:28 am, 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: CustomMultiBodyVehicle Joint

Postby Julio Jerez » Mon Jan 18, 2010 3:27 pm

hey not bad, not bad at all
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CustomMultiBodyVehicle Joint

Postby PJani » Tue Jan 19, 2010 7:21 pm

Julio how big static friction and dynamic friction between ground and wheels was used in Newton 1.xx on multi body vehicles i cant get that thing right!?

Im trying to rewrite some of your joint library cmbv so you can dynamicly change differential and suspension properties(diff friction, damping, spring coef., damper length...) and im trying to make suspension breakable...to much force and you will be without wheels or damaged suspension :D: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: CustomMultiBodyVehicle Joint

Postby PJani » Thu Jan 21, 2010 7:34 pm

Wooups, sory i think i messed up with right orientation, becouse i have very big problems with my exporter and 3x max... :shock:
Last edited by PJani on Thu Jan 21, 2010 8:36 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: CustomMultiBodyVehicle Joint

Postby JernejL » Thu Jan 21, 2010 7:40 pm

Looking really good, the tire suspension is also pretty stable and works nicely.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby PJani » Fri Jan 22, 2010 1:50 pm

Here is my problem which i try to solve with wheel orientation. I cant figure out why this is happening. I have set front vector for x axe and up vector for y axe. My model front is x up is y and z is right. I tried even changing some stuff in JointLibrary. but no positive effect. :(
Image
| 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: CustomMultiBodyVehicle Joint

Postby PJani » Sat Jan 23, 2010 7:26 pm

Problem solved, tire axle was front vector instead right, I made some changes to SubimitConstrains and ProjectTireMatrix. Now frontDir is front dir. I will post code when i clean up my mess. ;)

Offtopic: In process i found 3d max have negative Y(in newton and ogre Z axis) axis i have never notice that. :shock:
| 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: CustomMultiBodyVehicle Joint

Postby Stucuk » Sun Jan 24, 2010 3:53 pm

PJani wrote:Offtopic: In process i found 3d max have negative Y(in newton and ogre Z axis) axis i have never notice that. :shock:


Most modelling applications seem to have Z as Height instead of Y, you always have to swap Z and Y around and then flip either the new Y or Z axis (Can't remember which) to convert to a Y = Height system. I always find it funny how they go against maths (In a 2D world Y is height, so in a 3D world all you add is Depth, meaning the new "thing" is Z. Re-inventing the entire coordinate system for one more dimension is stupid).
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests