Train

Share with us how are you using the powerrrr of the force

Moderator: Alain

Train

Postby Leadwerks » Mon Nov 12, 2007 3:52 pm

http://www.leadwerks.com/post/train.wmv

It's pretty simple, but here is what I have found so far:

-Use small wheels so the train doesn't derail.
-Use an upvector joint on train cars.

I am about to try using a treecollision for track collision instead of convex hulls. I think the interior faces where the track segments meet are causing the wheels to catch on the track.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby JernejL » Mon Nov 12, 2007 5:27 pm

suggestion: build a maglev? :D
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Postby Leadwerks » Mon Nov 12, 2007 5:34 pm

I found that I got much better results by doing away with wheels.

Each train car has two chassis. Each chasses is one boat-shaped convex hull. The tapered edges help prevent sticking. The width of the chassis hull should be a little less than the track width, so it can negotiate curves.

The main car body gets connected to both chassis by hinge joints.

I added an upvector to both chassis and the body. I don't know if this is necessary, but it keeps things stable.

Disable friction on collisions between the train and the track. Add force to one of the chassis to pull the train.

I added 3 cars connected by hinges and it is stable and looks good.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby JernejL » Mon Nov 12, 2007 5:40 pm

half-life engine has trains by setting origin points and having the object travel on the path directly, have you considered such a method?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Postby Leadwerks » Mon Nov 12, 2007 5:51 pm

That is a * method. Why would I want to punish my users like that?
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby JernejL » Mon Nov 12, 2007 6:51 pm

Leadwerks wrote:That is a * method. Why would I want to punish my users like that?


It's just a kind of functionality.. i bet it would work way more stable on high speeds that way.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Postby Leadwerks » Mon Nov 12, 2007 9:01 pm

User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby Julio Jerez » Tue Nov 13, 2007 12:37 am

wow that's vey impresive.
I think this is the first time I seen a Train in a rail road, very nice.
and it is a long set of cars. :D
I love the derailing :o
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Leadwerks » Tue Nov 13, 2007 1:38 am

Six cars running. The length of the train doesn't seem to be much of an issue. The curves are very sharp, so I am happy with the speed I am getting at this radius.
http://www.leadwerks.com/post/train3.wmv

I think using convex hulls for the rail collision is causing the train slider to catch on the edges. As soon as the next beta is ready which fixes that serialized tree collision bug, I will try using polygon collision on the rails.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby Julio Jerez » Tue Nov 13, 2007 2:42 am

Oh I see those are 6-railroad cars each made of tow set ot wheel, one in the front and one in the back.
I see the wheel set wobble a little, (i know it is not desired but I find very nice) are those made of wheels or is there a trick there?

You should put some of those video in youtube, when you feel comfortable.
They get more exposure there I think.
I am very surprise a rig like this worked at all, I would expect to be very hard to get going just because the large number of over defined degree of freedom in the whole system. You are a brave man for even try.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Dave Gravel » Tue Nov 13, 2007 2:44 pm

Nice work.
Remember me the first Soldier of Fortune train but with better graphics and physics.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Postby Leadwerks » Sat Nov 24, 2007 5:54 am

User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby Julio Jerez » Sat Nov 24, 2007 11:36 am

It is me of the train is getting longer. and you are traveling on it :twisted: :shock:
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Leadwerks » Mon Jan 07, 2008 6:58 pm

Image
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby Dave Gravel » Mon Jan 07, 2008 7:52 pm

looking really nice.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Next

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 8 guests

cron