Night Windows

Tips and discussion about scenery creation for RailWorks.

Night Windows

Unread postby cnwfan » Sun Sep 18, 2016 11:59 am

station_windows_091816.jpg

So I'm working on a station model, and I want the windows to have a "night glow" at night. And before some wise guy out there says "why don't you look through the forum", I did... and it didn't make any sense to me, which is why I'm asking for help. I created a flat plane window object which has the window panes and the framing. This flat plane is then positioned on top of the base structure box. However, from reading through the various forum posts, it sounds like the panes also need to be a separate object from the window framing. Is this correct? Or am I ok with having the single window object with the framing? Also, how do I name and structure the object hierarchy so this works? Any help would be greatly appreciated. Thanks!
You do not have the required permissions to view the files attached to this post.
************************
Howard (cnwfan)
Waverly, IA
My Flickr railroad photos: https://www.flickr.com/photos/184697503@N06/
cnwfan
 
Posts: 707
Joined: Mon Apr 25, 2011 4:16 pm
Location: Waverly, IA

Re: Night Windows

Unread postby Bananarama » Sun Sep 18, 2016 2:00 pm

cnwfan wrote:it sounds like the panes also need to be a separate object from the window framing. Is this correct? Or am I ok with having the single window object with the framing? Also, how do I name and structure the object hierarchy so this works?

Correct., but to prevent z-buffer issues (z-fighting) of the windows and main building, the window planes should be offset a bit from the surface of the main building.

The day/night object names should follow RW protocols: <object_lod>_<object_distance>_<object_name>_day, along with another object named <object_lod>_<object_distance>_<object_name>_night. An example would be:

1_0256_window_day
1_0256_window_night

The texture file for the night windows can be the same as the main object, but it needs to have a separate Tex material. Thus, you can have the day windows mapped to one section of the building texture, but map the night windows to another area. You can do the same for other pieces of the building, such as having garage doors open in the day, while at night they appear closed, etc.

Much of the info above is outlined in the old Rail Simulator developer docs, specifically 4.02 Shaders.pdf. :D
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Night Windows

Unread postby cnwfan » Sun Sep 18, 2016 4:30 pm

NightTestWall_091816.jpg

Thank you for the assist Marc. I built a test wall to test out the object hierarchy and textures... and after an afternoon of frustration, I finally got all the pieces to line up. The big piece was using that Tex shader for the night window texture instead of the TrainBasicObjectDiffuse.fx shader. Now I just need to work on the actual textures so they look more like windows. And I need to rework the station windows to match the test wall, but at least I caught it early enough in the development. Thank you again!
You do not have the required permissions to view the files attached to this post.
************************
Howard (cnwfan)
Waverly, IA
My Flickr railroad photos: https://www.flickr.com/photos/184697503@N06/
cnwfan
 
Posts: 707
Joined: Mon Apr 25, 2011 4:16 pm
Location: Waverly, IA


Return to Scenery Design

Who is online

Users browsing this forum: No registered users and 1 guest