Adding lightmap and bumpmap
Hello,
I'm trying to add a light map and a bump map from 3ds Max into Vizard by using osgb. My light map is not displayed in vizard, but it is included as a texture. If i am using a complete map it is working, but then the resolution is not very good. Can anyone help me? Thanks in advance |
What do you have set for the target map slot? Can you attach screenshots of the OSG export settings?
|
1 Attachment(s)
The target map slot for my lighting map is self-illumination.
|
Hi Stakkie,
To fully take advantage of shaders (to use the modern workflow diffuse/spec/normals/etc.) you'll want to be using the vizfx workflow. For this workflow, the lightmap should go in the Ambient slot. The Self-Illumination slot is currently used for glow maps. Check out this reference to see what is supported: http://docs.worldviz.com/vizard/Shaders_3DS_Max.htm For the programming side of things, the main difference is adding a model with vizfx.addChild('model.osgb') instead of using viz.add('model.osgb'). The old workflow is mainly useful when performance is considered more important than aesthetics, such as with unoptimized multi-million polygon architecture models. |
Thanks for your comment, I'll try that!!
|
2 Attachment(s)
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). |
Exposure Sample Script
1 Attachment(s)
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 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 |
Thanks!!! Now it looks very good :D
|
No problem! Glad to help.
|
Just two more questions.
What would be the workflow in 3ds max to get the right lightmaps? What would be the best way to change the brightness of the render-to-texture textures in 3ds max? I tried to view my model on the htc vive. But if the line Code:
vizfx.postprocess.getEffectManager().setPixelFormat(viz.TEX_RGB_32) |
> What would be the workflow in 3ds max to get the right lightmaps? What would be the best way to change the brightness of the render-to-texture textures in 3ds max?
The cleanest results come from rebaking, but that's way too slow for minor tweaks. First of all, here's our internal workflow when baking:
Prior to using shader based exposure controls, we'd do minor exposure tweaks in photoshop. We'd make a copy of the baked folder (usually called "bake_mod") to keep the originals intact and run the whole thing though a Photoshop batch process. Anything more than that and you get the same kinds of artifacts you get from trying to do major exposure changes in 8-bit. I'm going to look into the Vive problem and see if I can reproduce the issue.
Other notes: True GI is super slow to render cleanly, so most of the time I'll fake GI by setting VRayDirt as the intensity of a VRayAmbient Light and supplement it with appropriately placed point lights. If I'm planning to use realtime lights in the scene I'll also use the same approach to provide a base level of ambient light and. |
Bad news: I reproduced the problem and talked to our Vizard programmer and he believes that the Vive itself doesn't currently work with 32-bit, and at the time of this post there doesn't appear to be a quick one-line-of-code way to just briefly switch back to 8-bit just before sending the data to the headset.
8-bit exposure works, with the limitations stated above, but you may be stuck rebaking on this one. |
All times are GMT -7. The time now is 01:24 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC