Tank demo (2008)

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

Moderator: Alain

Postby Vsk » Fri Mar 07, 2008 9:21 pm

Sascha Willems wrote:
Leadwerks wrote:I notice the tank seems to spin very easily, as if it doesn't have much mass. It also wobble frontwards and back a lot.

I have a model of a JagD Panther I'd like to do a demo with in my engine. This is pretty sweet.


Well, it's a non-finished demo of a proof-of-concept ;)

I'm still working on it and tweaking it. I don't think that the fast spinning is a mass problem, cause that would then also happen when starting to accelerate, I thin I'll have to take the track's speed into account when accelerating the contacts along their tangents. Wobbling is also because I'm still working out the best way to have the tracks feel dynamic and not as if the whole tank was a monolithic block of metal, and now it's just using a simple hinge. And a bit of wobbling is realistic, just look at a tank hopping around a terrain, although I'm still experimenting on what's the best solution for having a trank track that feels dynamic and realistic.


Your tank is preety good, but I think that anyway the more realistic is using a wheel per every tank "wheel".
In this way the behavior the trunk is almost perfect due to we can control every wheel suspension, spring size,torque per wheel, aceleration etc. And the behavior on sudenly hill is perfect too.

But this way is horriyble slow.

With the wheels, the visual represtantion is amazing. Painfully I use some mix because the low performance and must reduce even the tank numbers.

Next week if I continue :lol: working on this applicaton, I will see what should do, myabe wth the next newton version is possible to use the wheels form with good performance, I don't know.

By the way, both videos are realy amazing :).
Vsk
 
Posts: 34
Joined: Thu Oct 18, 2007 3:13 pm

Postby Julio Jerez » Fri Mar 07, 2008 10:01 pm

Vsk wrote:But this way is horriyble slow.

With the wheels, the visual represtantion is amazing. Painfully I use some mix because the low performance and must reduce even the tank numbers.

Next week if I continue :lol: working on this applicaton, I will see what should do, myabe wth the next newton version is possible to use the wheels form with good performance, I don't know.

By the way, both videos are realy amazing :).

The update after this beta will have the car fully finish and that should alleviate the slwo down problem or simulating traks with wheels.

let us not dismiss master Sascha the friction traction idea, too soon, you have not seen the final product yet.
Here in the institute for advances studies of the art art of the pawaaaaaa of force, there is and army of dark masters studding the case.
The head Master toll me to “keep you hop up” they are working of a spcial joint to enhance the functionality
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Vsk » Fri Mar 07, 2008 11:23 pm

Julio Jerez wrote:
Vsk wrote:But this way is horriyble slow.

With the wheels, the visual represtantion is amazing. Painfully I use some mix because the low performance and must reduce even the tank numbers.

Next week if I continue :lol: working on this applicaton, I will see what should do, myabe wth the next newton version is possible to use the wheels form with good performance, I don't know.

By the way, both videos are realy amazing :).

The update after this beta will have the car fully finish and that should alleviate the slwo down problem or simulating traks with wheels.

let us not dismiss master Sascha the friction traction idea, too soon, you have not seen the final product yet.
Here in the institute for advances studies of the art art of the pawaaaaaa of force, there is and army of dark masters studding the case.
The head Master toll me to “keep you hop up” they are working of a spcial joint to enhance the functionality


No, no at all, I think that Sascha ideas is very good, but I don't know how difficult could be for me represente differente types of tanks with its respectives gear box with this metod.
With other one, I have somehow realized that is posible. But with this one I have no idea.

Even more, when I start with this proyect I check for several examples and engines that can give me an initial push to start, and sascha old demo was one (and I think best), but due that I founded no source, I finish in irrlicht with some vehicle demo from newton that I take from start and transformed to create the tank.

Next week I will decide (I hope :?) wich method is the best for me, for realisitc+easy+performance, and as always this 3 ones contradict among them :?.
And I hope to add breakable object to the tanks!!!. Or whaterver, I just want it to use it!. :D.
Vsk
 
Posts: 34
Joined: Thu Oct 18, 2007 3:13 pm

Postby Sascha Willems » Sat Mar 08, 2008 8:57 am

Vsk wrote:Your tank is preety good, but I think that anyway the more realistic is using a wheel per every tank "wheel".
In this way the behavior the trunk is almost perfect due to we can control every wheel suspension, spring size,torque per wheel, aceleration etc. And the behavior on sudenly hill is perfect too.

Well, that can be done using my method too. You can represent each wheel with a chamfer that has a damper attached (for simulating a suspension) and it's then still a lot faster than using the vehicle container.

Vsk wrote:No, no at all, I think that Sascha ideas is very good, but I don't know how difficult could be for me represente differente types of tanks with its respectives gear box with this metod.
With other one, I have somehow realized that is posible. But with this one I have no idea.

