Hi, I’m working in a german company, working in the field of augmented reality. This means you can place virtual objects in their correct position and orientation in Live-Video-Footage.
I’m responsible for all Modelling and Animation-Tasks, where I try to use Blender as much as possible. After finishing a modell and its animation I have to export it into VRML97-format, because that’s what the renderer of our software needs.
Until now I used Bart’s Bitmanagement-Exporter (http://www.bitmanagement.com/products/bs_exporter_blender.de.html), which works fine when exporting Loc and Rot-Keyframes for objects. The Scale-Export is broken, but that’s another issue.
What I’m needing now is a way to export a complex animation, that needs Armature or Lattice-Deformation.
My task is to get a VRML-File with the Sorting-Head from Harry Potter. And I need to get it done by Thursday evening, because one week later the application will be launched in 60 bookstores in mexico,when the new Harry-Potter-Novel comes out.
So I need an exporter, that writes for every frame, the position of the objects’ vertices in a VRML-File. Here is an example of a VRML-Animation, that works that way:
#VRML V2.0 utf8 CosmoWorlds V1.0
Switch
{
whichChoice -1
choice
[
Shape
{
appearance Appearance
{
material DEF lambert3_0 Material
{
diffuseColor 0.400000 0.400000 0.400000
specularColor 0.000000 0.000000 0.000000
emissiveColor 0.000000 0.000000 0.000000
shininess 0.000000
transparency 0.000000
}
}
}
Shape
{
geometry DEF Teppich_0Geo IndexedFaceSet
{
convex FALSE
solid FALSE
coord DEF TeppichGeoPoints Coordinate
{
point [
-175.348 1.120 131.278,
-158.716 -4.470 133.157,
-141.275 2.876 131.443,
-125.629 5.152 130.161,
-107.784 -0.310 132.318,
...
165.288 -7.743 -125.681,
173.300 -10.302 -124.688,
166.479 -4.201 -133.475
]
}
coordIndex [
361 0 357 -1,
0 358 357 -1,
363 362 1 -1,
359 1 362 -1,
366 364 367 -1,
...
356 1352 1350 -1,
355 1348 1352 -1,
1352 1348 1350 -1
]
normalPerVertex TRUE
normal Normal
{
vector [
0.431 0.885 0.174,
0.356 0.923 0.147,
0.315 0.942 0.118,
...
0.272 0.882 0.385,
0.237 0.875 0.423,
0.245 0.868 0.432
]
}
normalIndex [
0 1 2 -1,
1 3 2 -1,
4 5 6 -1,
7 6 5 -1,
...
1351 1352 1277 -1,
1348 1279 1352 -1,
1352 1279 1277 -1
]
texCoord TextureCoordinate
{
point [
0.000000 0.040235
0.000000 0.009726
0.025177 0.040327
0.025000 0.009726
...
1.000000 0.968750
1.000000 1.000000
0.975000 1.000000
]
}
texCoordIndex [
0 1 2 -1,
1 3 2 -1,
4 5 6 -1,
7 6 5 -1,
...
1351 1352 1277 -1,
1348 1279 1352 -1,
1352 1279 1277 -1
]
}
}
]
}
Group
{
children
[
DEF Teppich Transform
{
translation 0.000000 -91.741837 0.000000
rotation 0.000000 0.000000 0.000000 0.000000
scale 1.000000 1.000000 1.000000
scaleOrientation 0.0 0.0 1.0 0.0
children Shape
{
appearance Appearance
{
material USE lambert3_0
texture ImageTexture
{
url "afghan_carpettest.JPG"
repeatS TRUE
repeatT TRUE
}
textureTransform TextureTransform
{
rotation 0.000000
scale 1.000000 1.000000
translation 0.000000 0.000000
}
}
geometry USE Teppich_0Geo
}
}
DEF TOUCH TouchSensor {}
DEF TimeSource TimeSensor
{
loop TRUE
cycleInterval 4.000000
}
DEF TeppichVtxAnim CoordinateInterpolator
{
key [
0.000000
0.006711
0.013423
0.020134
0.026846
...
0.986577
0.993289
1.000000
]
keyValue [
-175.000 -5.318 132.500
-157.500 -4.269 132.500
-140.000 1.912 132.500
-122.500 6.643 132.500
...
Here are the keys for every vertex-position in every frame (e.g.: 20 Frames x Object with 100 Vertices = 2000 PositionValues (X,Y,Z))
...
0.000000 -84.249847 0.000000
0.000000 -84.056526 0.000000
0.000000 -84.008400 0.000000
]
}
]
}
ROUTE TOUCH.touchTime TO TimeSource.set_startTime
ROUTE TimeSource.fraction_changed TO TeppichVtxAnim.set_fraction
ROUTE TeppichVtxAnim.value_changed TO TeppichGeoPoints.set_point
ROUTE TimeSource.fraction_changed TO TeppichPosAnim.set_fraction
ROUTE TeppichPosAnim.value_changed TO Teppich.set_translation
So please, if anyone could support me with this, I would be really thankfull.
I won’t mind to edit the resulting Text-File a little bit, but there’s no use to copy and paste the code from over 500+ Single-Frame-Export-Files into one big File containing the Switch-Node, which is the only way that I could achieve my desired result.
Every kind of help is very much appreciated!!
-0r10n