Author Topic: Creating a Traffic Signal Intersection  (Read 256 times)

Offline June

  • Administrator
  • General Member
  • *****
  • Posts: 75
  • Location: Miami-Dade County, Florida
    • View Profile
Creating a Traffic Signal Intersection
« on: November 13, 2018, 02:18:53 pm »
Traffic Signals
This guide will show you how to create an American-style traffic signal. June's Traffic Signals must be installed in order for you to not have an missing textures. June's Traffic Signals are included in her integration project. There are four components to creating a traffic signal which will be listed below. Roads should be created prior to traffic signals. Textures for the traffic signals must also be loaded first in order for this to work properly!


Sets - Substitute the proper values in place of the sets listed below.
Intersection #: This is the number of the traffic signal intersection you are creating. You should use the same intersection number for the entire intersection when creating a traffic signal.
Signal #: This is the number of the traffic signal you are creating for that particular intersection.
Texture: This is the texture for the pillars for the traffic signal.
Coordinates: Location for the pillars




Pillars
Pillars can be created by using the CreateWallBox2 command. A total of four pillars must be created, one for each corner of the intersection including Northeast(NE), Northwest(NW), Southwest(SW), and Southeast(SE).

DrawWalls = true, true, true, true, true, true
CreateWallBox2 external, int#NW, texture, NW X, NW Z, 1.000, 1.000, 25.000, 0, 0, 0, true, true, true, true
CreateWallBox2 external, int#NE, texture, NE X, NE Z,  1.000, 1.000, 25.000, 0, 0, 0, true, true, true, true
CreateWallBox2 external, int#SW, texture, SW X, SW Z,  1.000, 1.000, 25.000, 0,  0, 0, true, true, true, true
CreateWallBox2 external, int#SE, texture, SE X, SE Z,  1.000, 1.000, 25.000, 0, 0, 0, true, true, true, true





Span Wire
Two span wires should be created for each intersection, both a lower span wire and an upper span wire.

CreateWallBox external, Spanwire#L, Black, SW X, NE X, NE Z, SW Z, 0.0625, 17.000, 1, 1, true, true, false, false
CreateWallBox external, Spanwire#U, Black, SW X, NE X, NE Z, SW Z, 0.0625, 20.000, 1, 1, true, true, false, false




Hangers
One hanger should be created for each traffic signal. One hanger should be placed in the center of each lane on a span wire.

CreateWallBox2 external, hanger#_#, texture, X, Z, 0.250, 0.250, 3, 17.000, 0, 0, true, true, false, true




Signals
Creating signals is very similar to creating hangers. Signals should be created at the EXACT same coordinates as their hangers. TextureOverride is used to display the correct traffic signal.

TextureOverride MainNegativeTex, MainPositiveTex, SideNegativeTex, SidePositiveTex, TopTex, BottomTex
CreateWallBox2 external, light#_# standardframe, X, Z, 1, 1, 3, 14.000, 1, 1, true, true, true, true


« Last Edit: November 13, 2018, 05:19:36 pm by Frannie395 »

Share on Facebook Share on Twitter

Agree Agree x 1 View List

Offline June

  • Administrator
  • General Member
  • *****
  • Posts: 75
  • Location: Miami-Dade County, Florida
    • View Profile
Re: Creating a Traffic Signal Intersection
« Reply #1 on: November 13, 2018, 03:12:34 pm »
Code for Signals Pictured

DrawWalls = true, true, true, true, true, true
CreateWallBox2 external, int2NW, concretepillar, -17.500, 521.5, 1.000, 1.000, 25.000, 0, 0.0000000000, 0.0000000000, true, true, true, true
CreateWallBox2 external, int2NE, concretepillar, 77.500, 521.5, 1.000, 1.000, 25.000, 0, 0.0000000000, 0.0000000000, true, true, true, true
CreateWallBox2 external, int2SW, concretepillar, -17.500, 479.5, 1.000, 1.000, 25.000, 0, 0.0000000000, 0.0000000000, true, true, true, true
CreateWallBox2 external, int2SE, concretepillar, 77.500, 479.5, 1.000, 1.000, 25.000, 0, 0.0000000000, 0.0000000000, true, true, true, true

CreateWallBox external, Spanwire2L, Black, -17.5, 77.5, 521.5, 479.5, 0.0625, 17.000, 1.0000000000, 1.0000000000, true, true, false, false
CreateWallBox external, Spanwire2U, Black, -17.5, 77.5, 521.5, 479.5, 0.0625, 20.000, 1.0000000000, 1.0000000000, true, true, false, false

