'Proper' Bogie Motion!

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

'Proper' Bogie Motion!

Post by leezer3 on Sun Apr 10, 2016 11:32 pm

The most recent nightly build of openBVE now implements 'proper' bogie motion. (2016-04-10 or later)

First off, an important note:
There has been some discussion on replacing the train.dat / extensions.cfg setup with an improved variant (I intend to use XML, but all of the specifics haven't been hammered out yet)
This implementation is based upon the existing formats as somewhat of a 'stopgap' measure, and proof of concept Smile

Adding a moving bogie

Build your bogie object, with 0,0,0 as the point around which you wish it to pivot.

Bogies may be added in the extensions.cfg file as follows:
Code:
[BogieN]
Object = bogie.b3d
Length = 5
Axles = 2.5,-2.5

For this, N is the zero-based index of the bogie you wish to add.
For example:
Car 0:
Bogie0 (Front bogie)
Bogie1 (Rear bogie)

Car 1:
Bogie2 (Front bogie)
Bogie3 (Rear bogie)
etc. etc.

Bogies are attached at the location set for the axles of each car.

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 747
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by graymac on Mon Apr 11, 2016 4:45 pm

I presume this retains the facility with the routefile .stop instruction to specify multiple working stopping points dependent on train length?

(note):
Some time ago, a previous (ingenious, but flawed) attempt at providing better representation of bogie behaviour was hampered by the unfortunate fact that the car stops were unworkable because each bogie was actually modelled as a 'car'. Meaning a loco and six cars appeared to be 21 cars as far as the program was concerned, so car counting was meaningless in terms of train length.

graymac

Posts : 1704
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by leezer3 on Mon Apr 11, 2016 10:46 pm

graymac wrote:I presume this retains the facility with the routefile .stop instruction to specify multiple working stopping points dependent on train length?

(note):
Some time ago, a previous (ingenious, but flawed) attempt at providing better representation of bogie behaviour was hampered by the unfortunate fact that the car stops were unworkable because each bogie was actually modelled as a 'car'. Meaning a loco and six cars appeared to be 21 cars as far as the program was concerned, so car counting was meaningless in terms of train length.

Absolutely.
This 'solution' does not alter the train length in any way.
Bogies are also not counted as collision objects (That makes no sense.....)



There are several ways to implement moving bogies with the official builds, but at their root, they all rely on the same bug with the physics engine. A small technical explanation:
openBVE's collision detction is very basic, and strictly linear.
Look at the following image:


As you can see, we have two cars.

A 'standard' collision model would check if any part of the cars overlap: In the following image, the section colored blue is overlapping, and hence a collision has occured.


openBVE on the other hand, only checks for collision between the two ends (Colored red).

This means that we can use any number of methods (Objects built in the negative, use of couplers etc.) in order to 'move' the cars to be in a different order on load.
So long as our two ends do not collide, the bogies move as intended.

Edit:
Final point-
This 'bug' will not be fixed for trains using the train.dat / extensions.cfg format. There are too many trains built already which rely on it, and I wish to keep backwards compatibility unless absolutely avoidable.

If (when) the replacement format is completed, this bug will be fixed for trains using that format, so *please* do not rely upon it for any new construction going forwards.
If you're using this 'bug' to do anything else, please post and I'll see what can be done to provide an official way of doing so.

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 747
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by joeyfjj on Tue Apr 12, 2016 1:30 pm

The openBVE-type collision model may allow simulating articulated bogies by setting a bogie's location to be beyond the length of a car.

Removing this workaround and providing an alternative solution might mean quite a bit of factoring in the code.

joeyfjj

Posts : 262
Join date : 2011-07-30
Location : Singapore

http://openbve.joeyfoo.com

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Quork on Tue Apr 12, 2016 1:56 pm

That's why, as I see it, Chris explicitely stated he won't be changing the behaviour for the legacy format.

Quork

Posts : 1030
Join date : 2012-05-05
Age : 25
Location : Frankfurt am Main (Frankfurt on Main), Hessen (Hesse), European Union (Deutschland (Germany))

http://www.parkbahnschmiden.de/

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by joeyfjj on Tue Apr 12, 2016 2:42 pm

Quork: was responding to the following:

"If you're using this 'bug' to do anything else, please post and I'll see what can be done to provide an official way of doing so."

joeyfjj

Posts : 262
Join date : 2011-07-30
Location : Singapore

http://openbve.joeyfoo.com

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by leezer3 on Tue Apr 12, 2016 3:00 pm

I don't think articulated bogies should be particularly difficult other than in terms of configuring them (The basic maths is relatively easy- All it really requires is another pair of track followers and another rotation matrix), but let me think about it for a bit before I give you a definitive answer as to whether a solution can be added.

A currently working example would be nice if you have one I can play with- It's much easier to visualise when you have an example that already works in your intended way.

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 747
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Thu Apr 14, 2016 11:06 pm

Long time no see and look what's happening. :-) I will definitely give this a shot for my trains. :-)

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by atimur on Sat Apr 23, 2016 11:38 pm

Ooooh great news! I will definitely test that soon Very Happy should find some train to "chop" for it though...

atimur

Posts : 19
Join date : 2014-09-21

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by mrknowitall on Sun May 01, 2016 9:29 am

Nice to see this in the update, when the bogies concept came along for the APT myself and Alan were limited in terms of what BVE allowed and didn't allow . At least this way the whole 3 cars rather than 1 can be fixed, at the time it was an easy enough short term fix of dividing the total weight by 3 for all cars and bogies so the trains weight didn't alter, but developers weren't too keen on the idea!

mrknowitall

Posts : 711
Join date : 2011-07-09
Age : 24

http://www.bve-terminus.org/pioneertrains/

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Quork on Sun May 01, 2016 10:16 am

Didn't it also sort of screw the toppling physics up somewhat? I'm definitely curious to see more bogie trains now!

Quork

Posts : 1030
Join date : 2012-05-05
Age : 25
Location : Frankfurt am Main (Frankfurt on Main), Hessen (Hesse), European Union (Deutschland (Germany))

http://www.parkbahnschmiden.de/

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Sat Jun 11, 2016 11:52 pm

Chris,
sorry for being a bit thick here, but I am wondering why there are two axles per bogie? Also, do we remove the Axles from the [car] section then? If I put it as follows, it does not work... both the car and the actual bogies are centered along 0 on the Z axis. The bogies show up in an incorrect position.
Code:
[Car0]
Object = external\754\754.animated
Length = 16.54
Axles = -4.5,4.5

[Bogie0]
Object = external\754\Podvozek01.animated
Length = 3.9
Axles = -1.85,1.85

[Bogie1]
Object = external\754\Podvozek01.animated
Length = 3.9
Axles = -1.85,1.85

Thank you for reply!

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Quork on Sun Jun 12, 2016 1:03 am

Because bogies can be quite long. Take a tram, if the bogie model didn't have two axles, this would show *very* much on small radius tram line curves.

Quork

Posts : 1030
Join date : 2012-05-05
Age : 25
Location : Frankfurt am Main (Frankfurt on Main), Hessen (Hesse), European Union (Deutschland (Germany))

http://www.parkbahnschmiden.de/

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Sun Jun 12, 2016 1:21 am

Right, but how to represent one axle only? Do we omit one value then?

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Quork on Sun Jun 12, 2016 1:55 am

Why would you add a bogie if there's just a single axle? *confused* (which might, to be fair, just as well be related to my Caipirinha and Mojito)

Quork

Posts : 1030
Join date : 2012-05-05
Age : 25
Location : Frankfurt am Main (Frankfurt on Main), Hessen (Hesse), European Union (Deutschland (Germany))

http://www.parkbahnschmiden.de/

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Sun Jun 12, 2016 5:22 am

Class 854. :-) (Yeah, I know it does not make sense, it was for testing purposes)
Anyway, I am guessing it does not make any difference to the bogies being displayed incorrectly... I now do get why two numbers (I was just being useless tonight Rolling Eyes Laughing), but I don't get why the bogie is not displayed correctly.

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by leezer3 on Sun Jun 12, 2016 6:59 pm

