![]() |
|
|
|
#1
|
|||
|
|||
|
Hi Veleno,
Now my diffuse color is not showed in vizard anymore. What am I doing wrong? I also added my Slate Material Editor printscreen of 3DS Max, maybe that gives a more clear view of what i did (wrong). Last edited by stakkie; 01-13-2017 at 12:23 PM. |
|
#2
|
|||
|
|||
|
Nothing wrong with your setup - your scene is just over exposed. The default exposure looks something like Diffuse * (Lightmap * 2), where lightmap values are interpreted on a 0 to 1 scale (e.g. 255 in photoshop reads as 1.0 to Vizard). This means that a neutral exposure is 50% gray.
As long as none of your brights are clipped in your lightmap you shouldn't need to rebake - exposure can be adjusted in Vizard by using a post process shader, like this: Code:
import viz
import vizfx
viz.go()
vizfx.addChild('Exposure Test.OSGB')
# Disable the default light (directional light attached to user viewpoint).
# This should be done as soon as your scene has it's intended light added in.
viz.MainView.getHeadLight().disable()
# Import vizfx's post process functions,
# then specifically grab the ones for color adjustment.
import vizfx.postprocess
from vizfx.postprocess.color import ExposureEffect
# Create a new Exposure effect. In this case I'm darkening by 3 f-stops.
# If you aren't familiar with camera terms, going down by one f-stop
# halves the current brightness, while going up doubles it.
effect = ExposureEffect(-3)
# Add the effect to the post process manager
vizfx.postprocess.addEffect(effect)
# Important: set the pixel format to 32 bit.
# This prevents banding after re-exposure and prevents bright whites from being clipped.
# Exposure will not work as expected with overexposed scenes without this line.
vizfx.postprocess.getEffectManager().setPixelFormat(viz.TEX_RGB_32)
On a side note, lightmaps are treated as part of the lighting model in the vizfx shader so they are compatible with realtime lights. I've attached a sample file that adjusts the exposure on a test model, and you can learn more about Vizard's built in post-process shaders here: http://docs.worldviz.com/vizard/postprocess_color.htm Last edited by Veleno; 01-13-2017 at 01:56 PM. |
![]() |
| Tags |
| bump map, exposure, light map, osgb, shader, vizard |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|