Deep Limb Sensation

Dima was up at 5:30, setting the alarm clock makes absolutelly no sense in this house. Instead of fixing the exporter on a train, I modelled a nice squid with one eye and somewhat resembling the clay animation texture.

This morning Pierre had 15 min presentation of the Deep Limb Sensation (which is the new (working?) title of the project) for V2_ people. He made all bits fall into places and click. He already had like four different models prepared with textures but without animations, we had a quick run through the export process, discovering new peculiarities as we went. We had a bit of a planning after, but ended up quite vague, because I was involved. I’ll think more planningwise on Wednesday.

Apparently next Monday we’ll go to the i-Space to sort out the openal finally. The new plan is to have sound integrated into deepsea, if we manage to get openal work on the prism.

I made a subversion account for Pierre and he imported the models into the repo. Along the way closed one labdev administration ticket.

I made deepsea build on a mac so i could continue to work on it on a train, could have caused some minor disturbances on linux, i will fix them tomorrow if necessary.

I also made one of Pierre’s limbs into mesh and recreated the vertex groups more accurately and had a look at what’s going on during export. as a result i came up with the new, final instructions on making a skeleton for the limb (formatting might get hosed in the mail, sorry, i’ll put this up on my blog as well):

  • premise: instead of trying to code around a lot of things, we’ll satisfy the exporter’s assumptions:
    • skeleton should NEVER be rotated / moved about in object mode: the script assumes that its transform is identity
    • instead transform it in edit mode (Tab)
      • a trick: to rotate the whole skeleton about the origin, place cursor at origin (e.g. in object mode select skeleton, Shit+S, cursor->selection, Tab, A [select all bones]), and rotation around the cursor mode (. key).
    • to convert existing models’ skeletons:
      • select the skeleton, Ctrl+A (apply Size/Rotation). this may throw skeleton to some unexpected place and hence distort the model, don’t worry:
      • select the mesh and move it around until it is aligned with the skeleton and looks OK (apparently mesh may have non-identity transform making our life somewhat easier)
      • select skeleton again and Alt+G, Alt+R, Alt+S (clear translation, rotation, scale of the skeleton, it may jump again, but this time mesh should follow)
    • because we want to avoid realigning the coordinates, we’ll reposition the camera. it’s new transform (select camera, ‘n’, enter values: Loc: all 0, Rot: all 0, Size: all 1.0)
    • once the camera is positioned move the mesh where you want to see it in ‘deepsea’ [to make the following step easier I move the mesh with Ctrl and watch the numbers in the lower left corner of the screen, I need to remember the last ones]
    • then select the skeleton, enter edit mode (Tab), select all bones and move them in place. [if you followed my example you can hold Ctrl and make sure you move the bones to the same vector]
  • following this frustrating procedure will result in correct positioning of the limb in the ‘deepsea’
  • NB: I figured out that you don’t have to jump to the first frame before exporting, but you do need to have one 3d view open (what i do is I split screen, select “3D view” in one window and “Scripts window” in the other, after that selecting “File > Export > Cal3d” reuses scripts window and the 3d window remains open.

Tomorrow:

Sort out textures export - didn’t succeed on a train at all.

cal3d on a mac

to build cal3d on mac os x i had to manually call autotools so that the correct versions get called:

aclocal-1.6
autoheader
glibtoolize --force
automake-1.6 -af
autoconf
./configure
make
sudo make install

that’s because i have several automakes installed and the newer ones (that i’ve built myself) know nothing about the renamed libtool/libtoolize.

I also didn’t have to patch the src/cal3d/Makefile.am because something is older then on FC5 (GNU libtool probably).

Deep sea phantom limb (part 4)

This morning I started at 7:00 thanks to my son. I’ve refactored part of navigation that I didn’t touch yesterday (forward / backwards movement of the camera) so that it was easy to add panning, which I proceded to do. Navigation at the moment:

  • left mouse button drag - rotation around world origin (so it’s important to place the objects somewhere near there)
  • middle mouse button drag - panning (moving up/down and sideways)
  • vertical right mouse button drag - moving the camera forward / backwards

New navigtion allows me to get better shots, see my phantomlimb flickr tag.

Update

  • added specs
  • limb and light attached to the camera
  • figured how to model in blender and know where the limb will end up
  • tested that and it works

Word of caution: in i-Space the limb will have to be hung somewhere appropriate. See screenshots…

Update 2 When exporting animation make sure: * 3D window is open * current frame number is 1

The trick with rotating the coordinate system to align with blender is broken: the skeleton has to be rotated as well. That can be achieved in the exporter, by setting “Export for Soya”, which doesn’t work in the last official version, so I fixed it. Now the orientation of the camera / limb in blender has to change and there’s some issue with animation (tip of the tentacle moves way to much, it could have something to do with my fixing the soya export. If I switch soya off the animation looks OK, but orientation is bad…

Deep sea phantom limb (part 3)

Today I’ve ported arcball module from some previous project to deepsea, this allowed to implement nicer mouse navigation for now. This is only temporary because in the end navigation will depend on the limb motion and limb will be controlled by the sensors. But at least now I can move around freely and see what’s up with the tentacle.

Next step is to control animation state from e.g. keyboard or mouse. Now the first animation in a .cfg file starts and continues if it’s a cycle or stops if it’s an action.

As a side note - I was so annoyed by the official (read ancient) FC5 version of emacs that I built the one from scratch again. This time it’s HEAD, I hope it’s more stable then the experimental freetype branch. Pity they don’t release emacs more often.

Update

actually porting proved buggy: either i made a typo or the model placement is screwed up. Investigating…

Update 2

Figured it out, was manifold:

  • indeed one typo (parentheses in a wrong place)
  • quaternion multiplication in my old sources (as I implemented in ab2006 and fluxus) uses different multiplication then cal3d, I guess that’s what they mean when say that cal3d uses left hand rotation as opposed to right hand
  • miniviewer passes negated window Y to mouse event callbacks so that the axis points in the same direction as the OpenGL’s. The code I copied expected the opposite.

I miss panning, just rotatioin and “zoom” aren’t enough.

Deep sea phantom limb (part 2)

  • the miniviewer seems to only understand .tga textures. it doesn’t support bump maps and uv coords seem to be messed up…
  • I’ve put modified version of miniviewer and export script to our subversion repo, they can be browsed. executable is called “deepsea” it has to be in PATH and should be started from the same directory where the .cfg file is located (somehow cal3d don’t seem to handle relative references to files).

My self rolled emacs with gtk/freetype support kept on crashing, i gave it up and installed the official one from fedora which is ancient. Some of my preferences and scripts didn’t work anymore and I had to fix them. All in all wasted an hour on that :(

Here is a screenshot of where I’m at (it’s very dark, i haven’t started to twiddle the lighting yet):

Deep sea phantom limb

Checklist for today

  1. Model an animated limb exportable to cal3d with the new script.
  2. Run blender from terminal so that I can see the error messages from the script (and hopefully fix some)
  3. Sort out the texture coords: so far i don’t see the texture in the viewer, that must be because i use one of the calculated texture mappings, i must use uv cordinates and make sure they get exported
  4. Adjust the miniviewer to look more like deep sea: dark background (gradient quad?), fog
  5. Reimplement navigation in the viewer so that i can thoroughfully explore them models

Till update

Notes:

  • export script fails if there’s no material assigned to the object being exported
  • all of a sudden today’s tentacle is right in front of the camera. it is nicely smooth.
  • came across blender raytrace baker a script to bake everything (not only raytracing) into uv textures. might be incompatible with blender 2.41 - will have to try it out
  • still can’t save animation although they say it works…

Update

Have managed to get the animation exported, finally. The tricks were:

  • when creating the animation one should use LocRotSize keyframes/IPOs because of the scripts erroneous assumption (should actually look into fixing this)
  • i had to keyframe all bones, also the ones that get solved by IK solver
  • i have mistakenly made two of the bones (root and IK target) invisible to exporter (names starting with “_”). After renaming it finally worked.

Strange, but after I sorted the animation out the tentacle has moved away from the camera again.

Conclusion

It is possible to export inverse kinematics based animation to cal3d. It won’t be IK based anymore (cal3d doesn’t support it), but it will look exactly like in blender (they call it capturing). To export the look of the objects as close to modelled as possible I will try to use the raytracing baker script. I will start with adjusting miniviewer to our needs tomorrow. Now I’ll make nice material for the tentacle.

Update 2

At the moment miniviewer doesn’t load my textured tentacle, and cal3d produces useless error messages. Anyway, I’ll skip sorting this out till the environment looks OK and navigation is fixed…

The All Night Horror Show (part 12)

In an hour or two I’m going to The All Night Horror Show (part 12) at Utopolis, Emmen. I took the program A, which includes Land of the Dead, Alone in the Dark, Calvaire (a.k.a. The Ordeal) and a sneak preview. I’m a big fan of Romero’s movies, and I enjoyed Alone in the Dark, the game and I never saw any French horror before. To make it a perfect night they only have to make the sneak a low budget black and white b-film with brain lusting zombies. We’ll see.

Update.

The program A horror enjoyment order:

  1. Land of the Dead
  2. Calvaire / The Devil’s Rejects (sneak)
  3. Alone in the Dark

Fun, fun the list is in the order I enjoyed the movies, but if I start to analise them 1 and 2 swap places! But this makes LotD an action movie, how could I enjoy an action movie? Oh, well, there were flesh eating zombies in there.

Riley the main character is a cheesy variant of Mad Max (the movie often reminded me about Mad Max and the Thunderdome), and his retard sidekick Charlie fails to improve the situation. But the worst of all is Pillsbury character. Them and the happy ending were probably in there to raise the money. Firing rockets into zombies is total bullshit, a waste of gore material. Nevertheless movie feels like the follow up for the other Living Dead movies, the zombies look very good and flesh eating scenes are pretty picturesque, all in all it’s Tom Savini who saved the day and made sure LotD still ended up at my first place.

Calvaire is a nice european variant of Texas Chain Saw Masacre. The dance in a village diner scene is my favorite. The corpse on a cross in the end of the movie shows up for likes half a second without any reason or explanation - that’s what I’m talking about! Cheaper film made it appear low res and dithered, adding to a the desperate atmosphere.

The Devil’s Rejects not a zombie film but Rob Zombie’s film and in colour but the sort of colour they had in the 70s was a pleasant surprise: a bad ass fucking slasher about a mass murderer family of Marx brothers buffs.

The following is close to truth:

“If Ed Wood had the opportunity to fall under MTV’s influence, Plan Nine From Outer Space would have looked like Alone in the Dark.” Jeffrey Westhoff, NORTHWEST HERALD (CRYSTAL LAKE, IL)

Except Alone in the Dark just isn’t bad enough, it lacks the power of Plan 9’s unbelievable stupidity. It also isn’t based on the original game that I played.

Deep Sea

Some pics for inspiration purposes…

…These are the creepy crawlies and monsters of the deep you’ve been waiting to see. Starting with the first really deep ocean zone - the Mesopelagic… …They also have large stomachs which can stretch to accommodate a fish much larger than itself…

A thread on ConceptArt.org

Not very deep but still nice underwater creatures

Tentacles

The tentacle rendered in blender

To make it easier on myself I made somewhat simler model - a single tentacle. The objective for today is to get it to look in cal3d as close as possible to the “original” (blender rendering). This implies:

  • material
  • normals map
  • smooth shading
  • IK based movements

For now the last one just involves getting a single animation cycle to look nice. Status so far:

  • material seems OK
  • normals map gets lost :(
  • shading looks OK, but I need more navigation control to know for sure
  • I haven’t created any animations yet

After model and animation look good I’ll have to modify the miniviewer to render the deep sea environment - deep green gradient in the background, thick green mist, maybe some flickery almost transparent cloudy noise in front of the camera…

Update:

Yesterday was so frustrating that I haven’t reported about it. Basically the results and conclusions were: the version of blender -> cal3d to use is [http://www.elefth.org/ here], gotta contact this elefth person. The main advantage of this script is that if you use IK animation it will correctly calculate positions of IK chains and store them in cal3d keyframes. But that’s only in theory, in practice I’m getting some errors. Recommended workaround (save and reload the file, which would collect garbage) doesn’t help either and I couldn’t figure what went wrong.

Nevertheless: I learned all there was to learn about cal3d and am convinced it is feasible to try to use it. I also learned a lot about animation in blender, understood some things I didn’t dare to think about before and sorted out what I could or could not export to realtime packages. Bad results are good results.

Cthulhu

During our previous iSpace project we’ve came up with a hidden agenda - whatever Sonia would give us to work with, we’d tag it with something biblical. In the end we had labled the levels Genesis, Eden and Noah and gave up the copyright on the code (of life) to the Tetragrammon.

This time, Pierre’s proposal for Phantom Limb project (sent to the Disembodiment in Virtual Reality program) has immediatelly reminded me of the best scene from the Evil Dead 2 - the one where Ash cuts his hand off. Like it usually goes, the concept evolves while we work on it, but the horror component is there to stay. Disembodied hand now has evolved into cthulhu and here is my sketch (has probably little to do with final models by Pierre himself, but was fun to try):

Cthulhu

The low poly version exported to cal3d gets rendered at 1600 somethings, the animation didn’t survive conversion. This time I tried IK solvers for tentacles, making them follow empties and another two for eyes / head, making them follow the camera. (The result looks funny and reminds me of animation sequences in old horror movies - how appropriate). The problem is probably that I only used IPOs and not actions.

Another sort of animation which I didn’t even try because I knew cal3d doesn’t support it, but which is something you’d want tentacled underwater creature to have, is bone scaling. It could be emulated with little extra bones though.