I have a skyscraper building but I only want the glass in the texture to be glossy. How would I accomplish this?
Ok, I have done a test and here are the results.
Here is the original:
here is an adjusted image
I have a skyscraper building but I only want the glass in the texture to be glossy. How would I accomplish this?
Ok, I have done a test and here are the results.
Here is the original:
here is an adjusted image
You could use a specular map. It's a texture where the whiteness determins the amount and location of the shininess.
As a simple example, I created two simple textures - the regular texture and the specular texture. The specular have white where the windows are and black for the rest:
I then make a plane mesh in Blender for this demonstration, and apply a material to it. Also I add a Sun lamp with an angle so it's easy to see the specularity. In the textures properties, I add the diffuse and specular:
Note that I haven't touched the specular (Texture.001
) properties yet, so the plane looks like it has completely flat shininess:
But if you go to the specular texture and under "Influence", deselect "Diffuse color" and select some or all of "Specular Color"/"Specular hardness"/"Specular intensity":
Then it looks like this:
You can use a mix node with a black and white texture as the Factor:
Result:
This can be done in blender internal by adjusting the influence map texture in Properties > Textures > Influence:
Note that you must have Mirror enabled in the material for the map texture to influence reflections.
Result:
So for a building texture you could make a mask texture for all the windows in an external image editor, or you could try making the image with blender:
Add your texture as a background image:
Add a plane and edit it to match the windows:
Add two Array modifiers to the plane (one for each axis):
Position the camera so it points straight at the window array (see this post), and set the camera to Orthographic in Object data > Lens:
Set the output resolution to the same as the texture and adjust the Orthographic scale of the camera in Object data > Lens until the array object and the texture line up:
Give the object a pure black material and set the world color to pure white.
Render. (If you are using cycles, you may want to set the number of samples to 1, this will give a mask with only black and white.):
Save the image to a file (F3) You now have a mask image file you can use as an Image texture in a material.
Example material: (click for full size)
Notes:
You may want a little bit of diffuse reflection on the windows, so I added a Brightness Contrast node to make the black on the windows a dark gray, which will result in a mix of the glossy and diffuse shaders. You can think of this as each pixel in image containing a value between 0
(black) and 1
(white), which will set the Mix factor for that specific pixel.
You may also want some subtle displacement, as windows are rarely perfectly flat. I added a noise texture and multiplied it with the inverted map, so the noise texture is only on the windows. (the rest is white). This is then plugged into the Displacement socket.
Also see this tutorial on BlenderGuru.
You could also assign two materials to the object and assign them based on your vertex selection in edit mode.