Some observations:
A bogie requires two axles, in order to calculate correctly it's rotation.
Bogies and cars aren't attached to tracks as-such, but rather require two points of reference to rotate them Smile

The [Axles] section is required for the main car:
The sim places each bogie with it's center at the axle position.

I'm not sure off the top of my head why the bogie position is wrong- I need more data to go on.
Adding a bogie from the Western to your 754 works OK, which makes me suspect that your bogie objects aren't correctly centered, but that's only a guess.....

(Post the bogie object. Mesh only with no wheels or textures is fine)

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 747
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Mon Jun 13, 2016 6:43 am

Thanks, Chris, I think I have figured it out with the axles. However, the bogies do still show incorrectly, I must be doing something wrong. I will try to post the code later today, when I get home.

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Mon Jun 13, 2016 4:17 pm

Here it is.

Physical bogie:
Code:
;NapravaIa
CreateMeshbuilder
AddVertex, -1.1, 0.9, 1.85, 1,-1,1
AddVertex, -0.8, 0.9, 1.85, 1,-1,1
AddVertex, -0.8, 0.9, -1.85, 1,-1,1
AddVertex, -1.1, 0.9, -1.85, 1,-1,1
AddFace,0,1,2,3,
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.05
SetTextureCoordinates,1,0,0
SetTextureCoordinates,2,1,0
SetTextureCoordinates,3,1,0.05

