Scene loader bug?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
SSG
Posts: 33
Joined: Sun Jan 11, 2009 1:16 pm

Scene loader bug?

Post by SSG »

Using IrrEdit 1.4.2 I created a simple scene with a B3D octree terrain and a sunset/sunrise implemented with a point light and flyCircleAnimator. I set the light's radius to 4000 and the flyCircleAnimator radius to 2000, so it stands to reason that the light will affect anything inside its orbit. This works fine in IrrEdit 1.4.2, but when I load the scene into an Irrlicht 1.5 app, the light's radius is very tiny.

At first I thought the light wasn't working at all, but because it rises/sets near the terrain's opposite edges, I was able to notice that the problem was that the light has a tiny radius, certainly not the 4000 radius I had set. I fixed this in the code by manually setting the radius to 4000, the same value I used in IrrEdit 1.4.2. Now it looked exactly the same as in IrrEdit.

IrrEdit 1.5 came out today so I loaded the scene. It had the same problem. Setting the light's radius has little effect. The only way I can light the scene properly is to tweak the light's quadratic (2nd) attenuation parameter.

Is it possible the scene loader in 1.5 is slightly broken? Perhaps the attenuation parameter is now overriding the radius whether it (attenuation) has been set or not.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

In 1.5 you have to set the radius using lightnode->setRadius instead of using the SLight structure.
SSG
Posts: 33
Joined: Sun Jan 11, 2009 1:16 pm

Post by SSG »

Thanks hybrid. This still points to either a scene loading bug and/or IrrEdit bug.
Post Reply