-
Website
http://coderhump.com/ -
Original page
http://coderhump.com/archives/427 -
Subscribe
All Comments -
Community
-
Top Commenters
-
MightyCicero
1 comment · 1 points
-
Urieal
1 comment · 1 points
-
David Blake
1 comment · 1 points
-
millipo13
1 comment · 1 points
-
PapaRaven
1 comment · 1 points
-
-
Popular Threads
-
3D in Flash 10 & Git
2 weeks ago · 8 comments
-
3D in Flash 10 & Git
i'll try to port my "400 rotating squares" demo, which imo exposes Flash10 as a dog, to it tonight.
it's clearly the rasterization which is the issue. http://elenzil.com/flash/flash_5/oxeFlash5_norm...
but looking at the code, there is room for optimization
use Vector, not Array, this is a real boost in FP10
try also to use cacheAsBitmap, it speed up the rendering
other things to explore:
don't draw the 400 vector graphics on screen, keep them out of the display list,
copy them to a bitmapdata and just display that
(see for ex: http://www.bigspaceship.com/blog/labs/improving... )
i tried cacheAsBitmap as you suggested, but not much change (presuming i used it correctly - just shape.cacheAsBitmap = true ?)
i guess my fundamental take here is that rasterizing 400 rectangles should not be anywhere close to a bottleneck. i've got way more interesting things to do with my programming time than fight that.
compare, for example, to this demo which renders 1000 rotating bump-and-environment-mapped utah teapots (3783 triangles each) at 30 to 40+ FPS on the same exact machine, and barely bumps the CPU at all. and it uses javascript instead of actionscript, and there's no compilation step.
and technically it should be possible to make another branch of the code base and use tamarin as the running engine instead of v8 (agreed it's a lot of work, but definitively possible =))
So this is pretty much a hobby level trinket.
Seriously, though, what market are you targeting? Every cheap computer sold in the past few years has some sort of minimal 3d capable graphics chip on board. X300s are plenty to run O3D on, and even the Intel parts are capable enough to do it. Heck, even really terrible cards like S3s have SM2 support nowadays.
Certainly there are situations where you will want to go with something like Flash that requires no special hardware, but claiming that O3D is a "hobby level trinket" is like saying that Half Life 2 or Left 4 Dead was a "small success." The set of people that can run O3D, HL2, and L4D are basically identical.
Yeah - a lot of people have crappy 3d capable hardware (like the intel chips) but they DO have 3d capable hardware. O3D needs to get a path for those chips.
Blizzard, Sony, EA, etc seem to have tapped a hidden market full of computers with 3D cards not in a corporate environment. Maybe they're onto something.
the computation you can do on the GPU is pretty impressive these days (eg calculating julia sets, simple waves etc), but for really crunching data like in say a large gravity or fluid simulation i think you need a general-purpose CPU and i'm not sure that V8 or tamarin will really satisfy.
on another topic, what's the coolest O3D demo peeps have seen so far ?
has anyone used render targets + environment mapping do do dynamic reflections yet ? all the pieces are sorta just sitting there.