CreateMeshBuilder
AddVertex, -1.1, 0.75, -1.85, -1,-1,0
AddVertex, -1.1, 0.9, -1.85, -1,-1,0
AddVertex, -0.8, 0.9, -1.85, -1,-1,0
AddVertex, -0.8, 0.75, -1.85, -1,-1,0
AddFace,0,1,2,3
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.235
SetTextureCoordinates,1,0,0.02
SetTextureCoordinates,2,0.2,0.02
SetTextureCoordinates,3,0.2,0.255

CreateMeshBuilder
AddVertex, -1.1, 0.75, 1.85, -1,-1,0
AddVertex, -1.1, 0.9, 1.85, -1,-1,0
AddVertex, -0.8, 0.9, 1.85, -1,-1,0
AddVertex, -0.8, 0.75, 1.85, -1,-1,0
AddFace,3,2,1,0
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.235
SetTextureCoordinates,1,0,0.02
SetTextureCoordinates,2,0.2,0.02
SetTextureCoordinates,3,0.2,0.255

CreateMeshBuilder
AddVertex, -1.1, 0.75, -1.85, -1,-1,0
AddVertex, -1.1, 0.9, -1.85, -1,-1,0
AddVertex, -1.1, 0.9, 1.85, -1,-1,0
AddVertex, -1.1, 0.75, 1.85, -1,-1,0
AddVertex, -1.1, 0.65, 1.5, -1,-1,0
AddVertex, -1.1, 0.65, -1.5, -1,-1,0
AddFace,5,4,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.235
SetTextureCoordinates,1,0,0.02
SetTextureCoordinates,2,1,0.02
SetTextureCoordinates,3,1,0.255
SetTextureCoordinates,4,0.91,0.42
SetTextureCoordinates,5,0.09,0.41

CreateMeshBuilder
AddVertex, -1.1, 0.3, -0.5, -1,-1,0
AddVertex, -1.1, 0.65, -1.27, -1,-1,0
AddVertex, -1.1, 0.65, 1.27, -1,-1,0
AddVertex, -1.1, 0.3, 0.5, -1,-1,0
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0.63,0.995
SetTextureCoordinates,1,0.848,0.42
SetTextureCoordinates,2,0.151,0.41
SetTextureCoordinates,3,0.361,0.995

