Archive for November, 2008

Back online and ready to rumble.

|

Just a fast note that i am back online and working on Agile3D, i got my hands on a new notebook and settled down in LA. So you can expect some updates soon, i am guessing this weekend but who knows. I am currently still working on the scene/object/texture interactivity which is without a doubt one of the must have features as far as i see it.

Btw if anyone is reading this at all, even though i doubt that, just drop me a line whats the most wanted feature in Flash 3D engine? Is there something that is missing in the current engines that would be nice to have implemented? Nothing is impossible lets push the boundaries together ;)

sHTiF’s business trip to LA

|

As it seems we will have some delays on any updates in near future. The reason is that tomorrow I am leaving for a business trip to Los Angeles and will be back week before Christmas. Its quite a long way from Slovakia, so when I get lost somewhere in Frankfurt the delay may be even longer than anticipated, hopefully not ;)

The reason for the trip is that I am going to check the main office in Pasadena. Nope its not my main office :) its an office of a firm I work for as a Flash lead developer. Yes we are kind of spread one office in LA and second one in Bratislava. Dont tell me, I know all about the hassle to work with 9 hours time difference between offices ;)

The other problem I need to mention is that I am not taking my notebook with me, I plan on buying one there since the price difference is huge. But again this may take a while till I buy one and get to work on Agile3D (or any other projects).

So wish me luck.
Thx

PS: Maybe some of the other Flash-CORE team members will take an initiative and make some progress and post about it. I wish… ;)

Agile3D new ShaderTexture

|

Another update is here, this time its new type of texture ShaderTexture. It uses the new Flash10 shaders to generate bitmap data, input dependencies structure is not yet final, still working out the details and pros/cons of each.

Anyway i made a demo of this new feature using one of our own shaders Double Plasma which you may have already seen in Adobe’s Pixel Bender filter gallery made by Flash-CORE team member Cifko, actually it is plasma algorithm from one of our first demos Phoby which ended up 3rd at the Fiasko demoparty in 1999. Nostalgic indeed :)

At this time i didn’t do any optimization except some of the obvious ones, so the speed may be greater in the future. Here is a simple demo, just a room with shader texture on every wall and camera has fov of 135, you can ofcourse change the fov during runtime as well, its trippy enjoy ;)

View Demo: DEMO

Agile3D polygon pipeline

|

I know i said i will be posting about scene/object/texture interactivity and don’t worry i will soon but not yet. I reprogrammed the Agile3D pipeline this weekend from triangle based to polygon based. As you already know i already did visibility checking using polygons as mentioned in my Advanced frustum clipping demo and even back then i was playing with an idea to do the whole pipeline using polygons instead of limiting myself to triangles.

And I did it, finally this weekend i refactored geom classes to support any number of vertices as well as normals and uvts. That was the easy part, the tricky part was to rebuild BSP algorithms to work with polygons anyway its working now, another mile step for Agile3D.

Its hard to do a demo for this feature since at the end of the pipeline you need to triangulate anyway since you always render using triangles so its not visible. Anyway this following demo is using polygon pipeline, only proof that this demo uses quads instead of triangles is when using full frustum clipping and going around :).

Of course pipeline now supports any convex polygons not just quads, the only minor problem now is that our IXFExporter doesn’t support export of nontriangle geometry yet, thats why i modified IXF used in this demo manually ;)

View Demo: DEMO

Speeding up display object stacks

|

I am still in the middle of adding object/face/material interactivity into the Agile3D although the idea and even the implementation is pretty easy as you already know i am too much of an optimization freak to go with the first implementation.

Soon i will be posting all the research i did in this subject but i wanted to write some of the things i discovered on display object stacking that will be further used in the forementioned post. During face rendering in normal conditions, meaning interactivity is disabled, we render all the triangles inside one graphics instance there is not much display objects in this scenario actually there is only one so not a problem. But once we decide to enable interactivity first thing that comes to mind is making each face a separate display object instance for easier manipulation. There are other options than creating multiple display objects but i will talk about those in the next post.

First lets look at the type of display object, logically we’ll start with Sprite since it extends InteractiveObject and therefore supports mouse events. However this is also the slowest option, creating even small number of Sprites will drop framerate noticeably even without any interactivity and once you start moving over them with the mouse the framerate drop will go further due to event processing. The only other option seems to be Shape, its faster since its not an InteractiveObject and also it consumes way less memory than Sprites mainly due not being a DisplayObjectContainer however since shapes don’t support mouse events directly you will need to find other solution for handling those, i will be talking on this topic in the next post.

Next we need to play with the method how to stack em. There were not many options how to do that again we are stuck with two. Majority of people use addChild which seems the most logical and also the fastest way to add display objects. Surprisingly it isn’t, i did a couple of tests outside of Agile3D as well as within Agile3D and discovered that the 2nd option is way faster. I am talking about addChildAt which seems to be almost 2-2.5 times faster than addChild. The only problem is that we must be adding children in reverse order since we will be using addChildAt(child, 0) which adds child at the beginning of the array instead of the end.

Thats all folks, as i said there will be future posts maybe even more than one about mouse interactivity in 3D scene. But since this post was about stacking display objects in general and affects everybody that wants to optimize his display tree handling, i decided to post it separately.