Custom joints vehicle and weak joints

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Sun Dec 20, 2009 3:40 pm

Awesome, I think OgreNewt will be back on business now. :D

do not commit yet I spend the last two day writing a utility to convert some meshes to Ogre.Mesh
Now I am in the process to make some tuning in some of teh demo and adding a facelift in the assets debarment.

I managed to converted the quake BSP cattle that is in the quake demo to a quake mesh, and now it run at 500 to 800 fps even when the entire mesh in view.
I will use that mode for the player controller demo so that the apprentices have full working demo sould they decide to try Ogre newt.

I have a question?
do you think it will be use if to add smooth frame rate interpolation to the OgreNewtBody, the way if it is now the fps looks choppy even if it 300 to 500 fps.
it will be cool if we can run physics say at 120 or 180 fops and smooth interpolate to the visual FPS.
if it not objection I will add that functionality,
Of course the fix fps it will be configurable, and it will preserve the current mode.


There are many changes I want to add to ogre newt, but after I have those they we can start comminting to SVN.
I am will start using OgreNet as a feature show case for the engine.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Sun Dec 20, 2009 4:43 pm

Good news, keep up the good work an I'm clad you are beginning to like Ogre. Frame interpolation is certainly a good idea and would be a good feature to have :P
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby PJani » Mon Dec 21, 2009 12:14 pm

Julio Jerez wrote:Awesome, I think OgreNewt will be back on business now. :D

do not commit yet I spend the last two day writing a utility to convert some meshes to Ogre.Mesh
Now I am in the process to make some tuning in some of teh demo and adding a facelift in the assets debarment.

I managed to converted the quake BSP cattle that is in the quake demo to a quake mesh, and now it run at 500 to 800 fps even when the entire mesh in view.
I will use that mode for the player controller demo so that the apprentices have full working demo sould they decide to try Ogre newt.

I have a question?
do you think it will be use if to add smooth frame rate interpolation to the OgreNewtBody, the way if it is now the fps looks choppy even if it 300 to 500 fps.
it will be cool if we can run physics say at 120 or 180 fops and smooth interpolate to the visual FPS.
if it not objection I will add that functionality,
Of course the fix fps it will be configurable, and it will preserve the current mode.


There are many changes I want to add to ogre newt, but after I have those they we can start comminting to SVN.
I am will start using OgreNet as a feature show case for the engine.


Hmm do you have problem with unsmooth rendering in Ogre?
Ogre::Root::setFrameSmoothingPeriod(...) i have set it to 4.
http://www.ogre3d.org/docs/api/html/cla ... 1f4ebe0b2c
| 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: Custom joints vehicle and weak joints

Postby Julio Jerez » Wed Dec 23, 2009 11:12 am

Ok Kella I added few improvement to the wraper.
Basically all the addition can be seem in the Demo02_basicJoints demo

I implemented three of the most common joints: BallAndSocked, Hinge with limit, and slider with limits.
The is sufficient to show how to make all the other, basically it amount to creation and Ogre Joint an redirecting the call to the Support joint on the joint library.
I also fix few bugs in other place but you can find those.
I modified the demo to show example of all the joints on a simple playground level.

I you can please try it and it is works, I believe you can start updating SVN.
http://www.newtondynamics.com/downloads/OgreNewt.rar
When you downloaded it you need to get Newton 2.15, (I fix a bug in Newton while working on Ogre Newton)

Next I will add the following things:
    1-Add the smooth FPS Newton Update.
    2-Add a Convex cast class similar to the Ray Cast Class
    3-Fox the Ray cast demo by using the Custom Kinematic Joint
    4-add some of the more exotic joint in Newton
    5- fix the Player controller demo, adding a nicer Typical game level with some NPC player running aroung
    6-Fix the Ray cats car demo
    7 whatever next
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Wed Dec 23, 2009 6:42 pm

Great, I will verify this tomorrow and if everything works, commit to SVN :)
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Thu Dec 24, 2009 8:54 am

Everything compiles nicely but when I shoot lots of spheres in demo02, I get access violation:
c.png
c.png (184.66 KiB) Viewed 5176 times
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Thu Dec 24, 2009 12:05 pm

did you get newton 2.15

I see it is a boot pointers, I am too having lots of problems with Boot pointers,
I am tented to eliminate boot all together, it does not make sence that we are using 50 mebyte of header file just to use smart pointers, when we can do that in no more than 5 or 6 line of code.
and why a low level library like a physics wraper needs the smart pointer anyway? That bette suited for the high end app.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby PJani » Thu Dec 24, 2009 3:59 pm

I dont use boost smart pointers in OgreNewt :) i have my own "factory" and manager so everything is managed by another layer...but boost::function and bind are great =)
| 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: Custom joints vehicle and weak joints

Postby thedmd » Thu Dec 24, 2009 7:46 pm

Checkout std::tr1 namespace. You will find there function and bind (same like in boost). Try this code instead of boost:
Code: Select all
# include <functional>

using namespace std;
using namespace std::tr1;
using namespace std::tr1::placeholders;


There are some details http://en.wikipedia.org/wiki/C%2B%2B_Technical_Report_1.
thedmd
 

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Thu Dec 24, 2009 8:30 pm

I do not want ot make a case out of use boot or STL, the code I just do no think it not nessesary for this project.
The wraper work with it, and I do no wna to make too many radical changes, just teh nessesary to make work with the latest features.
Later when we have a stable version in SNV that every one is happy with, each time I revisit it I will removed those dependencies incrementally.

I still can not reproduce the Crash the Kella reported.
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Fri Dec 25, 2009 6:49 am

Yes, I am using NGD 2.15. I can reproduce the crash easily by starting demo02 and clicking space as fast as I can (throw balls) until it crashes. Please try to produce the crash, I would not like to commit the changes before this is resolved.
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Custom joints vehicle and weak joints

Postby PJani » Fri Dec 25, 2009 9:03 am

It is possible it comes to race conditions with boost smart pointers...just an idea. :roll:
| 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: Custom joints vehicle and weak joints

Postby Julio Jerez » Fri Dec 25, 2009 11:23 am

Ok I modified the Ray cast demo.
Now it uses the Kinematic Joint to do the Picking, (Pjani here is your sign)
It also use ConvexCast to do precise object placement,
And I also modified the Object Picking demo.
The scene in the demo may be too heavy for low end system you can adjust the Pyramid and the Jengas by setting the count.
I do not know why is that my mouse move is so jerky when I run the demo form the desktop, let me know if you have that problems too.
Now I will see if I can figure out the crash in demo 2.
Next I will make the Player controller to actually use in a more realistic game level with ramp and jumps.
It is all in the same link as before
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby Julio Jerez » Fri Dec 25, 2009 12:28 pm

Kella can you reproduce the crash in demo 2 when running the demo in debug mode?

how many balls do you have to shoot? I am doing for more than five minute until the fps is so low that I cannot continue, and I do not get it to crash.
Is there some special angle or something I need to do to mak eit happens?
Julio Jerez
Moderator
Moderator
 
Posts: 12425
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Custom joints vehicle and weak joints

Postby kallaspriit » Fri Dec 25, 2009 12:54 pm

Sorry, I changed the library to 2.15 and restarted VS, but it did not update the path. With real 2.15, the crash seems to be no more :P

I will commit the changes soon.
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest