Monday, 21 May 2012

What next?

Ok, open to suggestions. What on the art front has you stumped? Lofts? Track? fancy train shaders? animations or just some hints tips on modelling?
Feel free to request.



Friday, 11 May 2012

How to make a Platform light with emmisive glow

In the route of your ‘Provider’ make a new folder called Lights. This is where you will keep the max, igs and xml files.
In the Lights folder make a Texture folder. This is where you will keep your textures

Step 1: Gizmo creation
We need to make a Point light gizmo.
This is what we will use to determine where the light effect gets generated from. This gizmo you will be able to move around in the Asset editor.

I have made a 30cm Diameter sphere with a Tex material, the texture is a bright pale yellow, 64/64 pixels, planar mapped from the top.
This I centred at 0/0/0 in max.

Export this into a igs file.

Step 2 Make the point light xml.

Right click the point_light.IGS in the asset editor and click new shape blueprint and select point light blueprint.

Treat this just like any other scenery object, name it in the relevant fields, and give it a provider product in Primary named texture set.

In the light component section give the light a radius, I have given mine 10 (M)

Give your light a colour, I picked a warm yellow/orange.
Click Save.

Preview your shape and you will have your object in front of you. Click the Day/Night cycle button in the top left flyout menu. Your object should glow (because of the tex material)
Select your object and lift it up in the scene. You will see that it now emanates light. Experiment with the light and radius values to get the desired effect you want.

Step 3: Light Asset Creation.
There will be at least 3 objects in your scene but 5 materials:

Objects in scene:

1_0500_bulb_night (with Forward facing glow element)

I have a 4th object which is the glass.

Materials used:

Material 1 used on  1_0500_LampPost. It can have any material you want, I have a TrainBasicObjectDiffuse. It uses 1 256/256 texture which I boxed mapped.

Material 2 used on 1_0500_bulb_day. It can have a tex or a TrainBasicObjectDiffuse. It uses 1 32/128 texture which I planar mapped.

Material 3 used on 1_0050_glass. It has the Trainglass.fx shader explained in a previous blog post.

Material 4 used on 1_0500_bulb_night This uses the TrainEmissiveGlow.fx shader

In the sub material slot 1 I have a diffuse texture very much like bulb day texture. However I colour the bulb section yellow (this is used for the colour of the glow) Name this texture Bulb.ace

In the sub material slot 2 (making sure the same UV channel is used (1)) I have a texture that is the same size as my bulb texture but it is black and white. The white area defines the glow area, the black is the non glow area. name this texture with Bulb_EM.ace

There is a second element (but part of the same object) to 1_0500_bulb_night which is a simple plane centered through the bulb.
This plane uses material slot 5 which is AddATex. The texture is all black except for a faint glow in the centre. make sure you name this with _nm so that it does not get compressed.

This material has the View facing flag ticked under the Viewer Facing options.
Save the max file and export as an IGS, I called mine Platform_light.IGS
NB The bulbs are named so that the day bulb will show during the day and the night bulb will show at night.

Step 4: Bringing it all together.

In the asset Editor right click the platform_light.igs and select New shape blueprint, then select scenery blueprint.

Preview shape, you lamp should be as you expect it. Click on the day/night button and see your bulb glow.

Name the relevant fields, and give it a provider product in Primary named texture set. Expand Children and click insert first.
Give the Child name/provider product and select your previously made point light and click preview.

Your point light orb will be at 0/0/0 select it and move to the correct place. 

Click Save and Export.

Your light should now be viewable in game.