CreateMeshBuilder
AddVertex, -0.8, 0.75, -1.85, 0,-1,0
AddVertex, -0.8, 0.9, -1.85, 0,-1,0
AddVertex, -0.8, 0.9, 1.85, 0,-1,0
AddVertex, -0.8, 0.75, 1.85, 0,-1,0
AddVertex, -0.8, 0.65, 1.5, 0,-1,0
AddVertex, -0.8, 0.65, -1.5, 0,-1,0
AddFace,0,1,2,3,4,5
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.235
SetTextureCoordinates,1,0,0.02
SetTextureCoordinates,2,1,0.02
SetTextureCoordinates,3,1,0.255
SetTextureCoordinates,4,0.91,0.42
SetTextureCoordinates,5,0.09,0.41

CreateMeshBuilder
AddVertex, -0.8, 0.3, -0.5, 0,-1,0
AddVertex, -0.8, 0.65, -1.27, 0,-1,0
AddVertex, -0.8, 0.65, 1.27, 0,-1,0
AddVertex, -0.8, 0.3, 0.5, 0,-1,0
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0.63,0.995
SetTextureCoordinates,1,0.848,0.42
SetTextureCoordinates,2,0.151,0.41
SetTextureCoordinates,3,0.361,0.995

CreateMeshBuilder,
Cylinder, 10, -0.14, -0.14, 0.4
Rotate,0,1,0,90
Translate, -0.94,1.08,-0.15
LoadTexture, 754-napravaII-uchyt.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.14, -0.14, 0.4
Rotate,0,1,0,90
Translate, -0.94,1.08,0.15
LoadTexture, 754-napravaII-uchyt.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder
AddVertex, -0.98, 0.28, 1.46,
AddVertex, -0.98, 0.65, 1.46,
AddVertex, -0.98, 0.65, 0.61,
AddVertex, -0.98, 0.32, 0.61,
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-poloosa.png
SetTextureCoordinates,0,0,1
SetTextureCoordinates,1,0,0
SetTextureCoordinates,2,1,0
SetTextureCoordinates,3,1,0.9

CreateMeshBuilder
AddVertex, -0.98, 0.32, -0.59,
AddVertex, -0.98, 0.65, -0.59,
AddVertex, -0.98, 0.65, -1.46,
AddVertex, -0.98, 0.28, -1.46,
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-poloosa.png
SetTextureCoordinates,0,1,0.9
SetTextureCoordinates,1,1,0
SetTextureCoordinates,2,0,0
SetTextureCoordinates,3,0,1

CreateMeshBuilder,
Cylinder, 10, -0.12, 0.12, 0.15
Rotate,0,1,0,90
Translate, -0.97,0.97,1.57
LoadTexture, 754-napravaII-v1.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.11, -0.11, 0.55
Rotate,0,1,0,-90
Translate, -0.97,0.55,1.57
LoadTexture, 754-napravaII-v2.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.12, 0.12, 0.15
Rotate,0,1,0,90
Translate, -0.97,0.97,-1.57
LoadTexture, 754-napravaII-v1.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.11, -0.11, 0.55
Rotate,0,1,0,90
Translate, -0.97,0.55,-1.57
LoadTexture, 754-napravaII-v2.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.04, 0.04, 0.44
Translate, -1,0.55,-1.77
LoadTexture, 754-napravaII-v3.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder
AddVertex, -1.04, 0.275, -1.65,
AddVertex, -1.04, 0.4, -1.65,
AddVertex, -1.04, 0.4, -1.82,
AddVertex, -1.04, 0.275, -1.82,
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-napravaII-spoj.png
SetTextureCoordinates,0,1,1
SetTextureCoordinates,1,1,0
SetTextureCoordinates,2,0,0
SetTextureCoordinates,3,0,0.9

