Hey guys! I’ve searched the whole forum for a solution to this problem, but I can’t find any appropriate solution(s) so I’ll try it out here.
I’m creating a cityscape in night, a k a no light sourches other than the windows on the buildings. To save some time in modelling, not to mention polygons, I’d like to make emitters of all the windows on the textures.
As I’ve searched the web for this, I’ve gathered that one solution would be to create a material with multiple textures (one emitter and one alpha, masking all the light where not wanted). But is it possible to create a material where the texture emits light only from the white parts (or everything that is not black)?
What’s the easiest way to accomplish this? I’m open for all solutions and ideas, of course!
If you have black/white image, kind of mask, plug that… Are we talking Cycles? I hope so… into Mix node Fac input.
Add two Shaders: Diffuse - that can have walls texture and Emission Shader into the Mix node. That would be a quick and dirty how to mix two based on black and white mask. However, you most likely will want it a bit more complicated than that. Some leads - LightPath node into the emission part - Make two Emission nodes mixed by another Mix node driven by LightPath node Camera output instead of the first Emission shader.
Alternatives - OSL had one nice example with fully lit rooms, actually adjustable high rise building with randomly lit rooms; BI has Material Emission value, could assign to window faces as a separate material.
Thank you so much for your answers! Seems like you both would prefer multiple materials in this case.
I noticed I was a bit short on some important details:
We are definitely talking Cycles!
RickyBlender: The building model/mesh is just simply a “rectangular” box (6 sides/polygons all in all). I’d like to keep the models/meshes as simple as possible, as there will be at least 100 individual buildings in the final scene.
I’ll try to upload a small file tonight (European time).
Hey guys and thanks for such fast answers! :eyebrowlift:
Guess the fastest and most appropriate way would be to go for a multiple material.
To elaborate (sorry for being so short on all the details), my intentions are to use simple “rectangular” box meshes for the buildings, a k a really simple models with no more than 6 sides/polygons. I fancy Cycles very very much, so I would like to use it.
Cycles and texture - you can do a lot. From the texture you pointed and what i suggested it might look like this
Material for walls was this; did not test texture part, was just an idea.