Blender as a Vj-ing tool

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

Post Reply
pildanovak
Posts: 207
Joined: Fri Oct 25, 2002 9:32 am
Contact:

Blender as a Vj-ing tool

Post by pildanovak » Tue Mar 16, 2004 4:28 pm

has already anybody else had the idea of using blender as a Vjing tool? i've made up an simple scene - changing and layering system, and use the midiinput to control/skratch the animation, also included action changing etc. if anybody else is interested in developing this simple scripted system, please, post a reply, and we can start a python script project within the project tree.

The main problem is now, that my system now runs on blender p. 2.25, i didn't try to port the thing to tuhopuu yet, because i'm not sure if the scripts wouldn't have to be re-done twice.

I'm not a coder, so my scripts are quite simple. The main idea is to have a system in which you can upload as many scenes as you want, all of them compatible, this way there could also work the content - sharing.

nay
Posts: 39
Joined: Thu Jan 29, 2004 1:56 am
Location: sydney, australia
Contact:

Post by nay » Tue Mar 16, 2004 11:48 pm

that project sounds great!

so am i correct in thinking you already have midi working? i'd love to get a copy of that script. i'm not so much into vj-ing as interactive installations but i did attempt a script a while back to use OSC to trigger blender so that it could receive signal from Pure-Data/max/jmax etc.

The script is done according to what i think it should be (i'm no coder either) but i haven't gotten around to testing it because of troubles setting up my python path on linux (of all the obstacles to have... ). am hoping to get around to finishing that soonish though. although if you have midi running i might not need it, although osc can be sent via networks...

don't know if i can offer much assistance as my coding is still quite poor but if there's anything i could do i'd love to get involved

cheers

nay.

alien-xmp
Posts: 217
Joined: Sun Apr 06, 2003 2:22 pm
Location: Wellington, New Zealand
Contact:

Post by alien-xmp » Wed Mar 17, 2004 1:47 am

The gameengine python modules haven't changed in tuhopuu since 2.25 was released.

However, the Blender module was changed, so that is not available any more.

pildanovak
Posts: 207
Joined: Fri Oct 25, 2002 9:32 am
Contact:

Post by pildanovak » Wed Mar 17, 2004 12:16 pm

alien-xmp / thanks for this information.

nay / thakns for reply. I have the midi working through the library midipy, found on this site.

http://www.josos.org/

The problem for you is - i've it working, but now only in Windows. I'm not sure if there is any ability to port the
library to linux. If anybody would be able to remake the library, it would be great, but i'm not sure if we get somebody to make it working so that it could become a standard for Blender.

finally here is my file as i used it last time. The midi initialization and reading /writing of messages is very simple(in the InitMidi and MidiVj scripts). I think i'm going to try to communicate this way with Eyesweb or Max, but also under windows.

multimedia.ffa.vutbr.cz/~novak/files/blenderVj.rar
!!!To all downloaders: please don't use the artwork included , it's mean't only to show how it works!!!!

The scenes included show the various use of the midi data.I use mainly the controllers, because i use keyboard keys as triggers. But in the scene with the "dancing person " i used the keyboard to trigger actions.

The controlls are these:
1 - 9 and Q - M - triggering of scenes to the 1st Layer
Lshift + 1 - 9 and Q - M - triggering of scenes to the 2nd Layer
Lcontrol + 1 - 9 and Q - M - triggering of scenes to the 3rd Layer
the 2nd and 3rd layer always go over each other, so the new scene is always over the older one.

Rctrl + Numpad keys - store preset(all 3 layers)
Numpad keys - recall preset / presets now write to the file "preset"in the

publisher directory, but they aren't read on the new start, you have to load the file and copy the information to the InitMidi script.

I din't realize how to define some global properties, so i use GameLogic. to share the properties between the scripts.
i write the midi information to some properties, and the objects in the scenes only read it and transform it to ipo / action positions, either directly as position, or as speed

an-toni
Posts: 250
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni » Wed Mar 17, 2004 5:36 pm

Thanks for info, will have to check that soon,

I actually used Blender when VJing in August 2003, developed an app for it and have documented it somewhat .. not really released, 'cause have not managed to put up a blend with models&animations I could distribute .. but the Python source is available, if you're interested, and some of the development and use documented.

the Wiki node for the project http://studio.kyperjokki.fi/engine/KyperMover links to the two files with the stuff i developed, core classes in http://studio.kyperjokki.fi/engine/kyperjokki.py and what's meant to be user-modifiable configurations in http://studio.kyperjokki.fi/engine/ksetup.py (including keybindings at the end) .. unfortunately the parts that are on in the .blend (that imports those libs) are not publicly available now,

if someone's interested, say, and i'll hurry more in putting them up :)

