BloomFilter3D

Software: Away3D 4.x

Avatar
Kellsey, Newbie
Posted: 10 December 2011 09:46 PM   Total Posts: 3

Hello,

I’m trying to use a BloomFilter3D in my scene ( a planet system in space ).

The scene is composed of the following objects :

- A Sphere ( the sun ) at 0,0,0.

- A PointLight at 0,0,0 which is supposed to be the light of the sun.

- Different planets that are rotating around the sun.

- A Sky-Sphere with a texture of stars ( and a scale of -1 on x so that the texture is displayed inside the sphere ).

All works perfectly, except that when i zoom in the view ( using a HoverDragController ), the BloomFilter3D seems to work only on the bottom part of the scene ( so only half of the sun is “Bloomed” ).

( I posted a picture in attachement to halp visualise the problem ).

Here are the way i coded it :

// First the import
import away3d.filters.BloomFilter3D;

// My bloom in a private var
private var mon_flou:BloomFilter3D;

// after creating the view, i create the bloom
mon_flou = new BloomFilter3D(10,10,0,.75);

// apply the filter to the view
_view.filters3d [mon_flou];


// in an Enter_Frame, i try to update the bloomlike this
mon_flou.update(_view.stage3DProxy_view.camera);

// event tryed to re-apply it to the view
_view.filters3d [mon_flou];

// then i render ( still in the enter frame )
 
_view.render(); 

I tryed with Keyboard movements instead, but it was same, so it doesn’t come from the HoverDragController

changed manytimes the “threshold” parameter of the BloomFilter3D and seems it affects indeed the place of the bloom when i zoom ( more “threshold” = the part bloomed moves to bottom-right of the view ).

But i think it comes from the update. Seems it’s simply not updated because at firts, all screen is bloomed, the change comes onlywhen i move the camera.

Someone have an idea how to update filters in a good way ?
Thank you by advance!

Ps : Sorry for my bad English. surprised

 

   

Avatar
Kellsey, Newbie
Posted: 10 December 2011 10:33 PM   Total Posts: 3   [ # 1 ]

Just noticed something.. in fact the bloom effect is wrong at first frame
( even before the zooming ).

It starts from a little more than half the view, and it’s position remain still the same when i move around.

Also noticed a problem which may be linked, with the HooverDrag controller.
At first frame, my view is located below what it should be ( means my camera is at - 50 in Y for example, that’s why she is under the sun but she would normally be at same level ).

So i think the 2 problems comes from my view which is not well in middle, she has a kind of “margin-top” or so.

Any idea how to fix this ?

 

   

Avatar
Kellsey, Newbie
Posted: 11 December 2011 01:07 PM   Total Posts: 3   [ # 2 ]

Oke, i found out the reason my camera was below the normal angle.

It happends only when i give a rotation to the planets And am using the HoverdragController.
Without HoverdragController, planet rotation and camera are fine, but seems the Controller doesn’t like rotations on objects of the scene.

Here is how i create them and apply a rotation :

var planete:Planete = new Planete(mat_lumimesPlanetParams[i].nom,  mesPlanetParams[i].rotmesPlanetParams[i].distmesPlanetParams[i].taille);

 
planete.rotationY planete.rota 22// <== this line bug the cam position

    
 
_view.scene.addChild(planete); 

planete.rota is a public var of the class “Planete” which extends ObjectContainer3D, ( it’s only a rotation speed ).

The planets are all created at 0,0,0 but i give them a distance inside the class, so that i can handle rotation around the sun AND around themselves at same time.

Anyway, i don’t understand why planete.rotationY causes this bug with the HoverdragController ...

And the bloom is still wrong even with no rotations ( even with a camera at the right position ).

Anyone can save my day ? cheese

   

Dr Schizo, Newbie
Posted: 18 March 2012 10:15 PM   Total Posts: 11   [ # 3 ]

I’m working on exactly the same thing right now. Is it possible to see your source code, please? It will save me a lot of time. Of course, I will send you all the improvment I’ll do.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X