CreateMeshBuilder,
Cylinder, 10, -0.04, 0.04, 0.44
Translate, -1,0.55,1.77
LoadTexture, 754-napravaII-v3.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder
AddVertex, -1.04, 0.275, 1.65,
AddVertex, -1.04, 0.4, 1.65,
AddVertex, -1.04, 0.4, 1.82,
AddVertex, -1.04, 0.275, 1.82,
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII-spoj.png
SetTextureCoordinates,0,1,1
SetTextureCoordinates,1,1,0
SetTextureCoordinates,2,0,0
SetTextureCoordinates,3,0,0.9



;NapravaIb
CreateMeshbuilder
AddVertex, 1.1, 0.9, 1.85, 1,-1,1
AddVertex, 0.8, 0.9, 1.85, 1,-1,1
AddVertex, 0.8, 0.9, -1.85, 1,-1,1
AddVertex, 1.1, 0.9, -1.85, 1,-1,1
AddFace,0,1,2,3,
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.05
SetTextureCoordinates,1,0,0
SetTextureCoordinates,2,1,0
SetTextureCoordinates,3,1,0.05

CreateMeshBuilder
AddVertex, 1.1, 0.75, -1.85, -1,-1,0
AddVertex, 1.1, 0.9, -1.85, -1,-1,0
AddVertex, 0.8, 0.9, -1.85, -1,-1,0
AddVertex, 0.8, 0.75, -1.85, -1,-1,0
AddFace,0,1,2,3
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.235
SetTextureCoordinates,1,0,0.02
SetTextureCoordinates,2,0.2,0.02
SetTextureCoordinates,3,0.2,0.255

CreateMeshBuilder
AddVertex, 1.1, 0.75, 1.85, -1,-1,0
AddVertex, 1.1, 0.9, 1.85, -1,-1,0
AddVertex, 0.8, 0.9, 1.85, -1,-1,0
AddVertex, 0.8, 0.75, 1.85, -1,-1,0
AddFace,3,2,1,0
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.235
SetTextureCoordinates,1,0,0.02
SetTextureCoordinates,2,0.2,0.02
SetTextureCoordinates,3,0.2,0.255

CreateMeshBuilder
AddVertex, 1.1, 0.75, -1.85, -1,-1,0
AddVertex, 1.1, 0.9, -1.85, -1,-1,0
AddVertex, 1.1, 0.9, 1.85, -1,-1,0
AddVertex, 1.1, 0.75, 1.85, -1,-1,0
AddVertex, 1.1, 0.65, 1.5, -1,-1,0
AddVertex, 1.1, 0.65, -1.5, -1,-1,0
AddFace,0,1,2,3,4,5
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,1,0.235
SetTextureCoordinates,1,1,0.02
SetTextureCoordinates,2,0,0.02
SetTextureCoordinates,3,0,0.255
SetTextureCoordinates,4,0.09,0.42
SetTextureCoordinates,5,0.91,0.41

CreateMeshBuilder
AddVertex, 1.1, 0.3, -0.5, -1,-1,0
AddVertex, 1.1, 0.65, -1.27, -1,-1,0
AddVertex, 1.1, 0.65, 1.27, -1,-1,0
AddVertex, 1.1, 0.3, 0.5, -1,-1,0
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0.361,0.995
SetTextureCoordinates,1,0.151,0.42
SetTextureCoordinates,2,0.848,0.41
SetTextureCoordinates,3,0.63,0.995

CreateMeshBuilder
AddVertex, 0.8, 0.75, -1.85, 0,-1,0
AddVertex, 0.8, 0.9, -1.85, 0,-1,0
AddVertex, 0.8, 0.9, 1.85, 0,-1,0
AddVertex, 0.8, 0.75, 1.85, 0,-1,0
AddVertex, 0.8, 0.65, 1.5, 0,-1,0
AddVertex, 0.8, 0.65, -1.5, 0,-1,0
AddFace,5,4,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0,0.235
SetTextureCoordinates,1,0,0.02
SetTextureCoordinates,2,1,0.02
SetTextureCoordinates,3,1,0.255
SetTextureCoordinates,4,0.91,0.42
SetTextureCoordinates,5,0.09,0.41