http://studio.kyperjokki.fi/MoverThesis/ is about the documentation, links to http://an.org/gradu2/gradu2.rst which is the actual raw text.

this work does not include any midi or audio synch, i've preferred controlling with my own hands lately :) but the architecture is surely made with that in mind too (there is a RhythmMaster class that serves the beat and can get the input from outside), otoh there would be a lot of refactoring to do..

~Toni

jasper
Posts: 7
Joined: Mon Oct 14, 2002 2:22 pm

Post by jasper » Wed Mar 17, 2004 10:32 pm

Hi, It's been a while since i've posted here.

Nice to see so much activity.

The midipy module was developed by Simon of http://www.void7.org for doing vj'ing in Blender.
The midipy module is winddoos only, compiled for python2.0 (aka blenderpython), although
i think other people have compiled the module for other python versions.
I'm not sure why midipy is windows only, i think it had to do with the c-library
that does the actual midi processing.

Currently we use PD for audio / video (motion tracking), and then send all data
with OSC to blender. as described earlier in this thread by Nay

Because the pd stuff is linux only, we don't really use blender windows/midipy much.
If someone wants to develope a linux of midipy version, that would be really cool.

We still use Blender quite a lot in the installations we make, and it would be cool to
see more of these projects. (realtime blender with external input / sensors / weird input devices/ interactive installations etc.)

I'm not sure if we have many things to share though, most vj-stuff we made was always last minute/hectic and not very re-usable code.

I will put up a webpage soon with the Objects & OSC code we use now,
Maybe someone finds it usefull. (it has very nice fancy callback methods)
However i think it might be better to wait for a new gameEngine instead of keep on using 2.25

Does anyone know if/when the tuhopuu engines will be put in blender?

Jasper

nay
Posts: 39
Joined: Thu Jan 29, 2004 1:56 am
Location: sydney, australia
Contact:

Post by nay » Thu Mar 18, 2004 12:38 am

wow - i had no idea there was this much going on in this area :)

i am looking forward to taking a look at your scripts Toni and Jasper

i am also very curious to see the work people are doing with blender in this area. i only have one of mine documented on the web (at the moment) but if you're interested it's at

http://renechristen.net/caravel.html

it would be great to have some more active discussion between people using blender for things like performance and interactive installations etc.

pildanovak
Posts: 207
Joined: Fri Oct 25, 2002 9:32 am
Contact:

Post by pildanovak » Fri Mar 19, 2004 11:23 pm

Thanks for all the replies.

an-toni>
this work does not include any midi or audio synch, i've preferred controlling with my own hands lately
what didi you mean by this, the video-tracking? my files also don`t react on generated midi beats > i just use the midi - rotary rheostats to skratch and set up the exact speed of the animation.

I tried to read some of the code, but i fear that it's really not very usable without the rest. Those effects which are described in the feature list have you implemented? have you applied them on the output/resterizer, or on the 3d objects?
You wrote (on your pages), that you don't use Blender for vjing because it doesn't support video-textures. Have you been studying how hard would it be to implement this?

Has anybody tested the files?(possible with midi working)

an-toni
Posts: 250
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni » Fri Mar 26, 2004 1:56 pm

pildanovak wrote: what didi you mean by this, the video-tracking? my files also don`t react on generated midi beats > i just use the midi - rotary rheostats to skratch and set up the exact speed of the animation.
ah, that sounds useful - i've only used beat-tapping and mouse for setting the speed so far with that tool, but wrote the code with different kinds of sliders in mind.

i'm sorry, should have been more clear in the original post: that work so far was done for controlling character animations (armature actions) only, adding and removing objects from the visible layer and controlling their movements.

we haven't implemented any visual effects - not even used the ones already supported in Blender much.
pildanovak wrote: You wrote (on your pages), that you don't use Blender for vjing because it doesn't support video-textures. Have you been studying how hard would it be to implement this?
a bit, http://studio.kyperjokki.fi/engine/VideoTextures links to an opengl videotextures tutorial at http://nehe.gamedev.net/data/lessons/le ... ?lesson=35

