Smoothed falloff on PointLight

Software: Away3D 4.x

OrtOfOn, Newbie
Posted: 13 September 2011 08:51 PM   Total Posts: 9

I always wanted to do this with Away3D 4.x
In fact, I though it was possible… but it is not at this state.

The idea:

Render a “gradient” falloff of a PointLight… like in the demo below:

http://blog.aerys.in/2011/09/04/gravity-demo/

For the moment, on a terrain for example, or a plane, the pointlight falloff is straight and has no attenuation on its edge… which is not very realistic.

Cheers

Q.

   

Mr Margaret Scratcher, Sr. Member
Posted: 14 September 2011 03:07 AM   Total Posts: 344   [ # 1 ]

That’s a nice demo.. Not seen much of Minko before..

   

Avatar
theMightyAtom, Sr. Member
Posted: 14 September 2011 11:00 AM   Total Posts: 669   [ # 2 ]

I discovered a way of doing this, quite by accident when making this demo
http://videometry.net/atomizer/atomizerTest.html

After you’ve created your light, try adjusting the falloff gradually.
For some reason you get a nice soft gradient. It’s probably due to a bug, but it’s one of the more useful ones smile

_light.fallOff 300;

// and then in a looping function...

if (_light.fallOff 420{
    _light
.fallOff += 10;
   

I run this code in a loop after the whole scene is initialised.
Doesn’t give you quite the control displayed in the nice demo you posted, but it will give you soft edges on a pointLight in a scene.

Good luck!

 

   

OrtOfOn, Newbie
Posted: 14 September 2011 12:30 PM   Total Posts: 9   [ # 3 ]

Mmmh, that seems to work nicely. Good bug, indeed smile

BTW, your curtain effect is splendid.
You’re playing with normalmaps to get this? Modifying their bitmapData in real time? Or I’m completely wrong?

You have to plan a AS3 Apex plugin for Away3D 4.x, lol
http://developer.nvidia.com/apex-clothing

Thx for the trick!

 

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 14 September 2011 01:05 PM   Total Posts: 669   [ # 4 ]

Completely wrong smile
This is actual vertex animation with autoNormals built into Away3D.

Apex? Maybe one day…. looks totally sick! Nice one

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X