CreateMeshBuilder
AddVertex, 0.8, 0.3, -0.5, 0,-1,0
AddVertex, 0.8, 0.65, -1.27, 0,-1,0
AddVertex, 0.8, 0.65, 1.27, 0,-1,0
AddVertex, 0.8, 0.3, 0.5, 0,-1,0
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII.png
SetTextureCoordinates,0,0.63,0.995
SetTextureCoordinates,1,0.848,0.42
SetTextureCoordinates,2,0.151,0.41
SetTextureCoordinates,3,0.361,0.995

CreateMeshBuilder,
Cylinder, 10, -0.14, -0.14, 0.4
Rotate,0,1,0,90
Translate, 0.94,1.08,-0.15
LoadTexture, 754-napravaII-uchyt.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.14, -0.14, 0.4
Rotate,0,1,0,90
Translate, 0.94,1.08,0.15
LoadTexture, 754-napravaII-uchyt.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder
AddVertex, 0.98, 0.28, 1.46,
AddVertex, 0.98, 0.65, 1.46,
AddVertex, 0.98, 0.65, 0.61,
AddVertex, 0.98, 0.32, 0.61,
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-poloosa.png
SetTextureCoordinates,0,0,1
SetTextureCoordinates,1,0,0
SetTextureCoordinates,2,1,0
SetTextureCoordinates,3,1,0.9

CreateMeshBuilder
AddVertex, 0.98, 0.32, -0.59,
AddVertex, 0.98, 0.65, -0.59,
AddVertex, 0.98, 0.65, -1.46,
AddVertex, 0.98, 0.28, -1.46,
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-poloosa.png
SetTextureCoordinates,0,1,0.9
SetTextureCoordinates,1,1,0
SetTextureCoordinates,2,0,0
SetTextureCoordinates,3,0,1

CreateMeshBuilder,
Cylinder, 10, -0.12, 0.12, 0.15
Rotate,0,1,0,90
Translate, 0.97,0.97,1.57
LoadTexture, 754-napravaII-v1.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.11, -0.11, 0.55
Rotate,0,1,0,-90
Translate, 0.97,0.55,1.57
LoadTexture, 754-napravaII-v2.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.12, 0.12, 0.15
Rotate,0,1,0,90
Translate, 0.97,0.97,-1.57
LoadTexture, 754-napravaII-v1.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.11, -0.11, 0.55
Rotate,0,1,0,90
Translate, 0.97,0.55,-1.57
LoadTexture, 754-napravaII-v2.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder,
Cylinder, 10, -0.04, 0.04, 0.44
Translate, 1,0.55,-1.77
LoadTexture, 754-napravaII-v3.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder
AddVertex, 1.04, 0.275, -1.65,
AddVertex, 1.04, 0.4, -1.65,
AddVertex, 1.04, 0.4, -1.82,
AddVertex, 1.04, 0.275, -1.82,
AddFace,3,2,1,0
Generatenormals,
LoadTexture,754-napravaII-spoj.png
SetTextureCoordinates,0,1,1
SetTextureCoordinates,1,1,0
SetTextureCoordinates,2,0,0
SetTextureCoordinates,3,0,0.9

CreateMeshBuilder,
Cylinder, 10, -0.04, 0.04, 0.44
Translate, 1,0.55,1.77
LoadTexture, 754-napravaII-v3.png,
SetTextureCoordinates,0,0,0
SetTextureCoordinates,1,0,1
SetTextureCoordinates,2,0.2,0
SetTextureCoordinates,3,0.2,1
SetTextureCoordinates,4,0.4,0
SetTextureCoordinates,5,0.4,1
SetTextureCoordinates,6,0.6,0
SetTextureCoordinates,7,0.6,1
SetTextureCoordinates,8,0.8,0
SetTextureCoordinates,9,0.8,1
SetTextureCoordinates,10,1,0
SetTextureCoordinates,11,1,1
SetTextureCoordinates,12,0.8,0
SetTextureCoordinates,13,0.8,1
SetTextureCoordinates,14,0.6,0
SetTextureCoordinates,15,0.6,1
SetTextureCoordinates,16,0.4,0
SetTextureCoordinates,17,0.4,1
SetTextureCoordinates,18,0.2,0
SetTextureCoordinates,19,0.2,1

