Crystal Space
Welcome, Guest. Please login or register.
April 20, 2014, 01:46:23 am

Login with username, password and session length
Search:     Advanced search
8990 Posts in 2037 Topics by 7597 Members
Latest Member: Drukareczka1989
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  bumbmap lighting error
« previous next »
Pages: [1] Print
Author Topic: bumbmap lighting error  (Read 1911 times)
SkyFox
Newbie
*
Posts: 47


View Profile Email
« on: November 04, 2007, 08:44:13 pm »

Crystalspace 1.2
blender2crystal 6.0 rc2

Hello everybody, I have a mystery.

I'm using the shadowed renderloop in a mapfile I have created with blender2crystal. The map contains five meshes with bumbmap shader, like the image below and one mesh with paralax shader, like shown below.

When I run the map in the walktest, it runs just fine. However, when I run it in my own app like this:

  vfs->ChDir ("/lev/simple");
  if (!loader->LoadMapFile ("world")) ReportError("Error couldn't load level!");

then on runtime I get the warning:

crystalspace.engine.warning:
Couldn't load cached lighting for 6 object(s). Use ~relight to calculate lighting.

To the map itself I can't see any rendering differences. It's just annoying having the warning everytime I do a test run.

If anyone sees directly what I'm doing wrong, I'd be happy to hear.


* bumb.JPG (9.94 KB, 278x179 - viewed 254 times.)

* para.JPG (9.13 KB, 223x199 - viewed 251 times.)
« Last Edit: November 04, 2007, 10:43:25 pm by SkyFox » Logged
jorrit
Administrator
Hero Member
*****
Posts: 1704


View Profile
« Reply #1 on: November 05, 2007, 08:28:13 am »

Crystalspace 1.2
blender2crystal 6.0 rc2

Hello everybody, I have a mystery.

I'm using the shadowed renderloop in a mapfile I have created with blender2crystal. The map contains five meshes with bumbmap shader, like the image below and one mesh with paralax shader, like shown below.

When I run the map in the walktest, it runs just fine. However, when I run it in my own app like this:

  vfs->ChDir ("/lev/simple");
  if (!loader->LoadMapFile ("world")) ReportError("Error couldn't load level!");

then on runtime I get the warning:

crystalspace.engine.warning:
Couldn't load cached lighting for 6 object(s). Use ~relight to calculate lighting.

Why would you be doing something wrong? To avoid that warning just do as it says. i.e. use -relight.

Greetings,
Logged
SkyFox
Newbie
*
Posts: 47


View Profile Email
« Reply #2 on: November 05, 2007, 12:51:37 pm »

Ow I thought the warning meant that the engine was automaticly using ~Relight, because the shaders were wrong or something. I didn't realise it was an instruction.

Thanks! But how do I use ~Relight. It's not clear to me what that is. Is it some modification for the map file, or should it be done at runtime? If it should be done at runtime I'd like to have a way to get ~relight done automaticly when the application runs.
« Last Edit: November 05, 2007, 01:05:25 pm by SkyFox » Logged
jorrit
Administrator
Hero Member
*****
Posts: 1704


View Profile
« Reply #3 on: November 05, 2007, 02:30:59 pm »

It is '-relight' and not '~relight'. Also it is usually done on the commandline. You can avoid using it by having engine->SetLightingCacheMode(0) in the code right before engine->Prepare().

Greetings,
Logged
SkyFox
Newbie
*
Posts: 47


View Profile Email
« Reply #4 on: November 06, 2007, 04:56:24 pm »

OK I disabled the lighting cache and now there's no more warning message.

Thanks!
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.525 seconds with 16 queries.