If it's like child object entries (and I suspect it is) then i know how to make the relevant calculations.gptech wrote:From memory, as I won't be home till late, there are 2 long lists of transforms. I changed the value of -1 to 1 in the second list after taking a punt on the names defined in list 1 were in the same order order as those values in list 2.
This put the light over the roof of the coach but did support the link between the lists. There are 2 entries for the light, front facing and rear facing I think so I was going to see what happened with them swapped over.
That's about as far as I got, maybe it'll help you along.
Adding a tail light to rearmost vehicles.
Moderator: Moderators
Re: Adding a tail light to rearmost vehicles.
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
-
gptech
- Very Active Forum Member
- Posts: 19585
- Joined: Fri Oct 10, 2008 5:48 pm
- Location: Wakefield, West Yorkshire
Re: Adding a tail light to rearmost vehicles.
It wasn't a matrix Matthew, just one list of numbers and the second of transform names. Further down the .Geo though is a huge section dealing with what appeared to be what you're thinking of---- or at least something akin to a matrix. Transform 77 and 78 are the ones (I think)
It's not easy to describe from memory, but you should be able to see what's what.
It's not easy to describe from memory, but you should be able to see what's what.
- rfletcher72
- Very Active Forum Member
- Posts: 8643
- Joined: Sat Apr 28, 2007 10:59 pm
- Location: The Steel City
- Contact:
Re: Adding a tail light to rearmost vehicles.
If again my memory is functioning today, the order of these values listed in the .geo for each node are the same as that of matrices in a .bin file,gptech wrote:It wasn't a matrix Matthew, just one list of numbers and the second of transform names.
Richard
-
gptech
- Very Active Forum Member
- Posts: 19585
- Joined: Fri Oct 10, 2008 5:48 pm
- Location: Wakefield, West Yorkshire
Re: Adding a tail light to rearmost vehicles.
It probably is Richard; I think I'm not been conveying what I meant properly so as a picture speaks a thousand words (well, a direct lift from the .Geo)
As you can see, it isn't a set of values per transform, though of course it could be the resultant figure from a matrix multiplication.
Further down the .Geo are multiple sections with values for each transform that are more akin to a matrix,
but definitely not a matrix.
Any way, matrix maths is too hard after a long shift, so I went for the easy approach first...

Just edit this bit in the transform name listing:
to:
This works on both ends of that particular coach (for me at least) which is the NSE BSK.
Before I get too excited could you, both of you, some of you, lots of you just give it a whirl?
If it seems to be universal we can look at the other stock.
EDIT:
Ahhh...the penny's dropped (told you it had been a long shift) and I believe you're thinking of the sections immediately above the list of transform dependancies and names. This does indeed feature 16 values per transform, just as a .bin matrix. Given that, it should be fairly simple now to either forgo he re-naming and edit the values, or stick with the re-naming and just tweak the values so that the light is on the *right* side.
EDIT 2:
It seems that the re-name/swap of the transforms is needed, otherwise the light faces the wrong way....OK, could be done with matrix manipulation but I like easy
Then it's just swapping the matrix values for the height and offset over, setting the offset to a positive rather than negative value and vica versa.

Much easier than sums!!!
I've tried it in combination with a Kuju Mk1 BG and it seems compatible, both with itself at the rear and the BG.
Code: Select all
<TransformDependency>
<e d:type="sInt32">-1</e>
<e d:type="sInt32">-1</e>
<e d:type="sInt32">-1</e>
<e d:type="sInt32">-1</e>
<e d:type="sInt32">-1</e>
<e d:type="sInt32">55</e>
<e d:type="sInt32">55</e>
<e d:type="sInt32">55</e>
<Truncated>
</TransformDependency>
<TransformName>
<e d:type="cDeltaString">softshade</e>
<e d:type="cDeltaString">decals01</e>
<e d:type="cDeltaString">roofrails</e>
<Truncated>
</TransformName>Further down the .Geo are multiple sections with values for each transform that are more akin to a matrix,
Code: Select all
</Child>
<Centre d:numElements="4" d:elementType="sFloat32" d:precision="string">0.0000000 0.0000000 0.0000000 1.0000000</Centre>
<Radius d:type="sFloat32" d:alt_encoding="0000008047BCEE3F" d:precision="string">0.960483</Radius>
<TransformID d:type="sInt32">79</TransformID>
</cHcSGBoundingSphere>
</Child>
Any way, matrix maths is too hard after a long shift, so I went for the easy approach first...

