Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Ambient Lighting in TV_LIGHTING_BUMPMAPPING_TANGENTSPACE mode  (Read 3767 times)
harikumar001
Customers
Community Member
*****
Posts: 65


« on: February 22, 2011, 02:19:17 AM »

Hey guys,

Wanted to do Managed Lighting in my application but some of my meshes use Normal Maps which wont work in Managed Lighting mode. I have to use TV_LIGHTING_BUMPMAPPING_TANGENTSPACE for normal mapping to work.

But the problem is that when I change to TV_LIGHTING_BUMPMAPPING_TANGENTSPACE mode, my scene goes dark. I am using a directional light for my scene and given are the material settings:

IDMat = Mats.CreateMaterial();
Mats.SetAmbient(IDMat, 0.3f,0.3f,0.3f,1);
Mats.SetDiffuse(IDMat, 1.0f,1.0f,1.0f,1);
Mats.SetSpecular(IDMat, 0.2f,0.2f,0.2f,1);
Mats.SetPower(IDMat, 20);
Mats.SetEmissive(IDMat, 0.0f,0.0f,0.0f,1);

IDLight = Lights.CreateDirectionalLight(new TV_3DVECTOR(-1, -1, 1), 1, 1, 1, "RoomLight", 1);
Lights.SetSpecularLighting(true);

This works fine if I am in Managed Lighting Mode but not in TV_LIGHTING_BUMPMAPPING_TANGENTSPACE mode. Any pointers?

Regards
Logged
asia
Customers
Community Member
*****
Posts: 183


« Reply #1 on: February 22, 2011, 09:59:45 AM »

I do not see any mesh with setmaterial and setlightingmode...
Logged

Fabio Musmeci
ENEA
CR Casaccia
Via Anguillarese 301
00060 Rome
Italy
musmeci@enea.it
+39 3333934898
Learning to live better on a smaller footprint..
harikumar001
Customers
Community Member
*****
Posts: 65


« Reply #2 on: February 24, 2011, 12:17:16 AM »

Thanks asiaI have set the same material and lighting mode to TV_LIGHTING_BUMPMAPPING_TANGENTSPACE for all my meshes.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks