Wikis > Visual Pinball Knowledge Base > VPX Lighting Basics

Light values in the Editor (feel free to edit this one):


How big the visible light is (red circle in the editor)

Falloff power
How fast the light fades towards the outer limit. Low number = big bright area in the middle fading quickly to the outer limit, high number = small bright area in the middle fading softly to the outside.

Overall brightness of the light

Fade Speed Up
How quickly the light reaches the full intensity

Fade Speed Downn
How quickly the light turns off.

Pass Through / Image
Used to light up Inserts. The image is usually the PF image.

Depth Bias
Can be useful to move a light in front or behind a object, for example if you don’t want to double up the lighting on a pre-rendered object.

Bulb enable
Switches the ‘light above the PF’ on. When off you can use the Pass through option for the inserts.

Show mesh
Shows a standard mesh of a light bulb at the center cross on the selected surface in the pull down menu below.

Static mesh
Mesh is an active object when unchecked. Uncheck it if you want a nice and bright light bulb

Halo Height
Height of the light source in VP units

Scale mesh
Size of the standard light bulb mesh. Set this to 20 for GI bulbs.

Makes the visible light opaque. 1 is fully transparent, 0 is fully opaque. I only use this for flasher lights to make it look more ‘aggressive’. I always use a value of 1 for the GI’s because everything lower will give the table a white’ish, foggy look. Always try to put light on objects and resources, don’t hide the good stuff behind it.

How much of the light will show through a certain object. The object needs the following material settings to show the light underneath:
Opacity has to be set to ‘Active’ and the amount has to be <1. For objects with the ‘static rendering’ option, you have to turn this off or the object will stay dark.

Show reflections on ball
Turn this on if you want that lamp to reflect off the ball

Position of the center cross

The height of the selected surface is the base hight (0 Units) of the light source / bulb. If you choose the Upper PF as the surface a halo hight of 0 will be the same hight as the Upper PF.

Everything below in the options menu is for the script gurus!


A couple more things:

It’s not really crystal clear what the left and the right colours do in the lighting options menu so i made two test pictures with multifaceted inserts. Judge for yourself:

Intensity adjusted so the bright spot in the middle has about the same size:


Same settings, intensity 9 for all four:


If you use a bright orange on the left, white with a touch of orange on the right and a Falloff Power of around 2,5 you will get a good realistic behaviour for your GI’s. Use this as a starting point.

When using big lights there is often a problem when the table has multiple GI’s in a small area. One problem with VPX is, that it’s adding up the brightness of lightsources that share the same space. Everybody who has made a darker table knows what i’m talking about. One example is the exploding insert light next to a GI. This is not what happens in reality. Think about pulling a real table out in the bright sun. A lot of people would double check if they really switched the table on or if they have plugged it into the wall. In the bright sun you could barely see the lights of a real table. In this case the brightest lightsource wins and eats up the weaker ones. In VPX the table lights would explode. Here is a picture of a workaround. Both lightsources got to have the exact same values including Falloff, Falloffpower, colours, intensity, fade speed, halo hight and modulate. What i do here is i make a straight line through the contact points of the red falloff circles. Make sure that you’re fully zoomed in and check that the two lines look like one thin line. This is a great method for dark tables. I highly recommend to try this out:

2 lights

3 lights

You can not make a colour of an insert more intense then it actually is. Don’t use dark, rich colours. Use bright colours in your insert lights. This will not wash out the insert colour and as a side effect you can turn down the intensity which will also have a lot of positive effects.

You can not make an insert brighter then the PF image allows it. If you push the intensity over a certain value (depending on the PF graphic) you will get a flat, round, ugly colour disc in your insert with no falloff. The more you push it over the limit, the more ugly it gets. Try to find the right intensity level where you have a nice smooth falloff from the center to the outside. If it’s too dark, you have to change the brightness of the insert in Photoshop.

One important thing with the lighting colour is, that you can not light something in a colour that is not in the resources. For example if you have a plastic with a fully red colour (rgb 255,0,0) you can not make the light coming through look like a warm red. It will look like a white’ish washed out red. No matter what light colour you choose! Same goes for insert lights. Pure yellow plus pure red light will not result in an orange insert. It will stay yellow! (Thanks flupper). Best example here is that a lot of insert colours look OK when you light them up but orange always looks great. That’s because all the colours that you have in your warm white lightsource are already in the orange inserts.

This brings us to another lighting problem, tables with a lot of black in the resources (Blackout for example). Most guys who do a PF redraw use a total black (rgb 0,0,0) for a high contrast. The VPX rendering engine doesen’t like that. No matter how bright your light source is, total black will stay totally black. Graphics inside the black will look like the self illuminated digits in a modern cars dashboard. Not good! It seems that VPX is trying to multiply with a zero value. 1000000*0=0. One way around this is to use a non black clearcoat layer. It creates some sort of coating on the resources that will light up instead of the black image. But remember, that coating is grey! I can still hear Hauntfreaks screaming that a non black clearcoat layer will wash out all the colors on the table. And he’s right! The only way around this is to not use total black in your redraws. Now VPX doesn’t have to calculate with a zero value anymore. Black will still stay darker then the rest, but that is realistic. But now it has a chance to glow. Most important you don’t have to use the clearcoat layer anymore and all the other colours will pop! If you are not convinced go to real table with a lot of black and have a close look. How do the black areas look in reality?


