• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Editing Objects For Night Routes?

Status
Not open for further replies.

The Snap

Established Member
Joined
10 Jun 2005
Messages
3,148
Hi guys,
This is mainly for those of you who know about the ambient lighting and other lighting codes.

I am thinking of doing a night route for Richwell, but need to know how to edit the objects accordingly. I also don't understand why in my dawn route, the lamps I used with light rays appeared dull, when in Maybank and Clarendon they appear light...?
Thanks,
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

Dennis

Established Member
Joined
8 Aug 2005
Messages
2,676
Location
Trowbridge
if the ambient light is low, you ideally need to use .x files which enable luminosity to be applied (and specular reflectance if you are using directional lighting in BVE).
 

The Snap

Established Member
Joined
10 Jun 2005
Messages
3,148
I see. Dennis, how do you convert into .x? I know this can be done in the newer version of Structure Viewer (by clicking 'File', 'Export X' then...), but after you click save it asks for a format. Do I use Text, Binary or Compressed?
 

Tom B

Established Member
Joined
27 Jul 2005
Messages
4,615
Use Text if you're going to edit it again, or Compressed if you're not (but remember to keep the source .csv - it's akin to compiling)
 

The Snap

Established Member
Joined
10 Jun 2005
Messages
3,148
Ok, thanks Tom. How do I make things glow then, does it automatically do it?
 

Tom B

Established Member
Joined
27 Jul 2005
Messages
4,615
Nope

To make things glow... here's an extract from some information Simon Gathercole sent me last year.


"As regards shading and stuff, the bits of the .x file you need to look for are the 'Material' blocks. There'll be at least one for each colour and each texture file used in the object (maybe more if it isn't efficiently coded). The format is:

Material {
R;G;B;alpha;; // basic colour and transparency (values run 0.0-1.0)
n; // the 'specular exponent'
R;G;B;; // colour of specular reflection
R;G;B;; // emissive colour [ Set this to 1.0,1.0,1.0 for a glow object unless some wierd colour effect is required! ]

TextureFilename { [ I remove this block for signal and glow objects and link textures using the object filename.]
"texture.bmp";
}

}

Pretty self explanatory, apart from the 'specular exponent' which is a property of the surface, determining how sharp or diffuse the reflection is - apparently 10 is appropriate for a smooth surface like glass and 1 for a completely dull surface. For a more technical explanation, see lecture 12 of this course: www.cis.strath.ac.uk/teaching/ug/classes/52.359. Other useful lectures are 9 (projection) and 11 (explains what normals are) - you can skip the maths and Java!

It's also worth looking at: http://www.gamedev.net/reference/articles/article1196.asp which gives an annotated simple .x object. The BVE4 viewer will load square.x, even though for some reason it leaves out the 'MeshNormals' section. BTW - I found that I could replace the four triangles with two square faces; the viewer also seemed happy when I constructed a 5-sided face. "
 

Dennis

Established Member
Joined
8 Aug 2005
Messages
2,676
Location
Trowbridge
All the above is absolutely correct. There are also .B3D to .CSV and .CSV to .X file convertors on Mr Mackoys site.

Specular reflectance is directional in nature and can give some unwanted effects but does look good on 'curved' surfaces (not all that many of these exist in BVE land).

Changing the emissive glow RGB values is useful for creating objects of the same basic appearance but which differ only in colour (eg for illuminating objects under orange and white streetlamps).

A note of caution - when I created the Clarendon route, I ended up rebuilding an awful lot of the objects - mostly retexturing but also adjusting the ground objects. If these don't fit together properly the results look very poor (this is one of the main failings of the dawn/dusk/night x-city scenarios IMHO).

Retexturing basically involved initially darkening ALL textures (using Irfanview) and then adding the lighting effects where necessary using Photoshop. Some of the common textures (and indeed objects) may appear in situations where they are both illuminated and unilluminated so to go 'all the way' on a night route, the number of object files and textures is significantly increased.
 

Tom B

Established Member
Joined
27 Jul 2005
Messages
4,615
Another thing to note is it might be easy to cut down on textures - for example for a ballast texture you need only the day one, for the night texture you can darken it using the colour feature in the object file. Of course this doesn't work where there's extras (like lights on a house) to be added.
 
Status
Not open for further replies.

Top