Freight car step view

Discussion of rolling-stock creation & re-painting.

Freight car step view

Unread postby Kali » Sun Apr 29, 2012 10:46 pm

Someone asked about making passenger views for boxcars & so on, standing on the steps; well, it works & it's easy.

http://www.youtube.com/watch?v=foiGBcpug6g

It was only a few steps to do:
  • Open the wagon BP: in this case one of Michael's 40ft PS1 cars
  • Find the GeometryID line from the <RenderComponent> section, and copy the path to the shape file from there.
  • Go down a bit to the CarriageInteriorInterface section, and paste the path you just copied into the InteriorGeometryID line. That's the shape for the passenger view done.
  • Now you need a camera; I just copied a cab camera from somewhere, it doesn't matter where.
  • Go up to the top of the wagon blueprint & make a note of how far away from the middle of the wagon one of the couplers is; this is the second-last line in the pivot matrix. The ladders and steps on Michael's car are half a metre or so inwards from the coupler - you don't really want to go back much further than that anyway, because you won't be able to see the coupler then. Use that number as the Z entry for the cameraOffset, and negative of that number for the WindowCameraOffset section.
  • US freightcars are a little under 4m wide, maybe 3.8m.I ended up using 1.95 as the X offset for each camera ( negative for the window one again ) which put my head in a position where I'm hanging off the car a bit.
  • I put my head at a 2.7m above ground, which seems reasonable for someone standing on a step.
  • Don't ask me about setting camera directions up, I just put semi-random numbers in until they looked ok... that part is a little confusing, the direction appears to be in metres. Um?
  • Make sure you have enough directional freedom, you're moving your head around and you can twist your body. I currently have 1 for vertical and 2.6 for horizontal.
  • Save the camera somewhere ( the wagon folder seems sensible! ), and go back to the wagon blueprint. Just below the InteriorGeometryID line is the InteriorCamera section; you will need to set that up like you would for a child object, pointing to the camera you just saved.
  • Lastly; any child objects which are visible on the exterior of the car must be edited to be visible internally too ( because despite you being outside of the car, it is an internal view ).

That's it.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Freight car step view

Unread postby PapaXpress » Sun Apr 29, 2012 10:58 pm

Kali wrote:Lastly; any child objects which are visible on the exterior of the car must be edited to be visible internally too ( because despite you being outside of the car, it is an internal view )


This last item intrigues me. I have been struggling to get child object to be seen from a cab view, but you intimate with this last point that its possible. Is this the same thing as you are talking about? If so, how would I do it?
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Freight car step view

Unread postby Kali » Sun Apr 29, 2012 11:39 pm

In the child blueprint,

View type -> internal view for cab/other internal view only objects.
View type -> All views for something that has to show up everywhere ( fairly obviously! ).

If you don't have the blueprint source, that's <ViewType> and either InternalView or AllViews.

This has a child object in a cab, it's no different to having it outside, the worst part is positioning it - there's no free movement internal camera - but if you have the model source, that's not a problem.

http://www.youtube.com/watch?v=ghAA_v6-nys
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Freight car step view

Unread postby Chacal » Mon Apr 30, 2012 1:12 am

Great! Thanks Kali.
I wonder what happens if you have two such cars in the consist?
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6509
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Freight car step view

Unread postby Samwolf » Mon Apr 30, 2012 7:02 am

Now this is a mod I'll be willing to pay good money for. **!!bow!!**

Maybe this view could be linked to / substituted for the Coupling view.
If God had intended for man to fly, He wouldn't have given us the railroads.
User avatar
Samwolf
 
Posts: 762
Joined: Mon Aug 30, 2010 6:57 pm
Location: South Carolina, CSA

Re: Freight car step view

Unread postby Kali » Mon Apr 30, 2012 8:19 am

Chacal wrote:Great! Thanks Kali.
I wonder what happens if you have two such cars in the consist?


You can jump between them with ... now I forget the keypress. I think it's something to do with left/right arrows.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Freight car step view

Unread postby dogmouse » Mon Apr 30, 2012 8:39 am

Excellent post, Kali! Thanks for the tip!

p.s. i think it is Ctrl+Left/Right arrows to step through the units.
User avatar
dogmouse
 
Posts: 322
Joined: Tue Jun 22, 2010 6:21 pm
Location: USA

Re: Freight car step view

Unread postby _o_OOOO_oo-Kanawha » Tue May 01, 2012 9:21 am

Yes, Kali, many thanks for this. Great thinking and a clever solution to something I've wanted for some time.

