(Gold) Texture isn’t visible if alphaBlending=true

Software: Away3D 4.x

Richard Olsson, Administrator
Posted: 18 July 2012 06:21 PM   Total Posts: 1192   [ # 16 ]

GiGBiG. We’re talking to RIPI in this thread, although you are of course free to test the latest codebase as well. However, lets keep your issue separate, in the dedicated thread at http://away3d.com/forum/viewthread/2841/

 

   

RIPI, Jr. Member
Posted: 18 July 2012 08:28 PM   Total Posts: 33   [ # 17 ]

I will try the proposed solution tomorrow (because in germany it’s half past ten ;P). The preMultiply=false didn’t change anything… And i’m unfortunately not allowed to share the swf as it’s client work and it’s already branded and bla bla, but… i DON’T think that THIS will be the first issue, that couldn’t be solved wink

I will report back tomorrow and try different things.. but, for now, thank you and have a nice evening! wink

 

   

RIPI, Jr. Member
Posted: 19 July 2012 07:57 AM   Total Posts: 33   [ # 18 ]

Good morning!

i downloaded the dev branch – but unfortunately it didn’t change anything. But i found out, that i had a incorrect assumption of my scene: the RollOver-Plane (white outline) was on the SAME position as the Plane with the Person-Texture. I’ve changed it to z+1 and now the texture of the person is displayed better. But the shadows seem, as if they get cut off by the plane, as you can see in the attached screenshot.

 

   

Avatar
David Lenaerts, Administrator
Posted: 19 July 2012 09:31 AM   Total Posts: 80   [ # 19 ]

Hi,

I updated some things in dev, could you update it and test again?

Cheers,
David

 

   

RIPI, Jr. Member
Posted: 19 July 2012 10:04 AM   Total Posts: 33   [ # 20 ]

Yes! You are my hero of the day! wink
Do you have any idea where the perfomance-drop could come from? Without having changed anything the fps dropped from an average 55 to 25. I have a lot mouse-handling going on in the scene - every person has a mouseOver/mouseOut and a click-Listener also there is a listener on the stage to move the camera around in my crowd… so, you see, there is a lot going on wink it would be really great if you could give me a hint, what i could change, what i should check and so on… thank you!

 

   

Richard Olsson, Administrator
Posted: 19 July 2012 02:41 PM   Total Posts: 1192   [ # 21 ]

When did the performance drop happen?

 

   

RIPI, Jr. Member
Posted: 20 July 2012 07:25 AM   Total Posts: 33   [ # 22 ]

Actually, i’m not even really sure if the performance drop is related to away3d. the scene i’ve shown here has just ~300 triangles and it is less performant compared to the time, before i updated to Away3d Gold. But i have another scene with ~2500 triangles, lights, a lot of textures and it runs a lot smoother on the test-computers that i have here. In the scene with all the people there is a lot going on. I move the camera around, check, if the persons are in the visible area and if not, i reposition them, set their alpha depending from there position in a margin-area, all persons (100 meshes) have mouseListeners for rollOver, rollOut and Click, and every person has a different texture (which is assembled by a basic-outfit-texture and the photo of a user..) and every time a person leaves the visible area, a new texture (with a new photo) is assigned – so long term short: I think i have a lot of places where i could optimize my algorithms. My thought was, that (maybe) you’ve changed something inside Away3d that stresses the CPU more than in an earlier version… but probably it’s just my bad programming wink

 

   

RIPI, Jr. Member
Posted: 20 July 2012 09:18 AM   Total Posts: 33   [ # 23 ]

Okay, update: If the Mouse is not over the browser-window, everything runs at ultra smooth 55 fps average. Why didn’t i try this before..? -.-

 

   

Richard Olsson, Administrator
Posted: 20 July 2012 10:20 AM   Total Posts: 1192   [ # 24 ]

I still don’t understand when the performance drop happened. If it happened the moment you switched to Gold, and you didn’t make any other significant changes, then it sounds like the issue could be in Gold (or your use of it.) So I want to be able to rule that out.

Can you explain what mouse picking settings you are using on your objects (and for View3D.mousePicker.)

On a more general optimization note, you said before that you had an outline that would show up over the hovered user, am I right? You should really try to make those two objects the same object by flattening the outline into the texture. You can have two texture (or two halves of the same texture) where one has the outline and the other doesn’t, and switch between the two.

If my understanding of your project set-up is correct that would cut the number of alpha-blended (and thereby CPU-sorted) objects in half.

 

   

RIPI, Jr. Member
Posted: 20 July 2012 11:43 AM   Total Posts: 33   [ # 25 ]

yes, it was exactly that moment when i changed to Gold. I downloaded the new Away3D-Classes, replaced my old classes, and started it. The first problem was, that the mouse wasn’t working as it did before (errors…)- but, i found the solution fast.
in the progress of trying to get the project running i set the mousePicker for the View3D to SHADER – and that might be the problem. I set it to RAYCAST_BEST_HIT now, and the performance is smooth again. But at the current tim i didn’t put the mouse-functionality back into the app. (I focussed on the missing textures first)..
So for now: i will put my listeners back into the app and will take a look at the performance. and your optimization note sounds great – i definitely will do that! wink

 

   

Richard Olsson, Administrator
Posted: 20 July 2012 11:50 AM   Total Posts: 1192   [ # 26 ]

The SHADER picker can be slow on some hardware because it actually renders each object with a specific color, and then reads back the pixel under the mouse to see which object was hit (by interpreting the color.) That means both that it has to do one extra render pass (or even two if you want detailed information about the hit) as well as a GPU memory readback into main memory. The latter especially can be very slow on some hardware.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X