diff options
author | Ton Roosendaal <ton@blender.org> | 2003-12-30 21:03:37 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-12-30 21:03:37 +0300 |
commit | d8b21b01c38bf2b7007458c221b2c1685d766cfd (patch) | |
tree | d4001fd3c914f10602ec095341307f64569a4941 /source/blender/src | |
parent | 6c80064ab7e0ea1e5ec9b5a164db08497a94ccf4 (diff) |
Added improved exposure calculation
- based at 1.0-exp(-color) trick in Yafray. But to guarantee backwards
compatibility, and some more control, Stefano Selleri hacked a useful
formula for it.
- We now have 2 values to set:
- "exp": the exponential correction value (0-1)
- "range": the light range that maps on color 1.0 (0-5)
- Using exp(x) (is e^x) we can much better prevent overflows from render,
which are currently hard-clipped in Blender. Setting a small 'exp' value
wil efficiently smooth out high energy and map that back to a color for
display.
- total formula:
newcol= linfac*(1.0-exp(col*logfac))
col, newcol are colors
linfac= 1.0 + 1.0/((2.0*wrld.exp +0.5)^10)
logfac= log( (linfac-1.0)/linfac )/wrld.range
wrld.exp and wrld.range are the button values
- default setting: exp=0.0 and range=1.0 give results extremely close to
previous rendering.
- graph: http://www.selleri.org/Blender/buffer/Image1.png for 'exp' setting
ranging from 0-1, and with 'range'=2
Thanks Stefano for the help!
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/buttons_shading.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 65d5dcadf2a..fa3428e0f5f 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -1531,8 +1531,9 @@ static void world_panel_mistaph(World *wrld) uiSetButLock(wrld->id.lib!=0, "Can't edit library data"); - uiDefBut(block, MENU|SHO, 1, "Physics %t|None %x1|Sumo %x2|ODE %x3 |Dynamo %x4|", - 10,180,140,19, &wrld->pad1, 0, 0, 0, 0, "Physics Engine"); + /* disabled, pad1 should not be used even! */ + // uiDefBut(block, MENU|SHO, 1, "Physics %t|None %x1|Sumo %x2|ODE %x3 |Dynamo %x4|", + // 10,180,140,19, &wrld->pad1, 0, 0, 0, 0, "Physics Engine"); /* Gravitation for the game worlds */ uiDefButF(block, NUMSLI,0, "Grav ", 150,180,150,19, &(wrld->gravity), 0.0, 25.0, 0, 0, "Sets the gravitation constant of the game world"); @@ -1602,9 +1603,11 @@ static void world_panel_world(World *wrld) uiDefButF(block, NUMSLI,B_MATPRV,"AmbR ", 10,50,145,19, &(wrld->ambr), 0.0, 1.0 ,0,0, "Sets the amount of red ambient colour"); uiDefButF(block, NUMSLI,B_MATPRV,"AmbG ", 10,30,145,19, &(wrld->ambg), 0.0, 1.0 ,0,0, "Sets the amount of green ambient colour"); uiDefButF(block, NUMSLI,B_MATPRV,"AmbB ", 10,10,145,19, &(wrld->ambb), 0.0, 1.0 ,0,0, "Sets the amount of blue ambient colour"); - uiBlockEndAlign(block); - uiDefButF(block, NUMSLI,0, "Expos ", 160,10,145,19, &(wrld->exposure), 0.2, 5.0, 0, 0, "Sets the lighting time and exposure"); + uiBlockBeginAlign(block); + uiBlockSetCol(block, TH_BUT_SETTING1); + uiDefButF(block, NUMSLI,0, "Exp ", 160,30,145,19, &(wrld->exposure), 0.0, 1.0, 0, 2, "Sets amount of exponential color correction for light"); + uiDefButF(block, NUMSLI,0, "Range ", 160,10,145,19, &(wrld->range), 0.2, 5.0, 0, 2, "Sets the color amount that will be mapped on color 1.0"); } |