But how does one implement this in an install that has hundreds of different cars?
Hacking loco bin files is one thing, but I am no exactly looking forwards to hacking hundreds of cars, even though the actual code te be added might be almost the same everytime.

Will it be feasible to have RW_Tools do the job for us? Then it has to be a fool or even idiot-proof solution.
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: Freight car step view

Unread postby PapaXpress » Tue May 01, 2012 9:35 am

Kali wrote:In the child blueprint,

View type -> internal view for cab/other internal view only objects.
View type -> All views for something that has to show up everywhere ( fairly obviously! ).

If you don't have the blueprint source, that's <ViewType> and either InternalView or AllViews.

This has a child object in a cab, it's no different to having it outside, the worst part is positioning it - there's no free movement internal camera - but if you have the model source, that's not a problem.

http://www.youtube.com/watch?v=ghAA_v6-nys


Kali, you have just blown the doors off the dungeon I have been living in.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Freight car step view

Unread postby Kali » Tue May 01, 2012 10:52 am

_o_OOOO_oo-Kanawha wrote:Yes, Kali, many thanks for this. Great thinking and a clever solution to something I've wanted for some time.

But how does one implement this in an install that has hundreds of different cars?
Hacking loco bin files is one thing, but I am no exactly looking forwards to hacking hundreds of cars, even though the actual code te be added might be almost the same everytime.

Will it be feasible to have RW_Tools do the job for us? Then it has to be a fool or even idiot-proof solution.


If you manually make a camera for each type first, yes. The problem is that not all freight cars will have the camera viewpoint in the same place ( if you used my camera from that video on a 60ft car, you'd be just staring at the body ), so you have to sort out a camera for each type. Applying it to all your reskins of the same car should be perfectly simple to automate though, making the camera takes 95% of the time and effort.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Freight car step view

Unread postby _o_OOOO_oo-Kanawha » Tue May 01, 2012 1:02 pm

Part of the problem are all the absolute file references in the bins.
I can live with setting up an external view for the default car of each type or rather length, but all the repaints as well? I did open an few geopcdx files for study purposes, they are serialized by that same serz.exe after all. In those shape files, there are many relative paths, i.e. ../.. etc. Would these relative paths also work in bin files so one can collect all the repaints in one folder instead of many? On second thought that is no good for future updates. Better stick to the default/prescribed locations and add a Cabview (sic!) subfolder like with the engines and put the required files in there.

Has the question of muliple cabview-cars been answered? I suppose they behave the same as with engines, you jump back and fro with CTRL + "-" or CTRL + "=" but sometimes have to pass by all the cars in turn.

Will it degrade from performance, or are the step views only rendered when invoked?
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: Freight car step view

Unread postby Kali » Tue May 01, 2012 4:42 pm

A passenger view is three things at best; a shape file, a camera, and a sound occlusion file. The sound file is irrelevant here because we're outside, so we're left with the camera - which can go anywhere, there's only one per type of car - and the shape file, which is exactly the same shape file as the external view. Literally. You're thinking too hard about it :)

To automate it you'd find the external geometry ID line in the blueprint, and copy it to the passenger view geometry ID line in the same blueprint, and then add the path to the common camera. That's it.

Read the thread, the question of changing view was answered. The view is only loaded when the camera is invoked ( like a cab ), so no performance hit. Better than a cab, even, as there's no extra model or textures to load.
Kali
 
Posts: 1600
Joined: Mon Mar 14, 2011 1:00 am
Location: England-by-Sea

Re: Freight car step view

Unread postby OldProf » Tue May 01, 2012 4:48 pm

So, if I understand this correctly, the view that Kali has come up with would provide the brakeman's view from the last car of a train? That sounds great! Looks like you've got a lot of work to do, Kali. I can read your instructions easily enough, but executing them is almost certainly beyond me.

Respectfully (and how!)
Tom Pallen (Old Prof)

{Win 10 Home 64-bit; Intel Core i7 6700 @ 3.40GHz; 16.0GB Single-Channel @ 1063 MHz (15-15-15-364); 2047MB NVIDIA GeForce GTX 960}
User avatar
OldProf
 
Posts: 2743
Joined: Wed Sep 09, 2009 10:09 am

Re: Freight car step view

Unread postby Chacal » Sat Jul 28, 2012 3:20 pm

Another solution might be to change the default coordinates of the rotation point for the camera in "2" and "3" views. Putting the rotation points one car length in front of the loco, or to the back of the last car, instead of at the center of the loco or last car, would possibly achieve the same result without interfering with the current functionality.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6509
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 1 guest