Tuesday, October 30, 2012

3DC to Railworks - Locomotive: Blueprinting Part 4

3DC to Railworks - Locomotive: Blueprinting Part 4
by Jerry "SMMDigital" Conaway


< PreviousIndexNext >


506. Once we are finished making our Spot and Point lights, we need to start listing them as Child Elements. Now we are ready to begin previewing the locomotive in the Asset Editor, so go back through your Locomotive Blueprint before this step and make sure everything is what it is supposed to be.

In your locomotive blueprint, create a field in the Children sub-area and name it "Fwd_Headlight_01". It is important that you name this correctly so that the game engine will know which headlight to display. Fill out your Provider and Product fields and give the proper pathname to the Headlight blueprint we created.

507. If you are feeling like everything is in line and good-to-go, then save your Blueprint and Preview it. Wait for the Compiler to finish creating your locomotive in the Preview folder. When it is finished, minimize the Blueprint window and take a look at your locomotive. Here, I have it in night mode so you can see all the glowy parts.


508. You will notice that your headlight is nowhere to be found. From the bottom pull-out window, click on the "Fwd_Headlight_01" selection, and you will see a movement gizmo appear on screen. Pull on either of the arrows to move your headlight into the proper position on the locomotive.

509. Follow the same procedure to get the rear headlight on the locomotive. The name for it in the Children Field will be "Bwd_Headlight_01".



510. There are four individual point lights that make up the ditch lights. They all get the point light that we made earlier and are placed in the same manner as the main headlights. These are representative of simple light glow, that in my opinion, aren't necessary, but we will put them in anyway.


511. The actual projecting lights for the ditch lights are four smaller point lights that are put into the blueprint as shown and then positioned in the Asset Editor.


WARNING: I had a problem with my headlights that you may experience with your model. After I placed the projected headlights as shown in this tutorial, in the game they seemed to be wired backwards. When I turned on the front headlights, the non-projectors came on, but the rear projectors lit up. When I turned on the rear headlights, the non-projectors came on and the front projectors lit up. I thought for a moment that I had made my locomotive backwards, but then realized that the all of the locomotive controls and couplers are correct - when you push the Reverser to forward, it goes forward.

If you experience this issue, you can either reposition your projectors opposite of what is shown in the tutorial - front headlights in back, rear headlights in front. Or, after you export the locomotive, you can edit the .BIN file with RW_Tools and simply rename the "Fwd" headlights to "Bwd" and the "Bwd" to "Fwd". It was a very simple fix, but still puzzling.

512. To create the projected cab light, we first need to go into our "Default / Lights" folder and create a new Point Light blueprint. I gave my the name of "PointCabLight". I used one of the shapes that we already had made up for use with the ditch-lights. Because this light will be in the interior of the locomotive, I gave it a one meter radius and made it the color of an incandescent bulb.

513. Back in the Locomotive Blueprint, we reference the light blueprint that to make our Cab Light in the Children section. Place the Provider, Product, and reference to our light blueprint in the appropriate fields.

514. And, in the final section of the locomotive blueprint, if you have not already done so to export your locomotive, you need to fill in the Engine Simulation script and Cargo blueprint. This adds fuel and oil to your locomotive. I'm assuming that what you put in here also affects the physics handling of your unit.

515. For your basic, run of the mill diesel locomotive, this finishes out the Locomotive Blueprint, but we are not quite done yet. If everything is in place as you desire it, save the blueprint, then click on the Preview button. Wait for the Compiler to finish, then click the minimize button in the corner of the Blueprint Editor.

516. You will need to place the Cab Light inside the cab, and I would suggest that you place the light just above where the driver would normally be. There is one more step that needs to be completed, concerning scripting, to make this light work. We will deal with that shortly.

If you are finished tweaking the Headlights, the only thing left to do is place the couplers. Open the panel in the lower left corner and pin it open. You will see couplers somewhere in the list. Click on the Front Coupler Pivot in the list to make it active, then move the arrow around until it is in it's desired position. This is a very imprecise way to do this, and I wish RSC would recode the Asset Editor so that the actual couplers would show up for placement. However, we can make fine adjustments to the Blueprint after the locomotive is exported, using RW_Tools.

