« Usability in 3d-based HID?
» FlatShadeMaterial.doubleSided does not seem to work as expected

3d, Flash

Hybrid 3D …

05.22.08 | 3 Comments

No, it’s not yet another 3D library for Flash. I’m thinking about the ramificiations of a decision I have been, very reluctantly, forced into: use of multiple (well, two) 3D libraries for a single website.

Papervision3D has (almost) all the features I want: lighting and shading, a sophisticated API (at least in Great White, the current bleeding-edge alpha version), and as decent performance as can be expected without hardware support (don’t talk to me about Astro - I need this project finished for the end of the month!). However, it’s not really very good at vectors: fonts and basic shapes. These have a jagged appearance that the designer for the project is unhappy with - and fair enough.

So I am using Five3D for the fonts and for those vector shapes that appear close-up enough to really matter, and Papervision3D for everything else. Five3D is vector-based, and thus is great for fonts and sharp edges on shapes, but it’s very new, and doesn’t have anything like the full range of features of Papervision3D.

The problem, then, is one of managing complexity: dealing with two independent 3D worlds, to create a composite illusion of seamless whole. I will be posting more on how I deal with this over this week and the next (if I have time!) but the issues that are already apparent are:

Engine-wide z-index stacking. If I need to have, say, a Five3D Sprite3D in front of a Papervision3D DisplayObject3D, then I can’t have two other objects of the same respective types that invert this order. All Five3D objects need to go on top, and all PV3D ones beneath; or vice versa. (I could have multiple scenes for each 3D engine, but that’s getting ridiculous and unmanageable.)

Coordinates / perspective incompatibility. In PV3D, you have proper control of the camera, with zoom controls also. In Five3D, there is an implicit camera that you have no control over. If you want get close to the objects, you have to shift them all closer. This makes means you have to be very careful with your use of PV3D controls, or your Five3D elements will have an Esher-like unreality in perspective and break the 3D illusion.

Naming collisions. I haven’t actually hit this yet but there are some Five3D objects that have the same names as PV3D ones so it’s only a matter of time … I might have to use full-qualified class names inline - eww!

In general, I would not recommend doing what I’m doing now with two 3D engines in one site … it’s just that I honestly can’t think of another way of achieving the visual effect without doing so.

related

3 Comments

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« Usability in 3d-based HID?
» FlatShadeMaterial.doubleSided does not seem to work as expected
Close
E-mail It