Thursday, February 25, 2010

DDOS against build servers

Just a head's up that tomorrow's nightly builds for linux and windows might be delayed or missing. Right now the server hotel I host my build machines on is under a DDOS attack (directed at the hotel as such, not at my servers). I can't even reach the machines right now, and (hardly surprising) there seems to be no ETA for when they can manage to fend off the attack.

The MaxOSX nightly build won't be affected, since it is built on Hans-Peter Dusel's machines and not mine.

Friday, February 12, 2010

Accident hairstyle..

I made a wrong use of hair vertices index.. I accidentally made a cool hairstyle.. I have to save this hair it's just too cool :D



PS: The hair width changing will soon appear in hair details under modelling, and it will be dynamic.

Announcement: Nightly Builds of MakeHuman for Mac OSX

Besides of regulary Builds for Windows and various Linux flavors The MH Team does now offer nightly builds for Mac OS X too!

You'll find it at: http://download.tuxfamily.org/makehuman/nightly/

Please advice that these nightly builds reflect a development drop of the recent changes and are not supposed to be considered as stable!

So be aware that these Versions may be incomplete and / or show weird effects! ;)

Some technical notes about the build environment:

The Build is done by my good old Mac mini, equipped with a PowerPC.

I have managed this machine to regularly wake up around 4:00 am, hence to perform a checkout of the recent trunk at http://code.google.com/p/makehuman/.

If any change has been done since the last build the mini builds the Application package for Mac OS X 10.5, 10.6 (Mac Universal), creates an archive and uploads the file to http://download.tuxfamily.org/makehuman/nightly/

Finally it falls asleep again.

Have Fun! – Greets – Peter -

Wednesday, February 10, 2010

MHX for Blender 2.5, with hair

This morning I released the first working exporter for Blender 2.5.

Blender 2.5 is the radically new Blender version which aims at taking over the world. The software is still in alpha stage, but things have started to become rather stable over the last few weeks, and those not overly concerned about occational program crashes can now import MHX files into it.

The python API has undergone a complete overhaul in Blender 2.5. The new API is much better (much more regular and complete) than the old one, but it is different, and the old MHX importer does not work. Moreover, the MHX format itself reflects Blender's python interface. To take full advantage of Blender 2.5's capabilities, I have therefore invented a modified MHX format which can be imported into the new Blender. The old format can still be imported into Blender 2.49, of course.

First of all we must grab an up-to-date Blender build from http://www.graphicall.org/builds/. Note that the Blender alpha is seriously outdated. Even a build from the last weekend won't do, because the Blender devs have changed the name of some python variables since then; more precisely, Material.textures has changed to Materials.texture_slots.

When we export a character called foo from MakeHuman, two MHX files appear in the exports directory: foo-24.mhx and foo-classic-25.mhx. foo-24 can be imported into Blender 2.49 as before, and foo-classic-25 can be imported into Blender 2.5. Trying to import a file into the wrong Blender version results in an error message.

To import this file into Blender, open the file importers/mhx/blender25x/import_scene_mhx.py in a Blender text editor. Scroll down to the bottom of the file and change to the adequate file name. You can also control what features are imported by modifying the variable toggle just above the call to readMhxFile(). I have tried to make a user interface, but it currently messes up the code.



The mesh should now come into Blender without materials. There is a non-neglible risk that Blender should crash during import; if so, just try again. On my system, more than 80% of the crashes occurred when I was importing materials or textures, which is why I disabled them. Apart from materials, most things are as in the 2.49 version. Also on my system, the armature is hidden and the display objects appear on layer 1, but this may be a Blender bug.

Drivers (driven shape keys and FK/IK switch) have not yet been implemented. Drivers work quite differently in 2.5 than in 2.49. However, the facial shape keys are there, although you have to access them in the panel to the right.

Did you notice the things on her head? Could it be...

Yes!



For the time being, I made a quick test hair with 10 parent strands and lots of children and put it into the template file. It should be replaced by the selected MakeHuman hair soon.