CreateWallBox2 external, hanger2_1, lighthanger, 56.500, 521.500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true
CreateWallBox2 external, hanger2_2, lighthanger, 46.500, 521.500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true
CreateWallBox2 external, hanger2_3, lighthanger, 36.500, 521.500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true

CreateWallBox2 external, hanger2_4, lighthanger, 23.000, 479.500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true
CreateWallBox2 external, hanger2_5, lighthanger, 13.000, 479.500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true
CreateWallBox2 external, hanger2_6, lighthanger, 3.000, 479.500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true

CreateWallBox2 external, hanger2_7, lighthanger, 77.500, 490, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true
CreateWallBox2 external, hanger2_8, lighthanger, 77.500, 500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true

CreateWallBox2 external, hanger2_9, lighthanger, -17.5, 500, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true
CreateWallBox2 external, hanger2_10, lighthanger, -17.5, 510, 0.250, 0.250, 3, 17.000, 0.0000000000, 0.0000000000, true, true, false, true

TextureOverride greenstandard, standardframe, standardframe, standardframe, standardframe, standardframe
CreateWallBox2 external, light2_1, standardframe, 56.500, 521.500, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true
TextureOverride greenstandard, standardframe, standardframe, standardframe, standardframe, standardframe
CreateWallBox2 external, light2_2, standardframe, 46.500, 521.500, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true
TextureOverride redarrowleft, standardframe, standardframe, standardframe, standardframe, standardframe
CreateWallBox2 external, light2_3, standardframe, 36.500, 521.500, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true

TextureOverride standardframe, redarrowleft, standardframe, standardframe, standardframe, standardframe
CreateWallBox2 external, light2_4, standardframe, 23.000, 479.500, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true
TextureOverride standardframe, greenstandard, standardframe, standardframe, standardframe, standardframe
CreateWallBox2 external, light2_5, standardframe, 13.000, 479.500, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true
TextureOverride standardframe, greenstandard, standardframe, standardframe, standardframe, standardframe
CreateWallBox2 external, light2_6, standardframe, 3.000, 479.500, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true


TextureOverride comboframeside, comboframeside, redcombo, comboframe, comboframetop, comboframebottom
CreateWallBox2 external, light2_7, standardframe, 77.500, 500, 1.000, 2.200, 3, 14.000, 1.0000000000, 1.0000000000, true, true, false, true
TextureOverride standardframe, standardframe, redstandard, standardframe, standardframe, standardframe
CreateWallBox2 external, light2_8, standardframe, 77.500, 490, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true

TextureOverride comboframeside, comboframeside, comboframe, redcombo, comboframetop, comboframebottom
CreateWallBox2 external, light2_9, standardframe, -17.5, 500, 1.000, 2.200, 3, 14.000, 1.0000000000, 1.0000000000, true, true, false, true
TextureOverride standardframe, standardframe, standardframe, redstandard, standardframe, standardframe
CreateWallBox2 external, light2_10, standardframe, -17.5, 510, 1.000, 1.000, 3, 14.000, 1.0000000000, 1.0000000000, true, true, true, true

Offline gooper1

  • General Member
  • Posts: 3
    • View Profile
Re: Creating a Traffic Signal Intersection
« Reply #2 on: November 22, 2018, 11:05:39 am »
Would there be a way to use the action system to create a signalling room to change these? I'm pretty sure Kan did this in one of his buildings.

Offline June

  • Administrator
  • General Member
  • *****
  • Posts: 75
  • Location: Miami-Dade County, Florida
    • View Profile
Re: Creating a Traffic Signal Intersection
« Reply #3 on: November 22, 2018, 11:53:42 am »
Would there be a way to use the action system to create a signalling room to change these? I'm pretty sure Kan did this in one of his buildings.
I would hope so. I intend to continue developing the simulator to include slideshow textures. Slideshow textures would allow different textures to be displayed after a certain amount of seconds.

Example in the load data section:
CreateSlideshow 1, true, redlight, 20, greenlight, 25, yellowlight, 3

After that you can apply the texture Slideshow1 to anything that used a texture before.

Offline Schindler 7000

  • General Member
  • Posts: 79
  • I ❤️Schindler 7000
  • Location: New Territories, Hong Kong
    • View Profile
    • Youtube
