Register overflow!

Software: Away3D 4.x

Biegzie, Jr. Member
Posted: 19 June 2012 07:20 AM   Total Posts: 39

Register overflow!

After the 10th lightpoint i get this error. Does anyone know why and how to solve it?

at RegisterPool/requestFreeVectorReg()[/Users/robbateman/Documents/Adobe Flash Builder 4.6/away3d-core-fp11/src/away3d/materials/utils/RegisterPool.as:46]

   

Biegzie, Jr. Member
Posted: 19 June 2012 01:08 PM   Total Posts: 39   [ # 1 ]

No one with the same problem? You guys can put 100 pointlights on a mesh?

   

Avatar
Matse, Sr. Member
Posted: 19 June 2012 01:48 PM   Total Posts: 149   [ # 2 ]

I don’t think anyone can put more than 3 lights “on a mesh”, since LightPicker will only allow 3.

Lights are (very) expensive, so one tries to keep their number as low as possible, what are you trying to achieve ?

   

Biegzie, Jr. Member
Posted: 19 June 2012 03:28 PM   Total Posts: 39   [ # 3 ]

I’m still doing 60 fps ... so no problem with that :-D

I have a plane with some 3d objects on it, I want a lamp over each object… and the plane (floor) should illumunate as well on each place..

   

Avatar
Matse, Sr. Member
Posted: 19 June 2012 03:37 PM   Total Posts: 149   [ # 4 ]

Hehe yeah, probably because you don’t have much geometry yet, but as a rule of thumb lights should be kept to a minimum and replaced with other techniques whenever possible. I’ll let away3D team members speak about the register overflow thing though wink

What you describe can be achieved using lightmaps, although those are a bit tricky to get in for now since they require secondary UV coords and no export format supports that. I would probably try with TextureProjectors first : not sure if that’s the best available, but that should work. I think I saw some examples on the forum some time ago so you might want to do a search on that term.

   

Shegl, Sr. Member
Posted: 19 June 2012 08:58 PM   Total Posts: 134   [ # 5 ]

Matse yes 3 light per object but we use this much more effective when dynamicly remove or replace the light then they passing all other the scene with many of light sources.. And I have troubles with > 10 lights too..

   

Avatar
Matse, Sr. Member
Posted: 20 June 2012 08:58 AM   Total Posts: 149   [ # 6 ]

I’m not arguing the 10+ lights issue Shegl wink

If you’re never using more than 10 at the same time then you can use a pool : position them and add them to LightPicker(s) only when you need them.

Still, whenever possible you should avoid using lights and go for other methods.

   

Richard Olsson, Administrator
Posted: 20 June 2012 06:22 PM   Total Posts: 1192   [ # 7 ]

The register overflow is most likely caused by trying to use too many lights at the same time. I’ve almost never needed more than two lights on a single material. If your scene consists of a large amount of planes that each has a single light over them, consider using a unique material for each plane, although that can of course lead to performance issues as well (depending on the number of planes.)

Also consider whether you really need dynamic lighting at all. Are the lights static with regards to the planes? Maybe you can just use a 3D program to bake the light into the texture of the planes.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X