Creating a Stadium with RailClone

Having created a seating style in the previous tutorial it's time to add a crowd. This video explores the many randomisation controls available in a RailClone style to help create varied audiences, with flags!

Note that to maintain compatibility with RailClone lite, this example uses only two audience models, RailClone Pro users can use an unlimited number of audience members making repetition harder to detect.

If you've completed the previous tutorials, you can continue with your scene. If you'd rather start with this tutorial, you can download the current scene files from   here or from the links on the left hand side of this page.

 To create the audience.

Audience-audience-style.png

  1. Create a new RailClone object in any viewport, rename it "RC_audience" and open the style editor.
  2. Add a new L1S generator and a Spline object. For testing purpose we'll use the spline called "Spline_small_temp" from the scene. This is a short spline used to build the style and maintain fast interactivity, once finished we can swap this for the correct spline from the scene.
  3. Add two new Segment objects and assign the two characters models from the scene to them.
  4. Add a Randomise operator and connect the two segments, wire this to the Evenly and Start input.
  5. To align the segments correctly, change Settings>Default>Alignment Y and Z to Pivot.
    Audience-align.png
  6. To ensure that the spacing matches the chairs, change the X Alignment setting to Left.
  7. Change the generator's Properties>Rules>Evenly>Distance value to 0.43m to match the value set for the chairs.
    Audience-evenly.png
  8. To prevent segments pushing each other out of alignment, change their Properties>General>Padding>Right value to -1.0m.
  9. Finally to position each person, adjust the Properties>Transform>X value so that they sit roughly in the middle of a seat.

Adding empty seats

By adding a segment with no geometry assigned to the randomise node, we are able to introduce occasional empty seats.

  1. Create a Segment node.
  2. Connect to a new input on the Randomize operator.
  3. Control the chance of an empty seat appearing by selecting the Randomize node and controlling each segment's Presence. There is no need to ensure the values add up to 100%, this is normalised automatically.
    Audience-presence.png

Randomising materials.

Audience-audience.png

We now have an audience randomly selected from two source models, to add further variety it is possible to use the same techniques explored in the second part of this series - creating the billboard adverts - to randomly assign material IDs. There are 10 different character textures in a mult/sub object material for this style. To use them:

  1. Assign the "Audience" material to the RailClone object.
  2. Add a new material operator to the style and connect the randomise output to its input. Now wire the material node to the Start and Evenly inputs on the generator.
  3. From the Material node's properties, change the From value to 10.
    Audience-material.png

Controlling by a spline's material ID

Finally, to ensure that the audience only appears on the splines with and ID of 1, turn on the generator's Properties>Limits>Material ID parameter and leave it at the default settings. (See the Drop Kerb tutorial for more details of this technique).

Audience-matID.png

Adding flags

Audience-flagstyle.png

Even with effectively randomised geometry and materials, avoiding visible repetition completely is very difficult. We'll add some flags to help break up the repeating patterns of the audience.

  1. Create a new RailClone object and rename it "RC_flags".
  2. Create a new L1S Array and a spline object. Assign "Spline_Small_Temp" to the spline node and wire it to the spline input of the generator.
  3. Change the generator's Evenly Distance to 0.43m to match the audience and the chairs. Turn off Justify.
  4. Turn on Limits>Material ID as described above.
  5. Create a new Segment object and assign one of the 3 flags from the scene.
  6. Create a new Randomise operator and connect the segment to the first input. Connect the randomise node to the generator's Evenly input.
  7. Change the Properties>Alignment> X Y Z values to Pivot and change the Padding Right value to -4m to prevent adjacent segments from interrupting the regular spacing.
    Audience-align2.png
  8. Now use the Properties>Transform>Translation> X Y Z values to position the flag approximately in the audiences' hands. These models have not been designed to hold flags, so an estimate of what will look correct is fine. X: 0.1m, y:-0.5m, Z:0.5m is a good starting point.
    Audience-translate.png
  9. To randomise the rotation of the flags, go to Properties>Transform>Random and turn on Rotation. Set the values as follows: X Min: -15, X Max: 15; Y Min: 0, Y Max:30; Z Min: -180, Z Max:180.
    Audience-randomrot.png
  10. Now we have one segment set up, we can reuse it for the other two flags. Right click on the Segment and click Copy, the right click and select Paste twice to create two more segments.
  11. Assign the two remaining flags in the scene to the new segments and connect them to the Randomize operator.
  12. We now have a flag on every seat, to thin them out add a new empty Segment wired to the Randomize node.
  13. Go to the Randomize node's properties and set the empty segment's presence to 2000%.

Applying the new styles to the stadium.

Audience-crowdwithflags-1024x576.jpg

In the steps above a short spline was used to help visualise the styles for easier creation. Now that they are complete it's time to apply them to the correct splines in the stadium

  1. For each RailClone object, go to the Base Objects rollout and reassign the existing path to "Spline_Chairs".
  2. If you get an error message reporting the maximum number of segments has been reached, go the Display rollout and increase the Segments value. 60,000 should be adequate for the audience and flags.
    Audience-segmentsreached.png

Conclusion

In this video we looked at RailClone's tools for randomising geometry, textures and transforms to create an audience for the stadium. In the next step we'll complete the scene, adding an undulating roof using RailClone2's new 2D Array generator.