Just edit this bit in the transform name listing:
Code: Select all
<e d:type="cDeltaString">lights_fwdtail</e>
<e d:type="cDeltaString">lights_revtail</e>
Code: Select all
<e d:type="cDeltaString">lights_revtail</e>
<e d:type="cDeltaString">lights_fwdtail</e>
Before I get too excited could you, both of you, some of you, lots of you just give it a whirl?
If it seems to be universal we can look at the other stock.
EDIT:
Ahhh...the penny's dropped (told you it had been a long shift) and I believe you're thinking of the sections immediately above the list of transform dependancies and names. This does indeed feature 16 values per transform, just as a .bin matrix. Given that, it should be fairly simple now to either forgo he re-naming and edit the values, or stick with the re-naming and just tweak the values so that the light is on the *right* side.
EDIT 2:
It seems that the re-name/swap of the transforms is needed, otherwise the light faces the wrong way....OK, could be done with matrix manipulation but I like easy
Then it's just swapping the matrix values for the height and offset over, setting the offset to a positive rather than negative value and vica versa.

Much easier than sums!!!
I've tried it in combination with a Kuju Mk1 BG and it seems compatible, both with itself at the rear and the BG.
Re: Adding a tail light to rearmost vehicles.
Top work as always Gary, now all we need to do is find out how those clever folk make executable files that can use RW tools to do a find and replace in the Geo and then we're not distributing copyrighted stuff etc etc.
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
- DaveDewhurst
- Very Active Forum Member
- Posts: 1994
- Joined: Wed Nov 28, 2007 10:21 am
- Location: Birkenhead
- Contact:
Re: Adding a tail light to rearmost vehicles.
I have, in the past used a patch program, there are free ones available.
You show it the two files (before the edit and after) it figures out what's changed and makes an exe to do it without having to distribute the copyrighted files
Dave
You show it the two files (before the edit and after) it figures out what's changed and makes an exe to do it without having to distribute the copyrighted files
Dave
-
gptech
- Very Active Forum Member
- Posts: 19585
- Joined: Fri Oct 10, 2008 5:48 pm
- Location: Wakefield, West Yorkshire
Re: Adding a tail light to rearmost vehicles.
Yeah, that's probably a bigger hurdle than stumbling upon a way to do it
I suppose the best way would be to contact AP.
I suppose the best way would be to contact AP.
Re: Adding a tail light to rearmost vehicles.
It has to be said that this is much needed many thanks to the usual suspects who are sorting this for us 
Re: Adding a tail light to rearmost vehicles.
Aww come on, you know me, start off with one job end up doing twenty31160 wrote:It has to be said that this is much needed many thanks to the usual suspects who are sorting this for us
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
Re: Adding a tail light to rearmost vehicles.
Good evening,
While the lights node can't be hidden by scripts as the core game overrides the display of the nodes, it is interesting to note that they can be animated out or their position can be changed by animations.
To do so just create an animation rotating two nodes (lights_revtail and lights fwdtail) by 180 degrees for say 24 frames with the end start keyframe having the same rotation values with your favorite 3d suite. Looking at the Mk1 BFK GeoPcDx it looks like the tail light nodes are not centered to the origin so you'll have to translate them as well from what I can see in the GeoPcDx:
For the lights_fwdtail node: 0.8413574 2.0650878 -10.1435909 (former position of lights_revtail)
For the lights_revtail node: -0.7981251 2.0485723 10.152489 (former position of lights_fwdtail)
Those coordinates are given in the RW coordinate system (Y axis pointing up) so it may require some changes in your 3d software for correct results.
Then export the animation to ia and ban file and add the following entry to the AnimSet section of the wagon blueprint:
And voila, you should have the lights appearing at the correct location.
Cheers,
While the lights node can't be hidden by scripts as the core game overrides the display of the nodes, it is interesting to note that they can be animated out or their position can be changed by animations.
To do so just create an animation rotating two nodes (lights_revtail and lights fwdtail) by 180 degrees for say 24 frames with the end start keyframe having the same rotation values with your favorite 3d suite. Looking at the Mk1 BFK GeoPcDx it looks like the tail light nodes are not centered to the origin so you'll have to translate them as well from what I can see in the GeoPcDx:
For the lights_fwdtail node: 0.8413574 2.0650878 -10.1435909 (former position of lights_revtail)
For the lights_revtail node: -0.7981251 2.0485723 10.152489 (former position of lights_fwdtail)
Those coordinates are given in the RW coordinate system (Y axis pointing up) so it may require some changes in your 3d software for correct results.
Then export the animation to ia and ban file and add the following entry to the AnimSet section of the wagon blueprint:
Code: Select all
<iAnimObjectRenderBlueprint-cAnimation d:id="42424242">
<AnimationID d:type="cDeltaString">lights_fix</AnimationID>
<AnimationName d:type="cDeltaString">Path\To\Exported\Animation\</AnimationName>
<AnimateInEditor d:type="cDeltaString">eTrue</AnimateInEditor>
</iAnimObjectRenderBlueprint-cAnimation>
Cheers,
--
nschichan
nschichan
Re: Adding a tail light to rearmost vehicles.
Very interesting and thanks for the help, I'm particularly interested in this method as it doesn't involve a need to edit the Geo file in anyway, so may avoid other issues arising from that.nschichan wrote:Good evening,
While the lights node can't be hidden by scripts as the core game overrides the display of the nodes, it is interesting to note that they can be animated out or their position can be changed by animations.
To do so just create an animation rotating two nodes (lights_revtail and lights fwdtail) by 180 degrees for say 24 frames with the end start keyframe having the same rotation values with your favorite 3d suite. Looking at the Mk1 BFK GeoPcDx it looks like the tail light nodes are not centered to the origin so you'll have to translate them as well from what I can see in the GeoPcDx:
For the lights_fwdtail node: 0.8413574 2.0650878 -10.1435909 (former position of lights_revtail)
For the lights_revtail node: -0.7981251 2.0485723 10.152489 (former position of lights_fwdtail)
Those coordinates are given in the RW coordinate system (Y axis pointing up) so it may require some changes in your 3d software for correct results.
Then export the animation to ia and ban file and add the following entry to the AnimSet section of the wagon blueprint:
And voila, you should have the lights appearing at the correct location.Code: Select all
<iAnimObjectRenderBlueprint-cAnimation d:id="42424242"> <AnimationID d:type="cDeltaString">lights_fix</AnimationID> <AnimationName d:type="cDeltaString">Path\To\Exported\Animation\</AnimationName> <AnimateInEditor d:type="cDeltaString">eTrue</AnimateInEditor> </iAnimObjectRenderBlueprint-cAnimation>
Cheers,
Say, as with many things at one time, animation is something I haven't messed with in Blender (my preferred 3d package) at all, so it's completely alien to me - and I still don't have any internet in the new house yet for tutorials etc.
I shall watch this space for updates though from the usual protagonists and thenameplate hopefully a set of us will have picked up some new skills!!
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
-
gptech
- Very Active Forum Member
- Posts: 19585
- Joined: Fri Oct 10, 2008 5:48 pm
- Location: Wakefield, West Yorkshire
Re: Adding a tail light to rearmost vehicles.
deltic009 wrote:Very interesting and thanks for the help, I'm particularly interested in this method as it doesn't involve a need to edit the Geo file in anyway
Unless you need to remove the spurious light at the wrong end maybe?
Would a separate animation conflict with any existing 'dynamic' light? Would an animation be 'dynamic'?
Incidentally, does anybody know just how many coaches/which ones have the light 'built in', and was this a DT addition or an AP one?
The idea of an animation is versatile though, could it be extended to add lights to stock that don't have them?--that way you'd just need the single animation (or 2 if you wanted a flashing rear light) and link to it from the .bin
-
gptech
- Very Active Forum Member
- Posts: 19585
- Joined: Fri Oct 10, 2008 5:48 pm
- Location: Wakefield, West Yorkshire
Re: Adding a tail light to rearmost vehicles.
nschichan, (or anybody else with the required talent)
any chance you could knock up some kind of animation so that we can have a play about?---doesn't have to be spot on, just something that will show in-game.
any chance you could knock up some kind of animation so that we can have a play about?---doesn't have to be spot on, just something that will show in-game.
- Carinthia
- Very Active Forum Member
- Posts: 1123
- Joined: Tue Mar 06, 2012 7:07 pm
- Location: at the end of the regulator
Re: Adding a tail light to rearmost vehicles.
A feature of the DT coaches as far as my ownership goes back, so i assume from day one.gptech wrote:deltic009 wrote:Incidentally, does anybody know just how many coaches/which ones have the light 'built in', and was this a DT addition or an AP one?
[cheeky mode]
. . . and when this is done, there are the only partially working headcose discs on the DT Class 40, and the non-working tail lamps on trains after the SSS mod on the Jubilee (they are permanently on the tender).
[/cheeky mode]
John
Re: Adding a tail light to rearmost vehicles.
Harsh but genuine mode - the DT 40 has been nullified by the Railright one, and I don't have the SSS Jubilee add on.Carinthia wrote:A feature of the DT coaches as far as my ownership goes back, so i assume from day one.gptech wrote:deltic009 wrote:Incidentally, does anybody know just how many coaches/which ones have the light 'built in', and was this a DT addition or an AP one?
[cheeky mode]
. . . and when this is done, there are the only partially working headcose discs on the DT Class 40, and the non-working tail lamps on trains after the SSS mod on the Jubilee (they are permanently on the tender).
[/cheeky mode]
John
Matthew Wilson, development team at Vulcan Productions
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/