I use blender to export a OBJ file and mtl file. The content of mtl file: # Blen
ID: 3886127 • Letter: I
Question
I use blender to export a OBJ file and mtl file. The content of mtl file:
# Blender MTL File: 'None'
# Material Count: 2
newmtl board
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.304212 0.020880
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
newmtl wall
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 5.600001 0.227508 0.492209
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
How can i calculate the rgb of these two objects? I only change the color by changing the diffuse rgb in blender.
Cube wall wall board wall F $ Surface Wire Volume Halo Preview Diffuse Lambert Inten: 0.800RampExplanation / Answer
Following are the three illumination models and respective formulae for calculating rgb value:
1. Constant color illumination model.
color = Kd
2. Diffuse illumination model using Lambertian shading. There are two terms in this equation,ambient and diffuse shading terms. Second term is for each light source.
color = KaIa + Kd { SUM j=1..ls, (N * Lj)Ij }
3. Diffuse and specular illumination model. Similar to above formula there are two terms in this equation, ambient and a diffuse and specular shading term. Second term is for each light source. The formula is:
color = KaIa + Kd { SUM j=1..ls, (N*Lj)Ij } + Ks { SUM j=1..ls, ((H*Hj)^Ns)Ij }
where,
L = unit light vector
V = unit view vector
N = unit surface normal
H = unit vector bisector between L and V
Ia = ambient light
Ka = ambient reflectance
Kd = diffuse reflectance
Ks = specular reflectance
Ij = intensity of light j
Since you change the color by changing only diffuse rgb, use formula given in 2 to calculate rgb value.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.