#1
|
|||
|
|||
switch off self-illuminating effects of baked textures
Hi,
How do I switch off the self-illumination of a texture? I created four corridor models in 3ds max. The corridors only differ in lighting conditions, i.e., each corridor has lighter and darker sections but apart from that they are all the same. I baked the textures in 3ds max and exported each model to OSGB format. I did not export the lights. The exports look fine in the Vizard Inspector. I then load the models in Vizard. They are all located in the same coordinates with the same orientation. I switch visibility on and off according to how I need, using: Code:
models['cooridor1'].visible(viz.OFF) models['cooridor2'].visible(viz.OFF) models['cooridor3'].visible(viz.OFF) models['cooridor4'].visible(viz.OFF) Code:
models['cooridor1'].visible(viz.ON) models['cooridor2'].visible(viz.ON) models['cooridor3'].visible(viz.ON) models['cooridor4'].visible(viz.ON) This did not do the trick: Code:
models['cooridor1'].disable(viz.LIGHTING) |
#2
|
|||
|
|||
additional information
things I have tried that did not work:
Thanks again! Happy for any idea or advice. |
#3
|
|||
|
|||
Quick update:
The models use the same naming conventions (for nodes and textures). It appears that the textures of whichever corridor is loaded first are applied to all other corridors. Any suggestions to change that without having to rename all nodes and texture names in 3ds max? |
#4
|
|||
|
|||
Quick update:
Placing all models in unique folders and exporting the textures to a subfolder did not help. I am using Vizard 5. |
#5
|
|||
|
|||
If you load one of the corridor models and turn off it's visibility is the scene dark?
Code:
import viz viz.go() model = viz.addChild('corridor1.osgb') model.visible(viz.OFF) |
#6
|
|||
|
|||
Hi Jeff,
Thanks, yes the scene is dark when I turn off the models' visibility. I figured out that it was indeed an issue with the textures. Here are some code snippets (note that I changed the names of the corridors to 't_node_'): Code:
#load the corridor models models['t_node_l0r0'] = viz.add('Models/T_node_l0r0/T_node_l0r0.OSGB') models['t_node_l1r0'] = viz.add('Models/T_node_l1r0/T_node_l1r0.OSGB') models['t_node_l0r1'] = viz.add('Models/T_node_l0r1/T_node_l0r1.OSGB') models['t_node_l1r1'] = viz.add('Models/T_node_l1r1/T_node_l1r1.OSGB') #switch off visibility models['t_node_l1r1'].visible(viz.OFF) models['t_node_l1r0'].visible(viz.OFF) models['t_node_l0r1'].visible(viz.OFF) models['t_node_l0r0'].visible(viz.OFF) # Turn on corridor according to conditions if (cur_trial[0] == 1) and (cur_trial[1] == 1): models['t_node_l1r1'].visible(viz.ON) print 'all lights on' elif (cur_trial[0] == 1) and (cur_trial[1] == 0): models['t_node_l1r0'].visible(viz.ON) print 'left lights on' elif (cur_trial[0] == 0) and (cur_trial[1] == 1): models['t_node_l0r1'].visible(viz.ON) print 'right lights on' elif (cur_trial[0] == 0) and (cur_trial[1] == 0): models['t_node_l0r0'].visible(viz.ON) print 'all lights off' If I don't rename the textures, all 4 corridors will have identical textures (the texture of the model that is being loaded first). Each model is saved in a separate folder and contains a subfolder with the textures. Thanks! |
#7
|
|||
|
|||
I've just done something similar. A model I made in Max should be exported for use in another program. Most of my materials we're build procedurally and therefore I needed to turn them into bitmaps, without baking any light information. I simply used the "Render Map" function. In the material editor (compact) you go down to the map level, right click in the material slot and select "Render Map". Now you specify the output name, destination, file type and size, and then the map is rendered. Pure 2D.
Hope it helps. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OSG IVE export 3dmax with baked textures | chris_user | Vizard | 2 | 04-12-2011 10:33 PM |
Multiple Textures for Diffuse and Specularity Shader Issue | shivanangel | Vizard | 1 | 05-11-2009 10:44 AM |