It's much easier to implement different types of tanks with different gearboxes with my method than with using the vehicle container. Cause in the material callback you directly apply acceleration for each track, and linking that acceleration to different gears (or types of tanks) is much easier than having to tweak the vehicle container for your needs. Besides this you're much more flexible with this contact method as it allows you to do some things in addition that the fixed vehicle container couldn't do.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Postby Leadwerks » Sat Mar 08, 2008 12:01 pm

I think it makes a lot of sense to do tank treads with the material callback...and it is supercool. I look forward to seeing the finished perfected version.
User avatar
Leadwerks
 
Posts: 515
Joined: Fri Oct 27, 2006 2:54 pm

Postby Vsk » Sat Mar 08, 2008 12:46 pm

Sascha Willems wrote:
Vsk wrote:Your tank is preety good, but I think that anyway the more realistic is using a wheel per every tank "wheel".
In this way the behavior the trunk is almost perfect due to we can control every wheel suspension, spring size,torque per wheel, aceleration etc. And the behavior on sudenly hill is perfect too.

Well, that can be done using my method too. You can represent each wheel with a chamfer that has a damper attached (for simulating a suspension) and it's then still a lot faster than using the vehicle container.

Vsk wrote:No, no at all, I think that Sascha ideas is very good, but I don't know how difficult could be for me represente differente types of tanks with its respectives gear box with this metod.
With other one, I have somehow realized that is posible. But with this one I have no idea.

It's much easier to implement different types of tanks with different gearboxes with my method than with using the vehicle container. Cause in the material callback you directly apply acceleration for each track, and linking that acceleration to different gears (or types of tanks) is much easier than having to tweak the vehicle container for your needs. Besides this you're much more flexible with this contact method as it allows you to do some things in addition that the fixed vehicle container couldn't do.


About the first part, so is this posible with that technique do this?:

http://video.google.com/videoplay?docid=-1126029353128850628&q=tanks&total=117764&start=0&num=10&so=0&type=search&plindex=0

check between second 22-29.

With the wheels form I could do it. Thats my principal doubt.
Vsk
 
Posts: 34
Joined: Thu Oct 18, 2007 3:13 pm

Postby Sascha Willems » Sat Mar 08, 2008 12:58 pm

Vsk wrote:With the wheels form I could do it. Thats my principal doubt.

Yes, that's possible. It's your choice how to subdivide the track, and if you use chamfers for the representation of the track, attach them with sliders and add damping to that sliders it should be perfectly possible to have a nice and smooth suspension. The suspension itself has nothing to do with the fact that track acceleration is done within a material callback, it's up to the you to select the best track hull approximation. Maybe I'll implement what I said above this weekend.

And on another side note, I've just implemented gamepad controls for the demo and although it's still far from perfect it's already a lot of fun, cause you can now directly control the single tracks' acceleration with two analog sticks : Image
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Postby Sascha Willems » Sat Mar 08, 2008 2:51 pm

Just to show off what I meant, have a look at this picture :
Image
Note :This is something I implemented quickly (I'll have to leave home in about an hour, otherwise I would have made it better), and usually you'd have the wheels pivot follow the track.

In that version I replaced the convex hull of the tracks (actually I just moved them out of the way ;) ) with several chamfers for each track, and each chamfer is fitted with a sliderjoint that has limits and a damper attached. Sliders with limits and dampers can be very easily implemented with the custom joints (the one in the SDK should have the two already ready to use). If you look at the shot you'll see that they follow the terrain and behave like real wheels with a damper, but it's NOT using newton's vehicle container. Each of the chamfer has my material callback where I accelerate along the tangents, so I guess this is exactly what you've been after.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Postby Vsk » Sat Mar 08, 2008 3:17 pm

Yeah, yeah you win ;-).
Thats why you are the Darth master and I am the begginer :P.

Well, buy anyway, you are gonna free some source about it some day or not :?. I already maybe were using ogre+ newton but at that time I found no source fro examle :(.
Now that you have convince me then you must face the consequences :P:D.

See ya.
Vsk
 
Posts: 34
Joined: Thu Oct 18, 2007 3:13 pm

Postby Julio Jerez » Sat Mar 08, 2008 4:58 pm

So this is getting more and more interesting, now I am fully convinced that Sascha's idea not only is simpler but it leads to simulation grade track based vehicles. Way to go Master Sascha. :D :D

Vsk wrote:Yeah, yeah you win ;-).
Thats why you are the Darth master and I am the begginer :P.

You see Vsk, do not despair, always hope of the pawaaaa of the force.
Here is the good news is that the new beta will have a demo of a tank similar to the want that Mast Sascha is showing. (not as nice but we do what we can)
VSK we prefer to term aprentices instead of begginer. :D
Here is a video.
http://www.newtondynamics.com/downloads ... seTank.wmv