i don't know the internals of Ketsji enough to know how hard that would be there, but have learned that it should easy with many engines (e.g. crystal space, libvob)
pildanovak wrote: Has anybody tested the files?(possible with midi working)
not yet, hopefully soon - will also put up a blend with the rest of the code i wrote last august and some example models&animations .. perhaps we can make these things something useful together.

i'm not in an awful hurry yet, having next confirmed gigs in coming July and August and working with other things now, but am trying to make time for this soon.

~Toni

an-toni
Posts: 250
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni » Fri Mar 26, 2004 3:18 pm

ok now there's http://www.kyperjokki.fi/tools/mover-public.blend that everyone should be (in principple) able to download an use with the two external files that it needs (library http://studio.kyperjokki.fi/engine/kyperjokki.py and configuration http://studio.kyperjokki.fi/engine/ksetup.py)

there's only two boring logos as 'movers' in that file, and i havent been able to actually test that edition yet, but will soon and fix if it didn't work out straight (just commented out hopefully right lines in the setup file)

it should start with a black screen, buttons from 1-9 adding new objects - only 1 & 2 should work i.e. add the two logos now. ctrl-n removes the objects similarly. 0 deselects all, and a number selects an object if it existed in the scene already (and added objects are selected by default).

arrowkeys rotate, DKEY and CKEY move selected objects, AKEY & ZKEY zoom camera, some other keys move it

and QWERTY.. trigger animations (actions), only two (hence in Q & W) for those simple test objects .. if your model is made so that there are actions that dont use the same bones, you can have basically an unlimited amount of actions simultaneously on the same object (or at least five, if an arbitary restriction is still lurking somewhere in my code due to some dirty hack)

see the end of the setup file for the keyconfig and feel free to edit it for your purposes, it's all in one dictionary. oh a couple of things: 'b' is used for beat-tap, tap at least four times to set tempo, and if you want to control the animations with a "slide" use TABKEY to toggle a 'scrubb mode' where the playback is mapped from mouseX. also there is cloning and some experiments with direct manipulations of the bones etc. etc.

i realize that the whole thing is not easy to use at all and does not provide much, but think that some of the architecture might be nice to build on .. i've also learned a whole lot more about both programming/python and Blender since wrote that, so hopefully can make it better when have time :)

~Toni

mucska
Posts: 1
Joined: Fri Mar 26, 2004 3:23 pm

Post by mucska » Fri Mar 26, 2004 3:29 pm

hi pildanovak

something for as;
cau, nechces dat aspon na sebe kontakt?
koukal sem na tvoje stranky(veci) docela cool.
uvital bych mit tady v cechach s kym komunikovat o Blendru, co ty nato?
muj mail je mucska@avu.cz

dik cau

I'm sorry to others :)

levon
Posts: 415
Joined: Thu Jul 31, 2003 6:06 am
Location: adelaide

Post by levon » Sun Mar 28, 2004 3:07 am

wow, this is great, i have not had a chance to look at it much, pildanovak, your script doesnt work for me, but i only tried it for about 10 mins, so im sure i will get it working soon, i will have tim to try out the other files on this page thursday and friday, so ill give any feedback around then, maybe we could establish a colective project to work on these vjing tools, i remember a post at elysuin about controling animations with midi, and there seemed to be quite alot of intrest in it. and with the game engine back in 2.33 , i think alot of intrest will be put back in to this area of work..

keep up the good work everyone, ill post some feedback in the comming week.

levon
Posts: 415
Joined: Thu Jul 31, 2003 6:06 am
Location: adelaide

Post by levon » Wed Mar 31, 2004 7:04 am

pildanovak, still no luck with your scipts, i get an error about my version of python im using 2.2.3.

also i get an error

Code: Select all

 Traceback (most recent call last):
  File "InitMidi", line 4, in ?
ImportError: Module use of python22.dll conflicts with this version of Python.
and

Code: Select all

 Traceback (most recent call last):
  File "readMsg_velocity", line 12, in ?
AttributeError: midiArray
an-toni, ive got your scrit to work, what were you using it for, just the spining logos?



[/code]

pildanovak
Posts: 207
Joined: Fri Oct 25, 2002 9:32 am
Contact:

Post by pildanovak » Wed Mar 31, 2004 10:16 am

levon>
i use the 2.0 version of the midipy library(there are two versions in my package), and it works with python 2.2.3.
the second error ocludes because the InitMidi script didn't run to it's end and didn't initialize the variables(midiArray). This is either because of the first error, or because of no midi device. (but windows have standardly mididrivers on the gameport installed)


