Hello Bump Mapping Gurus, I've tried to use the dot3 bump mapping code from Alessandro Borges (a big THANK YOU!). After some small code corrections, I managed to get very nice bumps on my planets :-) However, there is still something that bothers me. When applying bump mappings, the ambient light is *completely* disabled. The only lights still in action are the point or directional lights. Is there anything wrong I'm making in the following code that have the net result of disabling the ambient light ?
javax.media.j3d.Texture tex = ResourceManager.loadTexture(getTextureURI()); javax.media.j3d.Texture bump = ResourceManager.loadTexture(getBumpURI()); TextureUnitState[] tus = new TextureUnitState[2]; TextureAttributes tb = new TextureAttributes(); tb.setTextureMode(TextureAttributes.COMBINE); tb.setCombineRgbMode(TextureAttributes.COMBINE_DOT3); tb.setCombineRgbScale(2); tb.setCombineRgbFunction(0,TextureAttributes.COMBINE_SRC_COLOR); tb.setCombineRgbFunction(1,TextureAttributes.COMBINE_SRC_COLOR); tb.setCombineRgbFunction(2,TextureAttributes.COMBINE_SRC_COLOR); tb.setCombineRgbSource(0,TextureAttributes.COMBINE_TEXTURE_COLOR); tb.setCombineRgbSource(1,TextureAttributes.COMBINE_PREVIOUS_TEXTURE_UNIT_STA TE); tb.setCombineRgbSource(2,TextureAttributes.COMBINE_OBJECT_COLOR); TextureAttributes tt = new TextureAttributes(); tt.setTextureMode(TextureAttributes.MODULATE); tus[1] = new TextureUnitState(tex, tt, null); tus[0] = new TextureUnitState(bump, tb, null); app.setTextureUnitState(tus); Thanks for any help, Florin =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".