The only different in the video/SDK demo is that is have a special Joint call sliding contact(inspired on Master Sascha idia to mount the threads on a hinge :shock: :D ), that can be use to simulate axel base suspensions.
This joint allow for two degree of freedom motion, one longitudinal and one rotational.
This allows the threads to adjust better to the surface without force the body of the tank to follow the motion of eth threads. This is what eliminates the cartoony box motion feel you will get using only friction, and is even better that using a hinge.
I have not added the motion and the upper bumpers limits, but as soon as I do it there will be a new SDK beta update wit eth code, (top a day for the time of this post)
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Julio Jerez » Tue Mar 11, 2008 1:06 pm

I think we need to put more fire pawarrrrrr in that level, and show the allied forces.

http://www.newtondynamics.com/downloads ... eTank1.wmv
what do you think VSK? (watch the secund half)
now Master Sascha had to make a Leorpard, to fight the M1a1 and we can enter the canadian army tank ank competition.
http://www.youtube.com/watch?v=2X4j_2Kgi9o

edit: i posted this in wrong thread before
I posted in the worng thread
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Sascha Willems » Thu Mar 13, 2008 1:37 pm

I've been refining the demo, and I'm almost ready to release, but there is one thing I still have to "fix" before a final release. It's not that easy to describe by words, but I'll try :

If you move forwards (both track accelerators at the same speed), lower one tracks acceleration to turn a bit (left accelerator != right accelerator) and then accelerate the other track again the tank will turn like a vehicle driving a curve. Obviously that's not correct, but it's caused due to the then occurring difference between the track's tangent speed.

Now this happens only when the tank is driving, turning while standing works perfect, but I really want to change the above behavior.

So right now I try the following within the track material callback :
The user data stores the track's class (TTrack) that also stores a reference to the opposite track (TTrack.OppositeTrack), so I can easily access both track's properties in the material callback.
So now I see if both tracks are accelerating in the same direction (both accelerators > 0 or both < 0) and if that's the case I check if one track has a lower acceleration than the other, if yes, I try to get it to the same speed as the other track by adding a higher acceleration derived from the opposite's track acceleration. This works to a certain degree and turning while driving is now much more the way a tank does, but it's far from perfect. Therefore I'm asking if someone has another (better) idea how to get this done the way it's supposed. My solution is already going in the right direction, but still not perfect.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Postby Sascha Willems » Thu Mar 13, 2008 7:22 pm

Heureka, after tweaking the above mentioned method I got it working and it's now almost perfect, the tank can now turn like a real tank, especially when using analog input with e.g. the gamepad, that allows for smooth acceleration of the tracks.

This is what I do in the callback :
Code: Select all
Track.TangentAccel := NewtonMaterialGetContactTangentSpeed(Material, 0);
...
// Special case :
//  Both track accelerating, but one track is slower than the other, try to keep up to the
//  other track. This happens e.g. if both tracks are accelerating, one goes slower (to turn)
//  and then both are accelerated again
if (Track.Accelerator > 0) and (Track.OppositeTrack.Accelerator > 0) then
 if Abs(Track.OppositeTrack.TangentAccel-Track.TangentAccel) > 2 then // tweak threshold
  F := -Track.OppositeTrack.TangentAccel;
...
// Limit speed
if (Track.TangentAccel > 75) or (Track.TangentAccel < -75) then
 F := -Track.TangentAccel;


I think now it's time to tweak the values, right now turning at high speed is a bit too fast, but that's also just a small part of connecting both tracks speed for calculations. I'm getting closer and closer ;)
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Postby Julio Jerez » Thu Mar 13, 2008 7:29 pm

what do the audiance want.
The audiance demand beefup video?
Julio Jerez
Moderator
Moderator
 
Posts: 10954
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Sascha Willems » Thu Mar 13, 2008 9:27 pm

OK, so here is a new video :
http://www.saschawillems.de/misc/newton ... 2008v3.wmv
(WMV format, ~27 MBytes, 3:42 min)

It shows the newest version of the demo, including a bigger and more complex terrain, with the rotating turret and the stuff I mentioned above, so turning now is almost perfect. I now only have to fix the awkward fast turning at higher speeds that sometimes occur and I'm ready for releasing the demo (hopefully this weekend, I bet you guys are sick of the video and want to steer this yourselves). If you take a look at the lower right corner of the screen you'll see the accelerators for both tracks, so you can roughly see how I was steering the tank using my gamepad's analog sticks.

I think I have to notice is how uneasy it is to get used to such kind of controls, as no single game I've ever played (except for one real tank simulation) uses two analog inputs for controlling the tracks. But once you get used to it's a lot of fun as you can control each track separate.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

PreviousNext

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 1 guest

cron