I want to simulate the lighting in the lamp, I had built the lamp, now i am confused about how to achieve this lighting.
If you mean the gradient effect on the lamp, you can try using the gradient texture with spherical blending to control mix of two emission shaders with different colors (will need to set the UV to X=0 and Y=0) :
Just need to play with the colors, emission strengths, and slider in the color ramp. Hope this helps.
Don’t forget to add or mix with the main material. You want to be able to render as expected when the light is turned off. I always let the emission affect camera only, and rely on a lamp for the rest. Both the emission shader and the lamp can go through an empty node group, allowing you global control over all interior lights (or groups of them) by adding it unconnected in the world. When you want to turn off the light, go to world tab, enter the node, and disconnect the passthrough. Now both the emission shaders and the lamp shaders don’t get past and only the default shading takes place.
Actually that’s the right way, but to have more control I would delete one Emission node and use the ramp as the color input. In order to control the brightness, add a math multiply node at the end.
I would control the brightness using math/ramp/whatever, and lock the color to a blackbody node (unless you’re going for fancy LED achievable colors).
Thanks, that’s really helpful, btw, do you make a light bulb in the lamp? and set it emission shader or you just put a spot or point lamp inside?
I always use lights inside - what type depends, might even use two. I always use emission shaders and set 1W, because blackbody colors are only available as a node unfortunately.
I basically do all my lighting using lamps because they are much more efficient wrt noise. Then I add emission shader for camera only (because lamps are currently always invisible to camera). Then I start doing emission shader fakery for light fixture surfaces whose purpose is to bounce light or any translucent lighting effects.
The key as in any software, is knowing the tools - what they can do and their limitations, and go from there. There is no “this always work”, except doing the real thing, which I simply can’t afford timewise. Because they are different, ray visibility has to be treated differently wrt lamps and emissive surfaces. This becomes extremely important to realize if you have sharp glossy surfaces in the scene (like mirrors or clear glass). My lamps will sometimes be diffuse only, sometimes with glossy as well. With emissive surface tweaked to match.
I do find that the emission mesh cause a lot of white noise, and lamp usually doing well.