NormalMap (Bump map) in beta

Software: Away3D 4.x

Avatar
mrpinc, Sr. Member
Posted: 23 February 2012 03:50 PM   Total Posts: 119

I just upgraded my app from the alpha codebase to latest Beta codebase - it was not too bad but 1 problem has emerged.

I had a repeated texture that was using a normalmap (bumpmap) but it no longer works in the beta version.

My old code was pretty straightforward

_bitmapMaterial.normalMethod = new BasicNormalMethod();
_bitmapMaterial.normalMap b.bitmapData

My new code is:

_bitmapMaterial.normalMap = new BitmapTexture(b.bitmapData) ;
//_bitmapMaterial is an instance of TextureMaterial 

I’ve tried to add a light picker to the TextureMaterial along with ambient, specular values but still the material looks as if no bump is applied.

 

   

Avatar
Fabrice Closier, Administrator
Posted: 23 February 2012 04:14 PM   Total Posts: 1265   [ # 1 ]

I have just finished to add normalMaps+specularmaps for Prefab: all exports tested are working in beta…
test your light settings. if you have falloff set, ensure the object is within range. also check your ambient values. if they are at 1, it will not be very
obvious that a light is affecting your material

   

Avatar
mrpinc, Sr. Member
Posted: 23 February 2012 05:51 PM   Total Posts: 119   [ # 2 ]

Got it to work.

I was not handling the new LightPicker system properly and that’s why I was not seeing results. 

Thanks for the quick help

   

Leonid, Newbie
Posted: 16 March 2012 02:56 PM   Total Posts: 2   [ # 3 ]

mrpinc, I am facing the same problem. Could you please give some details on how you solved the issue?

What were the objects and the properties you had to tweak? What were the appropriate values?

Thank you in advance :)

   

Avatar
mrpinc, Sr. Member
Posted: 23 March 2012 01:52 PM   Total Posts: 119   [ # 4 ]

//Store your light picker somewhere - don’t create a new one every time you need to apply lights to materials
_lightPicker = new StaticLightPicker( _sceneLights );

_bumpedMaterial.normalMap = new BitmapTexture( bumpBitmapData );
_bumpedMaterial.lightPicker = _lightPIcker;

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X