517. Place the arrow for the Receiving Point somewhere near the coupling point.

518. Do the same for the rear coupling pivot and receiving point.


519. Click on the Driver Position listing and move the gizmo until he is correctly seated. If you have a representative for the Conductor, position that arrow as well.

520. The Blueprint Editor should be minimized in the lower left corner of your screen. When you are finished making changes to in the Preview Screen, maximize the Blueprint Editor and click on the Save button to lock any changes you just made in place. Then, if everything is to your satisfaction, click on the Export button to put your locomotive in the game.

NOTE: The "Export" button will export the Locomotive Blueprint and ALL of the blueprints that are children or otherwise associated with the LBP. If you have already exported this, and have used RW_Tools to make changes to other blueprints, such as the Audio Controller, this will wipe out all of those changes. If you want to export ONLY the Locomotive Blueprint or whatever blueprint you are working on, use the "Export This" button instead.

521. All of this work, and we are still not quite there yet. Close your Asset Editor and fire up your copy of RW_Tools. If you have aliased sounds from the default KUJU locomotives, then you need to navigate to where your Audio Controllers are located in your locomotive Asset folder, open the PROXYBIN files, and place the references to those sounds in your AC's. Simply open a copy of PROXYXML file of the locomotive AC you are copying from and cut and paste those references. Do this for both your Engine and your Cab sound files.

When you are finished, be sure to drag and drop your locomotive's PROXYBIN files onto the SERZ.EXE application in the Railworks folder to convert them to PROXYXML. Your locomotive sound will not work without both files.

522. Now using RW_Tools, open your Locomotive Blueprint (now called a BIN file) in your Asset folder. You will also need to open Railworks and place your locomotive in a Scenario for inspection. As I suspected, my front coupler isn't where it should be. In RW_Tools, navigate down to the section that contains the Front and Rear Coupling pivots.


523. The height and Z-axis (lengthwise) values (highlighted) for my rear coupler are pretty much right on, so I'm going to copy those values for my front coupler.


That's much better!

524. Next are the Receiving points for the couplers. Again, the next to the last two values are height and length axis for the coupler. If your locomotive is coupling OK, I wouldn't worry about changing the values, but here I have my receiving points almost dead on top of the coupler pivots.

In the game, my locomotive was having trouble coupling, so adjusting the Pivot and Receiving values here was the only way to figure out the problem. You will have to make an adjustment, then open the scenario you have placed your locomotive in and check to see what the result is. If it still doesn't work, you will have to exit the scenario and make further adjustments.

525. You can also adjust your front and back pivots on your locomotive to put increase or decrease the distance between your locomotive and whatever it is coupling to.


526. The next two fields we are going to change are the Bogie and Coupling Audio control fields. They are going to be aliased, so we could not place them in the Blueprint Editor for export. Here, I copied and pasted the values from the ES44. However, like the particle effects, these are supplied generally by Kuju and are not specific to any one locomotive, so many of them use these files.

527. Now we can skip down to our Children values, specifically our Exhaust. We need to put the reference in that will give us access to the particles in the Kuju\Railsimulator\Particles folder. I chose a smokestack for this unit because they are notorious for putting out smoke that would put a Steam locomotive to shame. Just as we did with the coupler Pivots and Receiving, you can adjust the height and length of your smoke by changing the 15th and 16th values in the matrix field.


528. Finally, we can enter our driver character for our locomotive.

And with the addition of the driver, primary blueprinting is complete. I STRONGLY suggest that you back up the Locomotive Blueprint file, just in case you have to do more to it in the Blueprint Editor and re-export your locomotive. Any changes you make there will erase all of the Aliasing and changes you have done here. However, at this point, you should only be making changes to this Blueprint using RW_Tools.

There is still much to do, as the locomotive needs to be tested and tweaked here and there. There is also some advanced stuff that this tutorial will not cover at this time, but may revisit in the future. But for now, it's time to put the locomotive in the game and get it ready for Beta Testing.


< PreviousIndexNext >


Published with permission from Jerry Conaway, 2012

No comments:

Post a Comment