emissiveMaterial(v1, v2, v3)
-
Here, the material doesn’t emit the light, it just glows. So the neighboring objects don’t react to its light, but if there is no light, you can still see the emissivematerial()
. It can be a lot like ambient material. You can also check this demonstration to understand more-
The code for this will be -
void draw(){
background(0);
ambientLight(128, 128, 128);
push();
emissiveMaterial(255,0,0);
sphere(width * 0.2);
pop();
push();
ambientMaterial(255,0,0);
sphere(width * 0.2);
pop();
}
So, here we can see if the strength of light is lesser than its emissive strength, emissive behavior will be shown, whereas if strength of light is more, both strengths add up (This is doubtful to me, as they should add up or light’s strength just shadow over the emissive strength, I need some advice here ) .
Here, v1, v2, v3
will be the color, can be also passed on as p5.color object.
Edit: Processing does add up the strengths to depict the material.
Motivation-
It will allow users to create a new kind of material, which has a property commonly seen in real life (like our Sun) and replicate it in their sketch. Although this won’t make the material emit the light itself, they can easily use other methods (like pointLight()
in the case of Sun).
Implementation-
This won’t change any previous method, and would add a new object in p5 object. Also, the light shaders need to be modified.