Crystal Space
Welcome, Guest. Please login or register.
September 02, 2014, 10:24:49 am

Login with username, password and session length
Search:     Advanced search
9009 Posts in 2043 Topics by 8376 Members
Latest Member: Al guzman
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Strange Light behavior
« previous next »
Pages: [1] Print
Author Topic: Strange Light behavior  (Read 2307 times)
Recon
Newbie
*
Posts: 24


View Profile
« on: September 29, 2006, 08:59:36 pm »

Hi,
   I created a light using

  csRef<iLight> light;
  iLightList* ll = room->GetLights ();

  light = engine->CreateLight(0, csVector3( 0, 0, 0), 1000000, csColor(1, 1, 1));
  ll->Add (light);

and created a bunch of sphere's using

csRef<iMeshWrapper> mesh (engine->CreateMeshWrapper (ballFact, "ball", room));

the sphere's are

   createsphere( "100000" , radius, center, "grid.jpg" , csVector3 (100000,0,0) );
   createsphere( "100250" , radius, center, "grid.jpg" , csVector3 (100250,0,0) );
   createsphere( "100500" , radius, center, "grid.jpg" , csVector3 (100500,0,0) );
   createsphere( "100700" , radius, center, "grid.jpg" , csVector3 (100700,0,0) );
   createsphere( "101000" , radius, center, "grid.jpg" , csVector3 (101000,0,0) );

   createsphere( "146000" , radius, center, "grid.jpg" , csVector3 (146000,0,0) );

The problem is that after the 100500 sphere the ligh only seems to work if camera can see the light.
say i am at 109000,0,0 looking at a sphere it's totaly black, but if i move the camera to 101100, 500, 0 and look back to 0,0,0 I can see the sphere.

is this expected behavior?


CS Rev 25428

regards
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: September 30, 2006, 10:24:08 am »

What version of CS? What renderloop and shaders?

Greetings,
Logged
Recon
Newbie
*
Posts: 24


View Profile
« Reply #2 on: September 30, 2006, 12:47:54 pm »

CS SVN REV: 25428
Renderloop ? Dont know, what exactly is the render loop?.
Shaders? Dont think i am using any shaders.

Sorry I cant give much info as i have not really gotten that far into CS. It's a very basic setup, Basicly Load a bunch of pluging and a nearly empty world XML file. then it adds the meshes and the light. The meshes are there and are easly seen if they are less that 100500 from the light.

I will try recreate the behavior using a simple XML world file and walktest and post it somewhere.

regards

Logged
Recon
Newbie
*
Posts: 24


View Profile
« Reply #3 on: September 30, 2006, 06:04:26 pm »

I created a world.zip file for walktest.

Get different problems but probably the same cause. I created a sphere and a plane at (0,0,0) and (0,100500,0) , the meshes at (0,0,0) work as expected, but the meshes at (0,100500,0) dont seem to be visiable or working with the collision detection.

File can be DL from

http://www.uploading.com/files/Z38R0FY5/world.zip.html

there are 2 camera positions, camera position works ok, camera2 and you are falling through darkness.

If some else  could try this out and see if it's a local problem or something more general I would be very happy Smiley

Regards


Logged
bookeater
Newbie
*
Posts: 7


View Profile WWW Email
« Reply #4 on: September 30, 2006, 07:12:39 pm »

why are you using numbers like 100000+, isn't that considered big, possibly too big?
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 6.233 seconds with 16 queries.