Re: Creating a Traffic Signal Intersection
« Reply #4 on: January 13, 2019, 04:00:24 am »
Would there be a way to use the action system to create a signalling room to change these? I'm pretty sure Kan did this in one of his buildings.
I would hope so. I intend to continue developing the simulator to include slideshow textures. Slideshow textures would allow different textures to be displayed after a certain amount of seconds.

Example in the load data section:
CreateSlideshow 1, true, redlight, 20, greenlight, 25, yellowlight, 3

After that you can apply the texture Slideshow1 to anything that used a texture before.
Skyscrapersim is dosen't have "CreateSlideshow" command.
I like Otis, Schindler and Kone Elevator brands, Otis Gen2, Schindler 7000 and Kone Ecodisc elevator models.
Subscribe to YouTube

Offline ZZ9

  • General Member
  • Posts: 117
  • *Insert Useful Information Here*
  • Location: ZZ9 Productions Private Office Centre, ZZ9 City
    • View Profile
    • My YouTube channel - Skyscrapersim, Elevators & More!
Re: Creating a Traffic Signal Intersection
« Reply #5 on: January 13, 2019, 06:07:44 am »
Skyscrapersim is dosen't have "CreateSlideshow" command.
Not right now, but from what June is saying, it is a feature that she wants to add at some point in the future (and I would actually like it too).
Scratch - ZZ9PluralZAlpha
YouTube - ZZ9 Productions

I'd stick a nice collage of lifts here but then this signature would be absolutely massive..

Offline June

  • Administrator
  • General Member
  • *****
  • Posts: 75
  • Location: Miami-Dade County, Florida
    • View Profile
Re: Creating a Traffic Signal Intersection
« Reply #6 on: January 13, 2019, 11:58:16 am »
Skyscrapersim is dosen't have "CreateSlideshow" command.
Not right now, but from what June is saying, it is a feature that she wants to add at some point in the future (and I would actually like it too).
I wish I could add the feature. Unfortunately, I have no idea how to code for ORGE or C++. Does anybody other than Ryan know how to develop the simulator?

Offline ZZ9

  • General Member
  • Posts: 117
  • *Insert Useful Information Here*
  • Location: ZZ9 Productions Private Office Centre, ZZ9 City
    • View Profile
    • My YouTube channel - Skyscrapersim, Elevators & More!
Re: Creating a Traffic Signal Intersection
« Reply #7 on: January 13, 2019, 02:16:36 pm »
Skyscrapersim is dosen't have "CreateSlideshow" command.
Not right now, but from what June is saying, it is a feature that she wants to add at some point in the future (and I would actually like it too).
I wish I could add the feature. Unfortunately, I have no idea how to code for ORGE or C++. Does anybody other than Ryan know how to develop the simulator?
Sadly I don't know any C++ or OGRE code, but if I ever learn either in the future as part of something else I might be able to try and help out.
Scratch - ZZ9PluralZAlpha
YouTube - ZZ9 Productions

I'd stick a nice collage of lifts here but then this signature would be absolutely massive..

Offline HappyPizza64

  • General Member
  • Posts: 82
  • I hate Samsung and Android. I prefer iOS.
  • Location: Current: Usual. Usual: Dublin, Ireland
    • View Profile
Re: Creating a Traffic Signal Intersection
« Reply #8 on: April 27, 2019, 03:06:32 pm »
I have a question: could you retexture the lights to your country's ones and reposition them vertically instead of horizontally? Like here in Ireland, they don't hang on poles horizontally, but vertically. Also, I could ask my friend if he could try develop the simulator further as I think he knows some C++.

Offline June

  • Administrator
  • General Member
  • *****
  • Posts: 75
  • Location: Miami-Dade County, Florida
    • View Profile
Re: Creating a Traffic Signal Intersection
« Reply #9 on: April 28, 2019, 12:48:29 am »
I have a question: could you retexture the lights to your country's ones and reposition them vertically instead of horizontally? Like here in Ireland, they don't hang on poles horizontally, but vertically. Also, I could ask my friend if he could try develop the simulator further as I think he knows some C++.

Absolutely! The traffic lights can be re textured to match your country's ones. They can also be placed vertically on poles by just creating a column. Creating Irish style traffic lights is actually easier than creating the span wire boxes that I have created. Span wire traffic signals are common in the Southern United States for major ones such as this one.