Page 1 of 1

Tutorial: TS2012 Lighting Basics

Unread postPosted: Fri Dec 09, 2011 4:56 pm
by SCLALINE
This is my first Tutorial so please be gentle

Ok i have had some questions about including the new lighting which is awesome in RW3,
'so i will show you how i have a basic street light in game and how to get the light pools to work correctly - this is in 3dsMax 2011 - will someone translate for 3dC
there is still alot to figure out so i hope others with knowledge will contribute and we can have a really awesome lighting guide for RW3

the lighting has endless possibilities - lit signs even neon ones, lights inside buildings casting light out of windows, lit signs, and on and on
so experiment with effects is advised.

Ok here we go, the light bulb glow is achieved with a new shader called TrainEmissiveGlow.fx - this shader requires 2 textures - an emissive color texture and an emissive amount texture
the emissive color texture is the color of the light and the amount is how bright the light is.

a good reference i use is http://planetpixelemporium.com/tutorialpages/light.html it gives the rgb value to most different light sources

so in Photoshop we create our to ace files we will need
Image

Then we go into our 3d editor, i use 3dsMax (Someone convert this to blender please
in 3dsmax we select the object that will be glowing in this case the lightbulb, you can make 2 bulbs and fxday and fx night them if you wish to make the glow dissapear in the daytime

Image

then go to the material editor and create the TrainEmissiveGlow material
Image
put the appropriate files in the appropriate slot then go to lighting properties and lighting materials section

and select light glow
Image

Save model and export

then go to the blueprint editor and create new point light blueprint
pay attention to the highlighted areas are set properly, also the shape is a generic sphere for place holding and moving
Image

after exporting go to the route editor and place the light model and the point light get the center of the point light lined up witht the bulb as close as possible
you will see how the lighting changes and you can change the colors and light amount after double clicking the sphere

here is the light glow
Image

hopefully others will add to this :)

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 10, 2011 8:47 am
by SMMDigital
Thanks for the tutorial on this! I was actually able to get the light in the game on the first try!

For those of you who use 3DCanvas:

- The colored light texture goes into the Primary Texture Slot.
- The white light texture goes into the Secondary Texture Slot with a translucency setting of about 50.
- You can increase the "fuzziness" of the light by setting your Ambient values higher.
- You can modify the color of the lamp both in the bluprint editor and in the game. Mercury Vapor lamps are the bluish that is shown in the tutorial, Sodium Arcs are more to the orange side, and both can be adjusted using the slider.

This is one of the best things RSC has done for Railworks. It takes all the guesswork out of making lights. Retrofitting to begin immediately!

In the picture below, the lamp post on the far left is the old lampost, using a disc on the ground with AddATex and Transparency to simulate the light. The foreground lampost has the point light attached to it as a child-object. Looks great!

capture_121011083449.jpg


ADDED: Just found that if you attach the light as a child object, you cannot edit it in game, so you need to have your settings for the point light like you want them before you attach it.

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 10, 2011 6:54 pm
by SCLALINE
Glad it worked, any chance you might retrofit the crossings and signals, is it even possible to do it with the animation

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 10, 2011 6:59 pm
by SCLALINE
Also there is a known bug in the lighting if you set day and night cycle set to on the lights in some tiles may turn off, UKtrainsim has a thread on it

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 10, 2011 7:17 pm
by SMMDigital
As for right now, there is no plan to retrofit the wayside signals. Their beams are so tight that they don't cast much in the way of ambient light. The crossings do light up a bit around them, and I may investigate that when I go back and bring them up to RW3 standards. I will be going back over my maintenance buildings and adding more realistic interior lights, and my houses to add porch lights and such.

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 10, 2011 8:10 pm
by SCLALINE
uh oh Jerry is a lighting fiend now - :P

don't forget that website i listed above

IMPORTANT
Here is where RSDerek explained the lights as well
http://forums.uktrainsim.com/viewtopic. ... 5#p1466536

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Fri Dec 23, 2011 7:16 pm
by SMMDigital
Man i'm lovin' this lighting business!

20111223nightlights.jpg

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 24, 2011 5:08 am
by SCLALINE
someones an addict - just admit you have a problem

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 24, 2011 11:53 am
by SMMDigital
Oh yeah, i'm an addict. The old way was to create a light disk, make a texture with just the right amount of alpha, the right shaders, big pain in the butt. Then you had to make sure the asset was placed on the ground just right to see the light disk. This way, i've made two point lights - one for sodium arc and one for mercury vapor - that I can child-object and manipulate in the Asset Editor to any asset i'm building. So easy!

I just hope my addiction doesn't cause a drop in frame rates!

Re: Tutorial: TS2012 Lighting Basics

Unread postPosted: Sat Dec 24, 2011 2:37 pm
by PapaXpress
grrr.... now you are making me rethink how I am doing my strobe lights...

oh well.