Lets talk about night textures.

Lets talk about night textures.

Postby callum112233 » Fri Dec 09, 2016 10:38 pm

Alright. So I can get a decent enough building into railworks now, but what about night textures? How do I go about lighting parts of a building up at night?

I'm looking at lighting up the corridor inside this station entrance so it looks like there are some lights on.

Image

Thanks again :P
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Re: Lets talk about night textures.

Postby AndiS » Sat Dec 10, 2016 11:01 am

The cheapest solution in terms of performance is shader Tex. For this one, the game does not even start to think how to light it, so it's brightness is constant from dust to dawn.

People normally use it for lit windows and lit advertisements and such. But there is nothing stopping you to use it for the inside wall and floor of the station entrance.

To do so, I would take the wall texture a overlay it with repeated white/yellowish blobs, each representing the lighting effect of one lamp. More precisely, you create a new layer in Photoshop, Gimp or whatever you use. Select 'spraycan' and a brush size of something like 3 or 4 metres. Then point its centre at the top margin of the wall rectangle. So you get half a blob that is rather solid white or yellow in the middle (though not solid white) and has a long gradient down to the bottom end of the wall. How much of that is your artistic licence.

Once you are satisfied, you take the blob and copy-paste it along the wall. This gives the feeling of the wall being lit by so and so many discrete lamps.

If this sounds like too much hassle, you could also play with just using the original texture of the inside wall, with Tex shader, and if that is too bright, make it a bit darker as a whole. And if that sounds too easy, you can make it darker at the bottom and less so on the top.

For the floor, this second option will be the more attractive as the light should spread rather out evenly on the floor.

There is also shader ATex. It is the same with alpha channel. So you can put the light blob on a separate quad and place that anywhere you like. The platform floor just outside the entrance comes into mind.

All this is just a repetition of here-say, I only ever tried it with signal lights.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Lets talk about night textures.

Postby TrabantDeLuxe » Sat Dec 10, 2016 4:48 pm

Andi gives some good suggestions. The 'Tex' shader is the cheapest shader present in the game. Basically, what it does is say 'Slap this image across the polygons. Don't think about whether it's dark or lit outside. Just do it and render it as-if it's daylight.' So, for a cheap and simple solution, you'd be best off using this. But there's - at least in art terms - a bit of a catch: You'll have to compromise between a proper daylight and artificial light texture.

Couple of thoughts on how to deal with this - just me thinking out loud:
  • Just live with it...
  • As per Andi's suggestion, use light glow polygons. You can use the AddATex shader for a trick called 'additive alpha blending'. In humanoid terms, this is a shader that lightens everything behind it, the intensity being related to the lightness of the texture. It's a bit difficult to explain, but I think Derek Siddles' blog post might clear the concept up a bit. So if you would add a couple of these polygons in there, make a nice blobby texture, you might get some nice effects.
  • Add actual point lights. There's a point light blueprint, allowing you to make a point source of light. These can be included in your model as a child object. There are some performance constraints, so refrain from using this on background scenery. Also, the shadow-casting type of lights are absolute FPS murderers, so I'd never use these on a scenery object. You'll therefore have to set the range of the light to something smaller than the dimensions of the hallway. Here's a topic on here on point lights.
  • Use a seperate night and day textured hallway. How to set up these is covered in dev doc number 4.04, chapter 5 [pp. 15 - pp.17].

By the way, you're asking the right type of questions to improve :). If there's anything else you need to know, just ask. I've noticed this is quite a helpful community.
TrabantDeLuxe
Passed Fireman
 
Posts: 247
Images: 7
Joined: Mon Mar 21, 2016 10:10 pm
Location: Delft, NL
Has thanked: 176 times
Been thanked: 263 times

Re: Lets talk about night textures.

Postby AndiS » Sat Dec 10, 2016 5:44 pm

3 little post scripts:

1) I seem to have meant AddATex. There is ATex, too, I believe, but AddATex is what is recommended in that blog and elsewhere. Not sure how much you will note in your case, though. ATex puts white or yellow in front of the background, AddATex adds the colour to the background which in my book will sum up to pretty much the same thing. But Derek's blogs are the gold standard, so doing as he say cannot be far off. 8-)

2) I forgot to mention point lights. I believe that they would be a waste in your case, unless the driver stops next the entrance and the player spends some time looking at it. But a lot depends on the performance of your rig, and the number of other lights in the scene.

3) I assumed you have separate day and night textures. During the day, the situation will be different. You will create a triangle of light from the top corner diagonally along the wall down to the bottom at and angle a bit steeper than 45° (I guess) and back along the bottom of the wall to the front edge. This represents the sunlight hitting the inside wall. The diagonal edge of the triangle will be fuzzy of course, increasingly so as you approach the bottom.

You either superimpose this triangle of white (with a slight blueish tint for perfection) over the darkened inside wall, using a transparency of maybe 20% (subject to experimentation). Or - maybe even better, only darken the other part of the wall.

The night texture would be what I described.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Lets talk about night textures.

Postby TrabantDeLuxe » Sat Dec 10, 2016 5:48 pm

AndiS wrote:3) I assumed you have separate day and night textures. During the day, the situation will be different. You will create a triangle of light from the top corner diagonally along the wall down to the bottom at and angle a bit steeper than 45° (I guess) and back along the bottom of the wall to the front edge. This represents the sunlight hitting the inside wall. The diagonal edge of the triangle will be fuzzy of course, increasingly so as you approach the bottom.


The pro way of doing this (but a little over the top for a beginner maybe) is to actually 'bake' lighting into a texture. For daylight, a simple AO bake would work perfectly, for the night texture... You'll have to delve into how blender handles light and how to render that to texture.
TrabantDeLuxe
Passed Fireman
 
Posts: 247
Images: 7
Joined: Mon Mar 21, 2016 10:10 pm
Location: Delft, NL
Has thanked: 176 times
Been thanked: 263 times

Re: Lets talk about night textures.

Postby callum112233 » Thu Jun 01, 2017 3:22 am

HI all.

Just dropping by to let you know what I have learnt. Sadly not figured out glass or night textures yet but I have learnt how to do seasonal texturing and more importantly how to bake textures which I have found very useful as I don't have to work off one texture file anymore.

Anyway. If anyone has a video tutorial for night textures and glass in blender then that would be great.

Here is a little building I made which is probably my best textured building yet.
Image
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Re: Lets talk about night textures.

Postby malkymackay » Thu Jun 01, 2017 9:29 am

Try https://zugguy.wordpress.com/2012/05/25/through-a-glass-not-so-darkly/ for a tutorial on working with glass. Ok, it's not a video & is for an older version of Blender, but it's not too difficult to follow.
User avatar
malkymackay
Full Time Fireman
 
Posts: 87
Images: 58
Joined: Thu Apr 10, 2014 9:19 am
Location: Kilsyth, Scotland
Has thanked: 36 times
Been thanked: 127 times

Re: Lets talk about night textures.

Postby callum112233 » Fri Jun 02, 2017 4:45 pm

Yeh thanks for that link but I have already seen that. I don't seem to be able to follow it. Doesn't help how all the screenshots seem to in 3ds max :?
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Re: Lets talk about night textures.

Postby Pauls » Sat Jun 03, 2017 10:04 am

Night textures objects - end name with _fx_night and for the day version end the name with _fx_day

Cheers
Paul
Pauls
Driver
 
Posts: 435
Joined: Fri Apr 04, 2014 10:38 am
Has thanked: 460 times
Been thanked: 188 times

Re: Lets talk about night textures.

Postby callum112233 » Tue Jun 06, 2017 5:37 pm

Pauls wrote:Night textures objects - end name with _fx_night and for the day version end the name with _fx_day

Cheers
Paul


Any chance you could show me an example of that inside blender?

Thanks.
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Next

Return to Blender

Who is online

Users browsing this forum: No registered users and 4 guests