I am not currently working on the scripts itselves, because i want to make a subdirectories structure with linked files and want to link the files relatively, so you can copy the whole thing anywhere. This is also because of that i use the same little scripts in all scenes and want to store the scripts separately so i can update them anytime in all scenes. But i've changed them a little for a simple setup of controllers

an-toni, i've tried the kyperjokki files, they work fine, and the code is nice written. the operations done with the objects are nice, but i'm not sure if this kind of operations is universal enough. Thanks for sharing.

an-toni
Posts: 250
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni » Wed Mar 31, 2004 6:17 pm

levon, pildanovak - nice to hear it worked for you.

first to answer levon's question about usage:

i've used it for making characters dance techo and play air-guitar! controlling character animations was what the development was first targeted at.

we had some different humanoids (a guy, gorilla) with dance movements, and what seemed to working nicely was using the cloning function (pressing PgUp clones selected movers positioning the new instances horizontally) to have several characters and putting them in some sort of formation (e.g. circle) and dance .. the gorillas looked like cave-men humping up&down which fit some basic techno quite nicely. we also have a kangaroo model 'cause a resident dj in a club we've been performing in uses that as his dj name, that has boxing gloves and actions which were fun for drumming. then there's also a snake that was good for cloning vertically (LKEY) to make a kind of a wall that would then move, more a trance thing. we've a recording of a gig where this was done, just have never taken the time to edit and recode it for showing yet. i'll talk with the modellers and animators (and the company people) about releasing some of those.

the air-guitar part is related to the world championships competition organized here yearly - http://www.airguitarworldchampionships.com/ .. just tests so far, no releases or performances about that yet.

oh and one thing: a plan was to use BVH imported (motion capture data) animations to have nice dance movements, but we couldn't get any of the scripts work back in August when were working on this .. i noticed now that there's a new import script, hopefully it works (all the way to armature actions), added a note about it to http://studio.kyperjokki.fi/engine/CharacterAnimation

then to pildanovak's note about the programming:

glad to hear you found it nice, i did refactor it a couple of times during the development and also think that there are some good things to preserve / build on. could you be more specific about the 'operations done with the objects', do you mean the methods in the Mover class made for moving & animating (turn(), move(), animate()) or? surely the classes are not all universal - there was a specific goal to reach pretty quickly after all - but at least with some refactoring i think it can be extended to pretty much everything. actually i find that the problem currently is quite the opposite: there's quite a lot of framework, but not much meat in it yet! i mean there are so many relatively easy features missing: bgimages, scenes, lights, camera runs .. oh and of course switching textures and perhaps having animated ones. otherwise i've thought of implementing formations, 'cause having several characters e.g. dance in a circle seemed to be working nicely (was happy to learn about DupliVerts on the modelling side).

levon also mentioned establishing a collaborative project - getting one going would be really great! i guess that a first thing to do would be agreeing on some general goals and architecture:

a goal of mine for one has been separating the program as much from Blender peculiarities as possible (actually planning that some classes, like the RhythmMaster, could be used e.g. in pygame apps too) and hence using the logic bricks as little as possible, and having the library outside .blend files. i understand that for many non-programmer VJs logic bricks are nice, e.g. being able to define keybindings interactively etc. (though i find my way of having them in a single dictionary powerful, 'cause it can be reconfigured on the fly if some setup requires it). of course one way would be making a Blender script with a GUI for preparing the setup.

about the architecture, my system has an encapsulating scene-class with an update method etc. which is pretty straightforward, but the self-made so-called event system is somewhat nonstandard (the event instances contain the actions that they trigger themselves in the start(), act() and stop() methods).

if we get these basic ideas sorted out, and come up with a good name for the project :) , probably we should start using a CVS for putting the code and documentation together .. perhaps applying for space on this foundation site if we're really committed?

oh and i did check out pildanovak's project quickly last week, was on Linux so could not unfortunately run it due to the missing midi library, but it did seem interesting visually already from what i could see .. will try to have time to try it on Windows later this week (am awfully busy a couple of weeks yet, fortunately working with Blender but not game-engine related).

~Toni

P.S. i'm usually 'antont' (e.g. on irc where hang on freenode's #gameblender etc.), just seem to have lost that password to this site :o *embarrassed* (or then someone else had it here)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest