Dyamic Objects dont get approximate light on WP7

rated by 0 users
This post has 6 Replies | 3 Followers

Top 500 Contributor
Posts 12
SunBurn_Community_Licensee
Imran Shafiq Posted: 06-04-2012 4:53 PM

All lights are set to "light mapped" in editor.

All scene static models are set to receive lightmapped. light map caches are generated properly and the scene looks nice on WP7.

Some models are added in code "player controlled vehicles". there StaticLightType is set to Composite and their UpdateType is Automatic.

It doesnt look like any approximate lighting is happening.

Are there any pre-requisites as far as FBX model is concerned for it to receive approximate lighting? Since I do realize a difference .. in the static scene objects i do have diffuse textures as well as normal,  specular .. (materials tab).. but when I load fbx model directly (generated from blender).. I dont think all that material stuff happens.

 

There is alightmapping sample available here but it only has static scene objects.. is it possible to get that sample updated with just a cube model loaded and approximate lighted?

That will really help with these types of questions.

 

Top 500 Contributor
Posts 12
SunBurn_Community_Licensee

Can someone please help with this issue? I put my vehicles directly in the scene editor and try both lightmapped and approximate light on them in editor and they look pretty bright, the way i want them to look. But if I add these models in code (using SceneObject derived class) LIghtingType set to Composite and Update set to Automatic but they look dark, i can see the diffuse texture on the models but its way dark.

Top 10 Contributor
Posts 5,368
Employee
SunBurn_Studio_Licensee

Hi Imran,

I posted info in your other thread: "All models can receive composite lighting, just make sure to set the object's static lighting type to composite / approximate."

Are you not seeing this behavior?

Let me know if this helps!

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Top 500 Contributor
Posts 12
SunBurn_Community_Licensee

As I stated above, its not working. It does work in the editor if i statically put the model in the scene and set the sceneobject staticlightingtype to approximate or lightmapped - the model looks bright as I would expect, but from code it doesnt. :(

Top 10 Contributor
Posts 5,368
Employee
SunBurn_Studio_Licensee

Hi Imran,

Are you using the same model both when adding through the editor and adding through code?  It sounds like the model included via the XNA content project may not be using the SunBurn model processor.

Let me know if this helps!

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Top 500 Contributor
Posts 12
SunBurn_Community_Licensee

Ahh, I feel very stupid now.. so here is the thing, I have

  1. Model - XNA Processor
  2. Model - XNA Processor (For SunBurn)
  3. Model - SUnBurn Deferred Lighting System
  4. Model - SunBurn Lighting System

I did know that deferred is not for WP7 but I had chosen no. 2. I somehow had missed no. 4. So now that I use no. 4 , it is working .. Thank you so much for your promt responses with this. But do you know what the no. 2 is all about - where did that come from?  Is it because I had installed sunburn free framework before i purchased the Pro version.

Top 25 Contributor
Posts 304
SunBurn_Community_Licensee

The "XNA Processor (for SunBurn)" is what you'd usually want to use for models like skyboxes that will be rendered outside of the SunBurn lighting effects.

It's basically the SunBurn friendly version of the normal XNA Processor.

Page 1 of 1 (7 items) | RSS