Thursday, February 23, 2012

How to Create LightingBalls and LightingBallControllers: Step by Step Tutorial

Go back to main tutorial page


The starting point for the tutorial is as such:

A) You have already downloaded and extracted to your game's data folder version  1.1 (or newer) of the Just In Time Lighting lighting scripts.

B) You have already opened a cell, and are looking at the area in the render window where you'd like to create your LightingBalls and LightingBallController.

C) (Optional but recommended) You have "Statics" excluded from Render Window Picking Preferences in the Edit pulldown.

My screen at this point.






















This may seem like a lot of steps, but that's only because I've broken it down Barney style for you.  Also, once you've created a group of objects, it's simple to copy and paste them around.


1) In the Object Window, go to World Objects > Activators.

2) Create a new Activator, and in the ID field type in: LightingBall

3) Choose its color.  I prefer blue.



4) Click on the OK button.

5) Type the word "lighting" into the filter box in the Object Window, and right-click on the new LightingBall base object in that window.  Then select Edit.

6) Click on the Add button in the Scripts section, then find and select LightingBall from the list of scripts.

7) Click on OK to select the script, and then OK again to close the Activator window.

8)  Repeat steps 2 through 7, except this time for the LightingBallController.  I will use yellow for their color.

9) Click on the "Create Trigger Button".









10) In the Select Form window that pops up, go ahead and type the word "lighting" into the filter box.




11) We'll make a LightingBallController first, so select that and click OK, and then hit shift+F to center the new LightingBallController in your Render window.

12) the Cell View window, go type "lighting" into the filter box.  Right-click the LightingBallController in this same window, and then select and Edit.

13) Click on the Primitive Tab, and edit the Reference Editor ID and Bounds data so that it looks like this:



14) Click OK, and position it somewhere that makes it easy to work with.


15) With LightingBallController still selected, go ahead and repeat steps 9 through 12, except this time for a LightingBall.  Don't worry, I'll wait.

16) Click on the Primitive Tab, and edit the  Reference Editor IDPrimitive Type, and Bounds data so that it looks like this:


17) Click OK, and it should already be positioned directly in the center of LightingBallControllerA.

18) With LightingBallA1 still selected, hit ctrl-D to duplicate it.  Now edit its RefID to be LightingBallA2, and click OK.

19) Say NO to the "Create new Form?" question... and YES, you're sure.

20) Go to Edit > Preferences, and set your Arrow speed to a sane value like so:



21) With LightingBallA2 still selected, go ahead use the arrow keys to move one of the balls so it starts looking like the picture below.

22) Do the same with LightingBallA1, except this time in the opposite direction.  It should look something like this when you're done:



Does it  need to be perfect?  No, definitely not.  But I'm not going to half-ass it in a tutorial... so to get it perfect, we'll open up both Edit windows for the balls at the same time and line them up by copy and pasting.



I would definitely at least put the balls on the same position on the z-axis (except for stairs, which probably should get their own tutorial section), and at least attempt to have each ball kinda the same distance from the edges of the controller's box.  At least try to make the line drawn between the 2 balls cut the controller to look like it at least might form a right angle.

As you approach perfection, the shorter the minimum controller width needs to be.

If you'd like to know more about this, click here.

23)  Open the Edit window for LightingBallControllerA, and click the little right arrow button a bunch of times until you see the Script tab.




24) Click on Edit Properties (or just hit the Properties button).  Then select ball_1.


25)  Click on the Edit Value button to the right, and then click on the Pick Reference in Render Window button.  Select LightingBallA1, and then repeat the process for ball_2 and selecting LightingBallA2.  No, it doesn't really matter if the names don't match.  However, that would drive me nuts.



You're done!  Kinda.  You have rigged 2 balls to your controller, but you'll still need to rig at least one light to each ball (You can have one ball not control any lights by setting its specialCaseNoDisables and specialCaseNoEnables boolean properties to True).

The process of rigging lights to the balls is the same as rigging the balls to the controller, so I think you got it from here.

To move the whole group around, you just select them all by holding down the ctrl key and clicking them (preferably in the Cell View window).

Remember, CTRL-D duplicates your selection, and it works even when you have multiple objects selected.

Copy and Paste works, too, of course.


Go back to main tutorial page

No comments:

Post a Comment