CreateMeshBuilder
AddVertex, 1.04, 0.275, 1.65,
AddVertex, 1.04, 0.4, 1.65,
AddVertex, 1.04, 0.4, 1.82,
AddVertex, 1.04, 0.275, 1.82,
AddFace,0,1,2,3
Generatenormals,
LoadTexture,754-napravaII-spoj.png
SetTextureCoordinates,0,1,1
SetTextureCoordinates,1,1,0
SetTextureCoordinates,2,0,0
SetTextureCoordinates,3,0,0.9

.animated
Code:
[object]
Position = 0,0,0
states = Podvozek01.csv

[object]
Position = -0.78, 0.5, -1.2
states = kolo.csv
RotateXFunction = value + delta * speedometer / 0.5

[object]
Position = -0.78, 0.5, 1.2
states = kolo.csv
RotateXFunction = value + delta * speedometer / 0.5

[object]
Position = 0.78, 0.5, -1.2
states = koloA.csv
RotateXFunction = value + delta * speedometer / 0.5

[object]
Position = 0.78, 0.5, 1.2
states = koloA.csv
RotateXFunction = value + delta * speedometer / 0.5

Code:
[Car0]
Object = external\754\754.animated
Length = 16.54
Axles = -4.5,4.5

[Bogie0]
Object = external\754\Podvozek01.animated
Length = 3.9
Axles = -1.3,1.3

[Bogie1]
Object = external\754\Podvozek01.animated
Length = 3.9
Axles = -1.3,-1.3

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by leezer3 on Tue Jun 14, 2016 11:17 am

Your second bogie's Axles value is wrong Wink

[Bogie1]
Object = external\754\Podvozek01.animated
Length = 3.9
Axles = -1.3,-1.3

Should be -1.3,1.3

Other than that, your bogies appear to work OK on this end.

Will check if it's generating an error message, but I think it should be.....

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 747
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Tue Jun 14, 2016 11:45 am

Right, it is... but I was trying with different values (a pair of a positive and a negative one) and it had no effect at all. Same position, same result... I think I am using the build from the 14th May... not at my PC, though, so don't take my word for it. Smile
I don't think the route could be the problem here, right?

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by leezer3 on Tue Jun 14, 2016 12:42 pm

Shouldn't be- I've tried with a few routes including First Brno Track and all appears OK.
I've fixed a couple of bugs with bogies since then, but they were both edge-cases (Front bogie declared, but no rear bogie, and bogies getting stuck on bufferstops)

Will do a little more digging, but can you give me a quick screenshot of what you're seeing please?

If you get today's build, I've also just added a bug report dialog. (Link at the bottom left of the main form)
You can access the previous log and crash log by clicking on the buttons here, and it's also got a function to create a zip file on your desktop containing the most recent simulation log and crash log (If applicable) plus the package database.

I don't think there's going to be anything useful in these, but it might help people in future.

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 747
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Tue Jun 14, 2016 1:11 pm

Will try to post it later today, I am not at my PC at the moment.

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Dexter on Thu Jun 16, 2016 7:26 pm

So, with the settings above, I get the following...


Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Quork on Thu Jun 16, 2016 8:13 pm

Weird, looks as you'd expect it to behave if it were constructed in the positive instead of around 0.0 - but as we see in your source code, it isn't. What would be interesting, what do they pivot around now?

Quork

Posts : 1030
Join date : 2012-05-05
Age : 25
Location : Frankfurt am Main (Frankfurt on Main), Hessen (Hesse), European Union (Deutschland (Germany))

http://www.parkbahnschmiden.de/

Back to top Go down

Re: 'Proper' Bogie Motion!

Post by Sponsored content Today at 2:30 pm


Sponsored content


Back to top Go down

Page 1 of 2 1, 2  Next

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum