View Single Post
  #1  
Old 07-02-2019, 05:06 PM
seowen1 seowen1 is offline
Member
 
Join Date: May 2017
Posts: 17
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)
I can't seem to see the environment map at all, and I'm not sure I'm going about it correctly. I can create a basic sphere object and follow this tutorial:
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?
Reply With Quote