Jose or maybe Marc: How do I access the hair object?

Saturday, February 6, 2010

Final solution for nightly builds


Well, after several attempts to and from and here and there, we have finally landed in putting all the nightly builds (including the deb file repository) on tuxfamily.org. This is a well-connected site and they didn't seem very bothered about the network load. This means we're ditching the other attempts for hosting nightlies (for example google code, launchpad and sourceforge) so please stop trying to download the nightlies from there if you started.

I have update the instructions for downloading a tarball and for setting up apt to install makehuman. Please review these and report any problems here or on the forums.

As a side note, with the advent of the tuxfamily hosting, we definitely have space and capacity for builds for other architectures, platforms and distro versions. A MacOSX nightly build anyone? :-)

Friday, February 5, 2010

Experiment with exported hairs as Mesh

Hairs exported as mesh have now uv geometry. The UV-geometry is not optimal though.. I did a little experiment with a dummy hair-picture as texture:

Thursday, February 4, 2010

Real-time detail modeling

The last few days I rewrote the detail modeling to have real-time changes when moving the sliders. The feedback from the other developers has been mixed, as some PC's and OS's seem to have trouble doing all the modifications in a short timespan. If you use an svn build, and tried the new detail modeling we would like your feedback on this feature.
Note that the first time you use the slider, it will be slower because of file access, since the targets are loaded from file. After that it should be more fluid, as the targets are kept in a cache.
Internally there is a way to disable normal recalculation or real-time updates completely, but we would like to make it fast enough for everyone, rather than adding a gui to disable this nice feature.

Developing in makehuman - 1 - Plugins

Alpha4 makes it a lot easier to write new features for makehuman without touching the existing code. This was not possible before, which made it more difficult to accept user submissions, as we had to review changes which went into the official code.
Starting from alpha4 we have a small plugin framework which makes it easy to add and remove features. At startup, makehuman now looks for .py files in the plugins folder which are not starting with an underscore (which makes it easier to disable unwanted plugins). It loads them one by one and calls the load entry point passing a reference to the application. The plugin can use this reference to add the necessary GUI widgets or code to the application.
Currently we have moved all render exporters to the new architecture. Since not many people will have all renderers, and since not all render exporters are as updated as aqsis, this move makes it easier to only enable what users need.
Besides cleaning up existing code, we have been using it to prototype new features. Kirill made a new panel to adjust and see basic measurements of the model in cm. I made a panel to adjust the hair color before rendering in aqsis, mainly to see how usable the API is to create new features.
The rules for plugins are very simple:
  • A plugin is a .py file in the plugins folder with a load entry point.
  • A plugin only imports core files.
The reason a plugin cannot import other plugins is that it makes it difficult to know which files belong to which plugin. We still need to define a convention for shared files beyond the core makehuman files.
To get started, download alpha4 or a later version from svn and look at example_plugin.py or any of the other plugins to see how you can create your own feature in makehuman.

Tuesday, February 2, 2010

Tutorial:Render Hairs (curve export) for "dummies" (of Blender)

Ok.. it's time I show the modellers I can also do some (little) modelling and not only programming :P ..

What you need:
1. Blender 2.49b
2. Makehuman latest nightly build

What we want:
Get the hairs exported and render it in blender.

This tutorial not only show how to render hairs from makehuman, but any nurb curves (because Blender internal render engine will not show nurb curves). And it's so easy.. it's all in only 2 steps! 

Step 1. Makehuman

Start Makehuman, then select libraries 

From the Libraries, choose say the ponytail hair...

Now the heads will make a cool looking rotation (who programmed that? kudos to you! :D ), and the ponytail goes in front.. but no its not yet selected ;) - It just rotated for you to become comfortable selecting it (I didnt programmed that)-- To get it REALLY selected you need to double-click the ponytail.. like so  *click-click*

And suddenly pop comes the hair on the model.. *pop*