Schreibi34 – 3 light method for darker tables with big lights

These are the 3 lights used in this method and what they do:

1. A small one with high transmit (around 0,9 – and low intensity of about 4-6 depending on the plastic and personal taste). I set the hight for this to 32 so it lights up the bulb and the plastic at the same time (thanks Hauntfreaks!). If you want to use bigger lights on darker tables you need this to set a smaller highlight on the plastic to simulate the light bulb.

2. Shaped / obstructed light to simulate shadows from posts on the PF.
The easiest way is to create the shadow as a Pizza slice with straight lines on the side. The tip of the triangle ends in the center of the light source which makes it a lot easier to get a geometrical correct shadow.
Select the obstructed light and add 3 angled controlpoints next to each other by pressing F10. Pull the middle one to the center of the light. Be careful. Don’t pull it over the middle because then the lightsource is under a shadow and the light turns off. Zoom in and make sure you stop before the centercross. Just pull the other two control points until the lines touch each side of the rubberpost.
Now we have to make it look good for the DT users (thanks for waking me up, HauntFreaks). Wait with this step until you are sure that you have finished the tuning of your lights and shadows because scaling and re-adjusting the lights / shadows after moving / scaling will benefit from the triangle shape. After you have finished the lighting add two more angled controlpoints (F10) where the shadowlines make contact to the rubberpost. Pull the controlpoint from the center to the post and make it smooth. Now you can wrap the shadow around the back of the post. You might need a second smooth control point (F11) to make it fit more perfectly around.
Set this to a height of about 0.5 because if you set it higher the viewing angle might cause an offset on the shadow.
Intensity at about 6, Falloff Power at around 2,5
Transmit has to be set to zero for this light!
Important! If you are using a rendered shadow layer, keep this light! Just make it fully round, don’t create shadow lines! This light is important for a realistic look with more light under the plastic and a softer fade from the following light:

3. Fully round GI that is at least 30% bigger (falloff) then the shaped light. Low transmit of around 0,3 – 0,4 to light up the plastic the way you like it. Set the height above the height of targets and balls and below the plastics. If you have your plastics at a height of 54, set this light to 52. This light has a transmit value >0 and if you set it to let’s say 20 the targets will be ‘cut in half’ by the light. Spinners are higher then this light and will be cut in half by the light. To avoid this you have to use a primitive spinner and use the depth bias to turn of the lights on the spinner. Try a depth bias of -1000. The visibility of the ball will also benefit from this hight value because the ball will now be fully lit by the big lightsource. When set low, the ball will only be lit with the reduced transmit value.

You can play around with the values and balance everything to your liking. A brighter shaped light will lead to more visible shadows. Also lowering the brightness of the fully round light will make the shadows more visible. Balancing is the key. You can also play around with falloff power to influence the fading of the shadows and for sure you can scale the size of the obstructed light to set the length of the shadows. If the triangles are centered correctly, the rays are not losing contact to the rubber post when scaling.
It’s important that the fully round light is at least 30% bigger (falloff) then the shaped one so the shadows fade into light. A falloff power of 2,5 is a good starting point for all lights.
If you start to see things from the playfield through the plastics go to the material settings for the plastics and set opacity as high as about 0,99999. On this table a opacity of 0,99 let’s me see stuff from under the plastic. This is because with this method there is a lot more light under the plastics.
When I work with this method, I put the lights on layers 9;10;11 (small, medium, big lights). It’s easier to select them with the trap and apply certain values to all of them. Make sure you have one more empty layer while doing the lighting to have a bit of clean space when shaping the lights. Chaos will make this a bad trip!
Baked in shadows might ruin the immersion of a dark table. They are usually rendered from gameroom/pub/arcade lights. Dark tables produce their shadows on a playfield level. Which means roomlights throw plastic shadows onto the playfield, GI lights throw it up to the ceiling. Only things that are lower then the light height will produce shadows on the playfield. On tables with a mid to low overall brightness, crank up the in game IO to the point where you start to see the ‘Ants’ running around. It would be really cool if we could set the IO to about 3,5. In combination with this 3-light method a lot of people would not need to render shadows on their tables anymore.

Ok, so much for now. I hope this was of some use for a couple of people. If hope my english was not too bad and you guys did understand what i was trying to say. I hope other authors will add their stuff here so everybody can benefit from their knowledge!

Category: Tags:


Log in with your credentials


Forgot your details?

Create Account

The Vpinball app