While setting up an RVV for my GWR steam locomotive I have run into a problem with Collision boxes and VHID's. Initially I used a child of a DTG RVV with my own skeletal meshes substituted. When I replaced the DTG Cab with my own the loco was surrounded by enormous boxes which turned out to be the VHID for the Controls. These boxes dwarfed the entire locomotive. I encountered a similar problem when I tried to add my own collision boxes to the Exterior skeletal mesh and it's related to the Blender (metres) Unreal (cm) problem. In the end I had to import a tiny version of the loco as a static mesh (0.01 scale) , build collision boxes on that, and then use the "copy static mesh" option in the Physics Asset. I have scaled the VHID's in the child RVV and that seems to work OK although the cab controls don't work because the inherited VHID's can't be reallocated to my skeleton. I also tired a basic RVV (no VHID's yet) made from scratch and found that when the scenario begins I spawn above the loco and fall right through it and on down through the track and into the abyss. I guess this is again because of missing collisions. There are some SM collisions in the child RVV. As far as I can see the DTG skeletal meshes don't have attached Physics Assets.
I think I have discovered how the collisions are added in the DTG RVV. There is a Static Mesh at the origin named 4F engine collision. In the editor it appears as a simple grey cube but when "show collision" is turned on there are 65 or so primitive shapes giving collision volumes for the entire engine and cab, including boxes for cab equipment such as the Reverser. Apparently in Unreal you can copy collision shapes from a complex Static Mesh to a simpler one such as the cube. Apologies if everybody already knew about this but it was news to me.
Good catch! the static mesh component shouldn't need to be a box so long as you assign your custom collision to it, as it's not rendered in-game. I might even try it with a Blender monkey! I've been wracking my brain trying to work out why my subway cars won't spawn in close to themselves, Even in a two-car formation with matching couplers. But they both spawn in, so that's something. Heck, maybe it's the missing collision! Also, I stumbled across an "ISRail Vehicle Interface" that you can add, under your blueprint's class settings, at the top. Not sure what the "IS" part means, or if it's for the RVM, RVV or what. May even be meant for internal use, but it looks like it adds some interesting functionality, though:
Sadly I'm no further forwards. I have added a SM Collision to my RVV and I still fall through the locomotive and on to the centre of the earth. I have used both my own custom collision cube and the DTG Fowler 4F one (which works in the Child RVV) but the result is the same in both cases. If I use a child RVV from the 4F I spawn in the cab OK. Although my RVV doesn't have all the VHID's yet I have faithfully copied every details of each component from the child RVV (which works) to the scratch built RVV (which doesn't). I made my RVV from the Blueprint Class RVV Generic. I'm concerned that I can't seem to create my own RVV and perhaps never will be able to. The child RVV works fine but I can't change the VHID's parent socket (to bones in my skeleton) so I'm not able to operate / animate the controls in the cab.I must admit this is discouraging. Are you using a child RVV or starting from scratch and if so what Blueprint Class are you using as a base ?.
I'm starting from scratch using the "TS2Prototype.RailVehicleView" Class for my RVV. For what it's worth, I haven't got collision working either. Upon reflection, I think I may have spotted a place for referencing the rail vehicle's collision somewhere really counterintuitive, like in the Simulation Asset or something, but it was right at the end of a late night and I didn't take as much notice of it as I should have. Haven't found it again, but I'll probably spend a good chunk of Labour Day looking for it. Fittingly, I should be back at my day job by the end of the week, if my finger has healed sufficiently. At least I've been able to make some progress in the meantime! EDIT: It's not actually in the SA though, that would be too easy.
Okay, so I did this in the SM editor to my big-collision SM: and , then this to my small cube SM (to get the collisions in): , Next I made sure to select rail vehicle collision in the SM Editor (this may have been the important bit, IDK yet): , recompiled my RVV, and now I have collision! Looks like we can non-destructively add primitive collision volumes by-the-numbers in the SM editor, too! (although for some reason, mine's using complex collisions. That at least should be easy to sort out.) Enjoy the rest of your Labour Day! [EDIT: Made a few small corrections to my post to avoid ambiguity]
Thanks for your help. Your explanation is what I did except for setting the collision preset to Rail Vehicle. Good news is I've now got the RVV working and I can spawn in the cab with my RVV and my RVM !! (not children). I started the RVV again from base and copied Driver Seat, Fireman's Seat, Driver's Camera, Fireman's Camera, and 4F SM collision exactly from the working child - including the seat locations and the unique identifiers (GUID). When I loaded it in my RVD that worked ! I can't do anything in the cab of course but I can now start adding the VHID's one by one and try to get them working. My current target is to get a window opening with the VHID as the Windows don't interact with the Simugraph so should be easier. Also I can try substituting my Collision cube for the 4F one and refine it as necessary. Thanks again for your help - sorry for the downbeat tone of my previous post.
Thanks for your message and the other message on my GWR loco thread. Apologies for delay in responding but I have been very busy working on the RVV, RVM and Simugraph for the loco. I don't have Discord but I think "The Shotte" sent me an invitation link some time ago. Do you think I could be of help to contributors there or that it would be of benefit to me as (not living in the 21st century) I tend to minimise my "online presence". Thanks again for your encouragement.
I have managed to attach a VHID to the drivers window and can now open and close although I haven't got fully involved with the Animation Blueprint side of things and at the moment the window opens with a smooth animation but slams shut again. As well as the Window I have done three other VHID's and of those the Rear Sanding lever (set up as simple lever in the RVM) is working but with the Cylinder Drain Cocks and the Regulator I simply can't find the tooltip when I move the mouse around near them. Good news is that the Regulator Reverser and Combination Brake work with the keyboard commands (no animations) but, of course, they don't affect the loco because I haven't got them linked to drive the Simugraph. As far as I can tell the game is using my Simulation Asset (set in the RVM) and play in editor is working OK without crashing. The HUD is showing correct boiler pressure (200psi) but the brake pressures and regulator/ reverser settings are all wrong. Today I have been getting the Pressure Gauge to read the boiler pressure using a variable in the ABP and it works fine with a default pressure value. When I try to get the "actual" pressure from the Simugraph the gauge reads "0" and I get repeated error messages "failed to get invalid Simulation parameter". I think the next job is to start setting up the "Make Simulation Node Parameter" and "Set Simulation Node Parameter" in the RVM in the hope I can get some of these things working but I should probably complete adding all the controls (Irregular levers etc.) to the RVM first. As always progress is very slow.
Hiya, great to see more progress. Discord is definitely the place to be if you ever got took on as a developer. I have a bit of a proposal I want to run past you but not in a public space in case it’s something we do end up making! If not discord do you have an email I can contact you on?
Thanks for you reply. I'm really not happy about giving out my email address in a public space and I try to avoid getting involved in private messaging. Sorry to disappoint you.
Right. I’m trying to offer you a way to get content into the game. Was trying not to say it “in the public space”. I’m working on a project and hoped to get you involved. Never mind
Thanks for you reply. I fully understand what you were trying to say and I'm sorry if I appeared to be ungracious. Unfortunately I'm not really the person you are looking for as I only pursue this as a hobby and, having been retired for the past 15 years, I am not really seeking a collaboration project , which is why I've never pursued the suggestion of becoming a DTG third party partner. Once again sorry to disappoint you and thank you for your offer.
I have reached a significant turning point in my efforts to get my GWR loco working. I have finally manged to get my "prototype" Simugraph working in Play in Editor mode and the wheels on my loco now animate correctly with a blank animation blueprint. Currently I can't control the loco from the cab but it runs OK in an AI (computer controlled) scenario. The most important thing is that I can load a scenario (without crashing the editor) and experiment with the Simugraph settings. If I change something that causes a crash then I will know where to look to put it right. I have also learned two other things : 1. The RVA (Rail Vehicle Audio) file. The is called for in the RVD (as additional view content) and, up to now, I have been using the DTG 4F version. This file is linked to certain parameters in the Simugraph so that the "Chuff - chuff" noises speed up as the loco moves and so on but as I am now using my own Simugraph the DTG one no longer provides chuffing sounds so I guess I will have to make my own. I tried deleting it altogether and then the loco vanished (although the scenario still started so I suspect the RVM was still there but the RVV had gone.) This seems to be another essential file to add to the RVV-RVM_SA trilogy. 2. Animation Blueprint. The animation blueprint (which is linked to a specific skeleton) handles the wheel movements without any additional set up as it will detect any wheels and axles in the skeleton, and allow them to be linked to the Axles in the Simugraph. However the animation blueprint takes control of the whole mesh and moves things around to match the Simugraph. With animation turned on the wheels of my loco now rotate in the correct positions but the boiler, cab and main frames all move upwards so the loco appears to be on stilts. I think there is some error in my Blender model (bones moved out of place or parenting error ?) or I forgot to allocate the static parts to a bone as in Unreal every vertex of the mesh has to be assigned to a bone. Still lots to do but for the first time in many months I have managed to get the loco wheels moving in a Play in Editor scenario, thanks to having got the Simugraph to load. This means that I should now be able to build other steam locos with any chosen wheel arrangement and I am already planning a return to my "first love" the GWR Auto Tank Engine (Class 48xx/ 14xx) once the pannier is finished. There are lots of common parts and I have learned a lot about Blender and TSW Editor while working on the class 57XX so hopefully it wouldn't take as long. How about a 48xx with a working (driveable) Auto Coach attached ?. (As Victory Works provided for Train Simulator Classic) ? Also, if I'm not able to set up my Simugraph to drive the loco I've already got the pannier working under AI control so could use it as "background traffic" to populate a route. Taking a short break from the forum but I will post another update once I have any more progress to report.
Brief update on progress. 2 Steps Forward I solved the stilts problem by the simple method of setting the z offset of the RVV to a negative value until the wheels came into line. I notice the spawn box which appears on the track when you set the scenario in play in editor mode is below the track with my RVM but on the track with a DTG model. I guess the origin of the RVM is wrong. I can now get my control inputs into the Simugraph parameters and have discovered the Simugraph debugging tool which lets you run the scenario and monitors parameters which you set to watch in real time. 2 Steps back Although the wheels are now animating correctly I have been unable to get the coupling rod to stay horizontal. Its bone is located at the crankpin position of the centre wheel and the two "loose" ends simply rotate around that axis so they come up through the cab floor and dig into the ground. Some of the recommended Unreal tools to correct this don't seem to work in the editor. When I start a scenario in-cab (as the driver) the loco rocks backward and forward for a few seconds until it settles and when I put it in forward gear and open the throttle it doesn't move. The controls settings look OK in the Simugraph debugging tool but there is no steam pressure in the boiler. When I try monitoring the computer controlled scenario the loco works OK and the boiler pressure is there.(The controls don't change so I guess the computer is overriding parts of the Simugraph.) This may be related to the Preset Configuration settings in the Simugraph. I've decided to complete the RVM and the RVV before experimenting further. Both of these problems are specific to a steam loco so may not be relevant to others working on other types of loco.
My RVM spawn box is still halfway in the ground as well. I adjusted my z position of the skeletal mesh component inside the RVV rather than the RVV itself, but otherwise my solution was the same. I wonder what it is we've set up incorrectly? I've been doing more modeling, instead of anything as ambitious as setting up controls, but I may try to get some of the VHID seats set up this weekend, as those should be an easier one, with no parameters to pass anywhere as far as I know. That Simugraph debugging Tool sounds useful. Is it easy to use? I'll probably find out for myself once I have more to, well, debug. Wish I could give advice on the coupler, but I haven't got coupling working at all yet Please do keep us posted, as problems we experience with other locos could easily be related to solutions you find for yours. And of course, best of luck, and have a good weekend!
Thanks for your encouragement as always. The debugging tool is in the Window menu at the top of the Simugraph page as shown here When you click on it it opens a separate window with a Play icon at the top. When you select this it will launch your current PIE scenario and run minimised while the scenario is running in main screen. If you click the right mouse button (to escape mouse view) you can move the mouse to the bottom screen toolbar and open the debugging tool. It will then display the Simugraph with values for any Node where you have marked the parameters as "watch" as shown below Pressing Escape will exit the scenario as usual. In the photo you will see the Regulator (throttle) is reading 0.76 (which I set by moving the cab lever) cut off is 1.0 (Full Forward) but Boiler Pressure is only 15.17 PSI (should be 200) so I guess that's why I'm not going anywhere. Looks like I'm the guy who turns up at three in the morning to get the fire going !