Now go back to the Libraries and you notice several things:

  • The "test" hair is back in the center. Don't worry about that (I'll soon write a fix in the code.. just bear with this.. its a nightly build anyway :P)
  • There's a weird number on the top of the "Save" textbox. Don't mind that. It's for experimenting the different hair-ribbon width. You can play with it if you want. Giving a real number between 1.0 to 100.0  will change generated hair-ribbons on the base model (just give a new number say 3.0 then chose a hairstyle.. then *pop with width 3.0*) 
  • The radiobutton "Save to Wavefront .obj as Curves" should be selected for the tutorial..
  • Please leave the default filename "saved_hair.obj", otherwise it won't save properly. There is a bug I need to fix somewhere in the code.

Okidoks.. we can now... 

Tip: Did you know this cool feature (easter egg?)... Press Ctrl-F11 (at least in Windows).. and you will see that makehuman will own your entire screen :D

Step 2. Blender

Open Blender (make sure you have 2.49b or higher, because obj import with curve support works only after or equal 2.49b). Go to File-->Import-->Wavefront (.obj)

A window comes asking you where the obj file is. Now guess where your file was saved? Temporarily I coded it so it saves in model directory. In Windows its pretty easy landing yourself there. As illustrated below,  just choose the  thingy and then from there choose your  "My Documents" folder.

And Presto! you can now choose your makehuman folder

choose it then choose the "model" Folder now choose your "saved_hair.obj" file and then choose "Import a Wavefront OBJ"an "Import..." window pops. Quickly, without even thinking what all the buttons say press on the "Import" button.

Now look, we have the hairs imported as curves :)  .. That's pretty neat. But apparently (in Blender 2.49b) there is a bug somewhere (I think its the blender import_obj.py script). There are points that forgot to connect themselves to the curves (each is supposed to be an end-controlpoint of one of these curves)

Well as a temporary "fix" we just delete those points.. luckily we can select all with one click (I am not sure myself why :P).  Right click on only one of those points (not the curve).. and all of the hanging points will be selected. Like so... *right click* (checkout the mouse  at  the most bottom part where I selected only one point)Now in Object mode of Blender try to choose all of the hairs (don't choose anything else.. like camera or lights). Here is where you can show your "B" skills in Blender. Press "B" in the Object mode, then enbox the hairs and you got them chosen

Our goal is to Join the whole objects (Why? .. because we want to edit them ALL at once in Editmode.. and we wouldnt want to do each strand one by one). Thus (still in Object mode), press Ctrl-J. Now Blender is a bit weird. It didn't allow me to join several times when I tried selecting. It complained to me that the the objects aren't of the type that can be joined. So make sure only the hairs are selected. If you still have problems joining, try to select by parts i.e. use your "B"-skills twice.. select half of them then press "Shift+B" (so you wont lose the first selection while selecting more) and select the rest of the hair. 

So now things get joined and they look like so..

Step 3: Still Blender (oops.. there's a Step 3!)

If you are in Objectmode press "Tab" to go to Editmode (while the whole joined hairstrands remain selected)

choose the  ("Editing")  thingy and then choose "Bevel Depth" in "Curve and Surface"ok.. now what I am about to tell you isn't really supposed to be used by us in this way.. but it works great in our case and we are lazy geniuses/genii who want to exploit the functionality of Blender. Bevel is usually used for edge of surfaces and we have a nonexistent "curve" in the 3-dimensional affine plane over the real field... eh... Anyway, Blender allows us to "Bevel" on curves and the weird result is what we want. 

After choosing Beveldepth, give it a value of something like 0.05 (or lesser if you want thiner hairs rendered). Guess what happened? You might not have seen it clearly in Editmode, but in Objectmode the curves turned into some sort of mesh nurbs giving actually a real object to render! Just what we want :)

Press the  thingy (in Panels.. this thingy is called "Scene", you get it by pressing F10 too) . And you can then press on Render (using Brender internal render engine). Like so...

Now you get a cool hair render :) 

Ok. Thanks a lot for reading it up to here and sorry for the bad english and for being unecessarily funny (or silly) and very informal in this tutorial. I hope this was palatable to the commoners.

© MHteam 2001-2010