[Papervision3D] Help on Some Flight Algorithms and Materials Hooks
Randy Blain
randy_blain at yahoo.co.uk
Fri Feb 23 18:01:13 EST 2007
Hello listfolk. I have a good pipeline now that is
revved up. I model in Cinema 4D, lay out the UV's in
BodyPaint 3D, bake the UV's and texture maps, export
as .3ds, import to Blender and export as Collada. Once
I figured out how to lay out my mesh triangles so that
they would z sort somewhat coherently I got rid of
most of the popaway polys. For static textures I bake
in the light and shadows to the surface color and
GI-global illumination if it is worth the time and for
moving models I bake ambient occlusion in so it
doesn't look like I just have material in the
luminance/emission channel. I then combine the various
baked layers per mesh in Photoshop and export as a png
to load into the Flash library.
A few notes for newbies. Do lay out your UV's first
and bake the texture to a bitmap to load. I have had
much better luck loading Callada meshes than ASE,
which parses the UV's as NaN. When loading your swf to
a server or sending to a pal to wow them, make sure
they have the mesh they will load in the same
directory as the swf, or the relative path you were
loading it from. The cameras are a bit baffling to me.
It seems I get the best perspective and the least
amount of poly popaway when set at zoom=1, focus=1000.
May be the unit size of my models. Any other
experiences or observations would help to figure out
what these figures have to do with C4D camera
variables.
This trig stuff drives me crazy sometimes but one has
to have a grasp of it to do effective math in a 3D
space. Perhaps we could toss various navigation
algorithms around on the list. I would like something
down, dirty and quick for moving the camera and my
craft in the zScreen direction. In other words I want
to be able to appear to be going stright forward from
my local coordinate system no matter which direction I
am heading. Since this seems to be a chunk of math
that is mega-reusable perhaps an HPB coordinate system
could be incorprated at the object level so that
Heading, Pitch and Bearing are local to the object and
calculated from the world coordinate system and all
that has to be coded by the developer is
object.H = object.H + _myVelocity
object.P and object.B would be rotations around X and
Y axis. H would move the object down its local Z
coordinates. Hroll could be added so the object could
barrel roll around its zAxis..which if the camera
doesn't might look pretty cool.
For now I would just like an algorithm to get my craft
moving properly forward.
As well I would like to commend the excellent work
Ralph has done on the materials system. I have a
bunch of psuedocode and punched together AS scripts
for lighting falloffs, visible lights and materials
with perlin noise and color transforms etc for
procedural terrains, skies and dirty materials
etc..but have never figured out how to hook them into
the classes without interfering with what is already
being done rapidly. An example of the class file would
be helpful for writing other materials such as a fake
fresnel, scene fog, an eternal horizon and plane and
sky.
I also saw somebody wrote a class for a 3D line.. Is
that available for the AS2.0 version?
Another thing I was thinking about. Spheres. Since
spheres take alot of geometry to make a decent 3D mesh
and it is a circle from any angle,.,.and PaperWorld's
universe will have thousands of planets and suns etc
..all spheres then why not write a PerfectSphere class
that just uses the drawing API. It is basically a
spherical sprite always facing the camera but due to
the gradients we can program we can set the specular
highlight and shaow according to its position.
Sorry to write such long emails but I need some
answers so i can sleep more!~! heh.. Love this stuff.
Best Regards
Randy Blain
___________________________________________________________
Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
More information about the Papervision3D
mailing list