|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
Adding environment reflection maps to imported objects with baked lighting
Hello,
I have some objects that I would like to add environment reflection maps to OSGB imported objects that have baked lighting. I have no issue baking lighting into a shell material and exporting into Vizard as an OSGB from 3ds Max. My problem comes when I attempt to apply a reflection map dynamically to the object via scripting. Here's my attempt: Code:
self.cubemaps = [] self.cubemaps.append(viz.addEnvironmentMap('Environments\\HangarCubemap\\HangarCubemap0.png')) def addCubemapToVizObject(self, target, level=0): if level < range(len(self.cubemaps)): target.enable(viz.BLEND) target.enable(viz.LIGHTING) target.specular([1,1,1]) target.texture(self.cubemaps[level], unit=1) target.appearance(viz.ENVIRONMENT_MAP, unit=1) target.texblend(0.5, unit=1) https://docs.worldviz.com/vizard/lat...al_mapping.htm That achieves expected results, but something is different when I start playing with imported objects. Any help? |
#2
|
|||
|
|||
Take a look at the Reflection with Cube Maps page in the Vizard Help for instructions on adding the map in Max. To get the cube map to best match the Vizard scene, you can capture the map in Inspector rather than Max. See the Saving Cube Maps from Inspector article for more information.
Another option is the GLTF workflow in which cube maps are no longer considered a part of models, and instead are part of environments. This makes is so if you have many props, you don't have to do a new export for every environment you want to bring them into. |
#3
|
|||
|
|||
It seems like I'm aiming for the GLTF method then... but is there really not a way to just dynamically add a reflection map to an object via code?
|
Tags |
cubemap, environment, lighting, reflection, texturing |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
lighting and on-the-fly objects | michaelrepucci | Vizard | 12 | 02-11-2011 09:26 AM |
adding new objects | gina | Vizard | 4 | 11-29-2006 12:01 PM |