Monday, November 26, 2012

Normal Map Plugin - GIMP


TIP OF THE DAY
 
I'm back just to share a very simple trick that I didn't know before: how and where to find the GIMP plugin for Normal Maps. This is a very useful plugin  as it works like Nvidia plugin for Photoshop, but it runs on GIMP and therefore on Linux.

So: I first decided to download sources and compile it on my own... I've solved some dependencies but I was still stuck on a "Package gimp-2.0 was not found in the pkg-config search path. [...]". Too much time. I was needing it to work immediately.

Then I discovered the packages:
  • gimp-data-extras
  • gimp-plugin-registry 

These packages come with lots of plugin, and what I need is under
Filter -> Map -> NormalMap

Ready to use and working like a charm.

Pietro 


Tuesday, September 18, 2012

Environment maps on Sketchfab!

Here we are!
Sorry but I've been really busy and I'm gonna be even more :)

So... because of the few time which I've got I'll pulish three works together!




ONE

The first is a simple geometry with a totally reflecting material applyied. 



The cubemap
In order to get the final result I've used the same cubemap on sketchfab to texture a big cube in my Blender scene. If you need them, you can find them on Humus for free.
For this purpose I've setted up eight different materials but you could also use the same and play with UV's placement.
Anyway, the cube's material is an emitter (emission=1.0).

The light
Another remarkable details: I had to place a point light in the center of the scene because elsewhere the inner reflection were totally black. Try it on your own.

The UVs
Of course, I've unwrapped one sphere and one cylinder at the early beginning. That's necessary if you want save time after, because if you want to bake textures you NEED to unwrap.
Nie vergisst!

The baking
I've baked textures as usual and created the new material (one for this scene); this is a very simple lambert shader with no specularity and only the baked texture applyied.

A blender viewport snapshot:




The SSAO

Oh my God, what's that!? Yeah, now we can use SSAO (like Ambient Occlusion) without bake it. Nice, but what about the values?
As I've digged quite a lot with those values I wish to publish my personal setup:










TWO

The second one is an old model (do you remember about my Christmas 2011 postcard?) with matte materials, no raytracing; this is meant to play with lights only.



The cubemap
No cubemap here! Only some lights around to fake image's lights.

The light
Not so complicated setup, but... there are no rules for this. You have to follow your own feeling about lights and image. For this scene I've used 7 lights (2 spots, 5 points) but you can do what you want and do it better.

The UVs
Only needed for wood texture. No complicate unwraps.

The baking
No baking... :)

A blender viewport snapshot:



The SSAO
The setup for this scene:








THREE

Oh... something new? Ok, this is the same as the first except for texture's resolution (bigger) and for blurry metal applyed to the external structure.




A technical note: in the third scene I've used two textures 4096x4096 each. So... don't worry about texture's management, because Sketchfab is really powerful.

Ciao!
Pietro

Sunday, September 2, 2012

File sync with Ubuntu 12.xx

Hi there,
yesterday I had a little problem: compare two directories in order to update each other, getting back two perfect copies. Easy.
I was used to compare directories with Sync'n'Go with Windows, but... now I'm working with Ubuntu! So, do you know a good utility to get the same result?

After a little google surf, I found Meld Diff in the official Ubuntu 12.01 repository. It has a very minimal interface, but it doesn't work on my pc: infact while it can compare two (or more) directories but the button "Copy right" (or left) doesn't do anything.

So I've googled a little more, and I've found FreeFileSync and it's working very well. I'm planning to use it for backup purposes as soon as I'll come back to my office in Milan.
You can download the executables, the sources, or simply add the repository to yours and install it through apt-get:

sudo add-apt-repository ppa:freefilesync/ffs

sudo apt-get update

sudo apt-get install freefilesync


Now you can find it in you dashhome, typing "FreeFileSync" and of course, you can also pin it into you launchbar!

Sunday, August 26, 2012

Converting HTML hex color to RGB value

Hi everyone,
I had to solve a little problem: converting hex color value (like CSS/HTML color code #FFFFFF) to a blender friendly color code (a triplet of float numbers, range(0,1) like (1,1,1)) and back again.

Ok: this is not THE problem, and maybe lots of you will be laughting reading this, but this has been MY BIG problem for 30 minutes. And I've got to thank a lot Alvaro Moe from OpenTechSchool workshops (Berlin), a very skilled Python and Javascript developer who is spending his days at Campus Party Europe with me. So... let's go!




1 - From HTML color to CG color:


Taking this light-blue color HTML hex code #1075f5 is built this way:

# - the identifier
10 - the value for Red channel
75 - the value for Green channel
f5 - the value for Blue channel

Each couple can handle 0-255 value. As standard, if we have one number only we've to add '0' in front of it to keep six element rule. In this example we won't take care of alpha value because it's not handled by 'color picker' element but you can add it easely.

First of all, let's convert a simple HEX couple (the first, RED channel) to a FLOAT number; Javascript gives us a nice instruction in order to do this:
Now we need to map the 0-255 value to a 0-1 scale. Let's divide it for 255:


Let's do it for each channel:

Ok, but <color_picker>.value is a string. I've got to parse it to get the single couples, removing '#' symbol and slicing the couples:

  • splitted = hex.substr(1);
  • red = parseInt(splitted.slice(0, 2), 16) / 255;
  • ...splitted.slice(2, 4)...
  • ...splitted.slice(4, 6)...
Genau! Now we're ready to build our function:








2 - From CG color to HTML color:

And now, let's invert the process!
Our function will take as input an array on float numbers, ranged between 0 and 1, and will return a string.
The Javascript function to translate a number to a string value is this:
By the way, we'll have an array and we need to multiply the value for 255:
Next step: checking if the value is less or more than 'F'. Why? Because we need to build a string.length = 6 plus the '#' character elsewhere we'll not perform a correct conversion.
  • if (r.length == 1) { r = '0' + r };
As last step, let's compose the final string:
  • hex = '#' + r + g + b;
We're ready to build our new function:




As I've written before, I'm not handling alpha channel because I don't need it but you can do that in few minutes if you want.

Greetings from Berlin and Campus Party Europe!
Pietro

MissGelo on Sketchfab - Emit material

Hello,
here's my last release on Sketchfab:


What's that? This is an original italian product, made in Sicily, and her name's MissGelo; this machine can help you in making a perfect sicilian granita.
As I've made the animation when the product has been launched, I wanted to rebuild it for realtime visualization too. I think that 3d animation is a nice and powerful tool for presentation and advertise but I think also that a realtime experience could be a better way to explore and check a product before to buy it. You can look closer, change perspective and study color and shapes.

I would like to publish a "making of" too, but unfortunately I cannot share these data because of contracts and industrial secret. So... I can just give you some more tips in order to have a nice result while using Sketchfab.


Lights

For this scene, I had to illuminate a big box. And this is not only a simple box, but a metal box, that involves reflections; this is in my opinion a good example of a simple object hard to light correctly.
I've started with the M.White light setup, because it is useful and simple, but:

  • I've doubled the fill lights, so they're four now
  • I've added two cold lights, one for the top and one for the bottom
  • there's no keylight but only the main specular
  • I've removed backlight and "white pusher"
It's important for this scene to have a more uniform lighting.
I've baked ambient occlusion and textures, even if AO now can't help too much because we haven't got some holes or complicated shapes: technically it's just a box with some buttons and textures. But anyway, some AO is better than nothing.




About auto-illuminant material

Yes, it's not only possible but it works very VERY perfectly. The exchange between Blender and Sketchfab is really transparent and extremely easy: what you see is what you get.
The emittin material you can see in my work is a simple Lambert shader with "Emit" parameter setted to 0.40. Nothing more.
I suggest you to focus a lot on specular's effects of each light, because is really what give you the difference between each scene and shader!


And as last, the previous animation:



Ciao,
Pietro


Saturday, August 18, 2012

Hi,
as I'm working on a new model for realt-time visualization I wish to explore normal and bump mapping. In particular, what I'd like to have is a quick reference table with those "magic values" that will work in almost every situations.
Of course, I don't believe in "magic values" to make your BEST rendering ever, but everyone knows that if you begin from a solid and quick start you can trigger and tune later your results to the top.



Now, the scene:
this is a very simple blender's scene, with six couples (half sphere + plane) showing the same shader per couple (total: 6 materials). Material's base is the same, what change are image source for test (normal map on the left, bump map on the right) and the value of "Normal" influence.

This is the raw render in Blender:


As you can see immediately, a normal map gives a better result and, most important, is almost the same as showed in Blender rendering; so you can get a perfect feedback of your work while making it.

Normal/Bump maps from Eat3D

Ciao,
Pietro

Tuesday, August 14, 2012

Translating a 3D still into realtime engine. Game? No, design!

Here I am!
Time for an update.

First, I'm glad to publish my second Sketchfab work:

This is based on my previous work named M.White, that is a remake of a job I made during my teaching activity; here's the original image:


Now, the reason why I feel so satisfied of my result on Sketchfab is that while the original image has been made in 3DStudioMax, rendered in VRay and retouched in Photoshop, while the realtime stuff has been done in Blender, rendered with Blender Internal engine.
As a plus, you can explore the model and look at it from different point of view.
It is exactly what I have been trying to doing with WebGL, but is ready to go.

Why did I choose Blender? Firstly, I love Blender and I like in my spare time dig into it, trying different solution of rendering setup and modeling techniques. Therefore, the Blender textured preview is amazingly the same of Sketchfab viewer! 
Look at the following images.

This is the Blender Internal render, without postproduction: only the raw render.

 And this is the model as showed by Sketchfab:


This is really helpful, because when I tried to do the same operation the most hard task was to "guess" light power, color, and material features: the export and the conversion (remember: you're migrating from a render engine to another) could make a mess of your carefully-crafted setup.



Those boring technical stuff

Now, I wish to suggest you some technical stuff and tricks I've discovered making this work, because it's not so easy transpose a scene designed for a powerful raytracer as VRay to a WebGL engine.
The first thing you have to know is that at the moment shadows and area light are not supported.
Due to this important note, the key to present a decent illumination is to study it and to think about it. Maybe that too much automation made us stopped thinking, so why not try to do it again?


Ligths

This is my setup, based on a classical 4 point lights (1 keylight, 2 fill, 1 backlight) with 2 more helping lights: the "main specular" and the "white pusher" (no dude, it's not what you're thinking about...).


  • keylight: in my scene is totally wrong; it's insane indeed to place a keylight behind the camera. But this is not a raytracer, so let's go with "creative lighting". Here the parameters:
    • color = [1,0.949,0.867]RGB
    • energy = 1.0
    • falloff = inverse linear
    • no shadow
    • no specular
  • hot_fill: this add that hot feeling on the right and let you bring some light where keylight can't. Parameters:
    • color = [1.0,0.66,0.257]RGB
    • energy = 1.0
    • falloff = inverse linear
    • no shadow
  • cold_fill: because of karma, if you put something hot you'll have something cold too. 
    • color = [0.269 , 0.533, 1.0]RGB
    • energy = 1.0
    • falloff = inverse linear
    • no shadow
  • backlight: sometimes people forget about the backlight, but that's a shame as it helps you to sculpt the edges of your model and can be useful to create some tension behind the polygons.
    • color = [1,1,1]RGB
    • energy = 0.60
    • falloff = inverse linear
    • no specular
    • no shadow 
  • main_specular: I've added this to get more directional and controlled speculars; I needed more control on them because of the metal-like material.
    • color = [1,0.949,0.867]
    • energy = 1.0
    • falloff = inverse linear
    • no diffuse 
    • no shadow 
  • white_pusher: this is the trick I've used in order to push out the white of the chair's top; don't forget that we're working on a white image material to be showed on a light gray background... it's not that easy.
    • color = [1,1,1]RGB
    • energy = 0.480
    • no specular
    • no shadow 

Ambient Occlusion Pass

In addition to this cool lighting setup, we can add some Ambient Occlusion in order to enhance details and to bump-out the model shapes. Anyway, we need to bake AO pass directly in the diffuse texture because it will be calculated by Blender Internal but not by the WebGL engine. Then, the first thing you have to do is to unwrap your model: for this reason people is used to say always "KEEP A NICE TOPOLOGY!"
A nice topology is the ground for good smoothing, working subdivision surfaces, correct reflecting materials and wonderful texturing. And for baking process, of course!
If you don't know how to unwrap your model, I suggest you to begin from one of the millions of tutorial on youtube.



Unwrapping maybe tricky, specially if you haven't followed a clean and nice topology in modeling your 3D object. Luckly, baking Ambient Occlusion is incredibly easy: just setup you World (I've choosen 16 sample per pixel, Adaptive QMC, treshold 0.01), select the object, create new texture (mines were 2048x2048) and click "Bake" selecting only "ambient occlusion".
You can bake what you want, of course!


Shaders
Just create one material per object and assign as texture the correct one. Don't forget to save baked images before leaving Blender!
Now two words on shader: they MUST be very simple, mainly due to WebGL limits. And also because the simpler = the better, never forget it.

From the left: the metal, the disc-metal, the top-sitting:
 



















Ambient occlusion texture is assigned to "Diffuse: intensity 0.5" I came to this solution after some test and this was my best.

Last but not least: once you've finished your scene and you're ready to go, rember to pack textures into blend files. This is useful if you upload it through Sketchfab interface, otherweise you can use the excellent Blender Exporter of Bart Crouch

UPDATE:
sorry I've forgotten to upload the scene. Here you can download it!

That's all for now,
I'm working on my next realtime model: more complex, more cool.

Ciao!
Pietro

Friday, August 3, 2012

Appunti per 3D Studio Max - principianti - ITA

Mettendo ordine nei miei hard disk ho trovato queste dispense datate 2010: si tratta di tre PDF a supporto di un corso che che feci ai tempi per CompuntoUnico (MI) e che servono come compendio alle spiegazioni.
  • Il primo è una breve introduzione all'interfaccia di MAX, con un riassunto delle combinazioni di tasti più utilizzate e dei problemi più comuni per chi inizia.
  • Il secondo è un tutorial in più passaggi per la modellazione di una piccola vetrinetta espositiva: il tutorial è pensato per presentare gli strumenti di MAX a un pubblico di principianti, ed attraversa modellazione poligonale, primitive, modellazione parametrica, tool di selezione ed allineamento, modellazione per spline e l'uso di alcuni modificatori.
  • Il terzo documento riassume i parametri principali del motore di resa Mental Ray ed il rapporto di questi con la Global Illumination.
CLICCA QUI PER IL DOWNLOAD

E' importante tenere presente che questi documenti da soli non rappresentano un corso, ma sono studiati a supporto di un'attività didattica continuativa seguita da un docente. Ho deciso di rilasciarli sotto CC perchè possono essere utili, soprattutto il primo ed il terzo, come piccolo breviario dei parametri più utilizzati e degli errori più comuni.

Sono benvenuti suggerimenti ed impressioni.

Ricordo inoltre che sono disponibile da settembre a novembre a Milano per lezioni private e/o aziendali, mentre ad agosto sarò a Berlino e da novembre, probabilmente, a Parigi.
Insegno indifferentemente in lingua italiana e inglese, ed in lingua tedesca solo il corso introduttivo, 3DStudioMax / VRay / MentalRay / Blender.

Buona lettura,
Pietro

Thursday, August 2, 2012

Upside down - Escher tribute on Sketchfab

Hello,
I've just terminated my last personal work. It's a simple architectural model inspired by Escher operas: an house made by mixed walls and railings, where you can't find a direction or a reference.
As my first Sketchfab experiment, I would make something planned to be explored and watched from different point of views. I think that the power of realtime visualization is that you are not locked to a single point of view or an animation timeline: you can create indeed your own story and everyone can get his own personal experience from the model viewing.
I tried some framework for webgl developing (three.js, p3d, osgjs, ...) but I found Sketchfab very comfortable and easy to use.



The model is done entirely in Blender 2.6x by me except for men, that are MIT_Stickman from Michiel Tieleman, a very nice and skilled Blenderartist's user.
Shadows and Ambient Occlusion are baked into textures, while lights are loaded directly from Blender: the very cool feature of Sketchfab is that they provide you Sketchup, 3DStudioMax and Blender free exporter and you're able to load your scenes from the software.
Another very cool thing is that you can also load .blend files with packed textures and it will be ready to go in a few seconds, depending on file size (mine was about 6Mb and tooked a minute from file picking to scene live exploring on the website).


Here's more render of my work:




  


Ciao!
Pietro

Wednesday, August 1, 2012

Camera target in Blender 2.6

Ok, this could be obvious for most of you. For me it wasn't and I have to search for it every time I begin a new work.

So: in 3DStudioMax you have "free camera" and "targeted camera". The former is only a camera which can be translated and rotated, the latter is a camera linked to a dummy object (the target). You can't rotate this kind of camera because it rotates itself looking to the target.

In Blender you've got only one Camera, which is a "free camera" type; but what if one (like me) feels more comfortable moving the target and having a camera that looks at it?

1 - create a camera [shift+A, "camera"]
2 - create empty object [shift+A, "empty"]
3 - select camera
4 - select empy [shift+select]
5 - make track [ctrl+T]
6 - select "track to constraint"

I think this is the Blender way for 3DS' "look at" constaint.


Ciao!
Pietro

Monday, July 23, 2012

Sketchfab model

Hi,
I'm playing around with webgl technologies and I found Sketchfab.
Its viewport management is really fluid and amazing, so I tried to stress it with an heavy model like this gate I made for an animation:

It's easy to use and they've developed exporters for Blender, Max, Sketchup, and support lot of formats for upload. Pietro

Thursday, July 19, 2012

Chrome Issue: read local files

Ok guys,
I'm working on my own WebGL project (using Three.js) and I've got a problem:
  • if you open a webgl page on a website with chrome it works
  • if you open the same page on a local directory it doesn't works
  • the console message is this:
Ok this is caused by bigG's security policy, and we should be happy for this... so nobody can access our local files from a script. But what if I need to do it?
  1. You can run chrome with these options: --allow-file-access-from-files
    • Ok, but you have to make a different executable for it, set it as standard application for HTML files (but forgive your security...) or open manually your page (ok, works but... you need to be quick and simple in testing your scripts). 
  2. A more professional solution: run a webserver on you machine and test the javascript application through loopback interface
    • Nice! But... I'm not a webmaster or sysadmin. I'm already learning Javascript please I need to focus on ONE thing... 
  3. A simple and professional solution: use an IDE
    •  Yeah! Once you set-up your "run" targets it works very very good. Simple, fast and solid.
What you said? IDEs aren't fast?
Yes, you're right!
There's nothing faster than an "notepad" or "gedit" or a really hardcore "vi".

But when you've got to manage more than 3 files linked, IDE saves lot of time if is well configured.
I've been using Eclipse working on a big Android projects and it worked quite good but... with .js files is really slow.
So, two days ago it has hanged three times in a morning: now I'm using Aptana and it's really really faster. I suggest it to everyone for Javascript developing.

Ok, I just wanted to share my experience because I've found lot of people on internet asking for the same problem.

Ciao,
Pietro

Wednesday, July 18, 2012

3D Recruitment in Germania

Ciao a tutti i 3D Artist italiani!
Dal momento che sono a Berlino ormai da due mesi ho accumulato un po' di indirizzi utili per chi vuole provare a cercare lavoro qui e più in generale nella grande Germania :)
Tenete presente che è fondamentale per tutte una conoscenza eccellente dell'inglese ed è più che consigliata una buona padronanza del tedesco, soprattutto fuori Berlino, dove peraltro c'è MOLTO più lavoro per un 3D Artist... qui nella capitale vanno fortissimo i programmatori e più in generale i mestieri legati allo sviluppo web.

Ad ogni modo, ecco la lista (che continuerò ad aggiornare):
  • http://www.dasauge.de
  • http://www.crew-united.com/
  • http://www.facebook.com/pages/3D-Jobs/177733002268898?ref=stream
  • http://www.3dscout.com/stellenangebote
  • http://jobs.justlanded.com/en/Germany_Berlin/Designers-Creative/1
  • http://www.darwinrecruitment.com/
  • http://germany.xpatjobs.com/jobs.aspx?areas=6&job_type=4&language=&keyword=3d&search=++Update+Search+Results++
  • http://berlinstartupjobs.com/
  • http://www.absolventa.de/
Qui invece due risorse sull'apprendimento linguistico DIY:
  • http://www.busuu.com/
  • http://livemocha.com/
  • Android App - Busuu - Eccellenti e davvero ben fatte, disponibili per più lingue. Di base sono gratuite, consiglio caldamente di acquistare gli extra (costano poco e si prendono poco per volta) e di seguire regolarmente gli esercizi.
  • Android App - Babbel - Vertono principalmente sui vocaboli. Anche queste ben fatte, un po' più limitate di Busuu ma eccellenti per acquisire tanti vocaboli in poco tempo. Le consiglio dopo aver preso confidenza con la struttura linguistica e i suoni.
  • Michel Thomas Language Courses (solo a pagamento): sono un po' costosi ma vi daranno l'input migliore. Io li sto usando tutt'ora per l'Arabo e sono semplicemente stupefacenti.
Preciso che non sono un genio e ho imparato il tedesco in circa otto mesi di esercizi intensi, prima di partire. Chiaramente una volta arrivati qui è necessario ambientarsi prima di parlare tranquillamente ma la base è: STUDIATELO PRIMA.

Buona fortuna col lavoro!
Pietro
 

Saturday, July 14, 2012

Hi there,
I've uploaded another free material on BlendSwap:


This is the same stone I've used in my last project (see below). It uses two different UV channels for diffuse and displacement, just open blend file and you'll see it.

In order to reset all UVs in the displacement channel, I used this useful command via python console:
  • bpy.ops.uv.reset()
Just select all polys and type this to get all vertices disposed in your UV/editor.

This is a render preview:


I hope you'll find this useful and interesting as it is for me!
Textures are packed with blend file.

Pietro

Wednesday, July 11, 2012

Material: Aluminium Hedar

Hello,
I've just uploaded my first material on BlendSwap:
You can download it and use for your works. Textures are made by me and realeased under CC.
 


this is the reference:


It's done in Blender 2.63, for Cycles and uses displacement in order to achieve best result.
Of course, you MUST unwrap your model to manage textures.

Post here you're works if you wish! I'm curious about your feedback!
Ciao,
Pietro

Wednesday, July 4, 2012

A little work

Very very small work, but it's summer and customers are waiting for September in order to start with projects...
Anyway, I consider this a remarkable work because it has been done entirely in Blender 2.6!
I used QCad (3.0rc5) and AutocadWG (on chrome) to prepare DWG files, Blender to match the camera and model, and Cycles for rendering stage.
Postproduction and photoreplacement with Photoshop.


Before...

I wish to post some screencast in order to show you my workflow with architectural projects.
First, I import DXF files with plants, sections, ... already cleaned and lighter than architect's version. I put them in the right position and begin to model over the reference.
As everyone usually teach, you have to study a little before: take your time to study the project and to identify symmetries, similar volumes, and all those elements that you can represent as instanced objects. This will save lot of time after.








During modelling stage I begin to separate objects with different materials, assigning materials with diffuse similar to the final shade. This is useful for shading stage.
Once I've modeled almost everything, I start to texture models that need this work. For example, as you can see in the image I've modeled all that 'columns' as single objects but during the shading process I decided to slice them.





Here I got a big object subdivided into lot of 'bricks'. I choose to do this beacuse of the material's feature and because in this way I was able to use my script very easly.



A few word about bushes and green stuffes: I've imported some models and I've used particle systems in order to get them scattered on surfaces.
I MUST thanks this guy: Agus3D on BlenderArtist beacuse he found and shared a usefull technique to manage tons of polys.
Have a look to this wonderful thread:
http://blenderartists.org/forum/showthread.php?249664-UPDATED-.bend-19-Billions-of-Polygons-not-a-ridiculous-number-anymore 



I want to share my shaders and textures with little tutorials about "how I did it". Please be patient, it requires time :-)


Greetings from Berlin,
Pietro

Thursday, June 14, 2012

MBE in Blender 0.9.9

HI!
News on Material by Element in Blender .263a:

  • Assign to Subobjects: assign to group of linked polygons inside an object
  • Assign to Polygons: assign to single polygons
  • Fill slots: fill active object's material slots with all material from selected list
  • improved UI
  • docstrings for operators and functions
feel free to use it, modify it and  including operators in your scripts.


Screenshot:



Thank you,
ciao!
Pietro

Monday, June 11, 2012

MaterialByElement - rewritten and updated!

11. June 2012 - Berlin


Sorry for the delay,
I've been really busy because I'm working between Milano and Berlin and it's no
simple setting up two different workspaces...


Anyway: I've finally rewritten Material by Element addon in order to be lighter
and more concentred on less tasks. And it's working!


Now, let's see how it works:
you've got two boxes in UI that relate to "material list" and "material"
management; the first menu selector is to choose current working list: it finds
them into the scene through a custom property (bpy.types.Materials.mbe).
This property is added to the scene if not found: its default value is "default
list" (really!?!)
There's a label that shows you which list is active (due to menu issue: check
TODO below) and two buttons: the former selects all objects with a material
belonging to current list applyied, the latter assigns to current selected
objects random list's material.
In the second box you can manage single material:
- "list" property assigns current material to a list ('default list' for
NONE). Just type in list's name.
- remove unused, select orphans and clear slot are the same as in the
previous version


Example:
I want to create the same rooftiles as before (I'm building rooftiles since
August 2011...); take the first object, create material and assing it to a new
list; take the second, assign the material just created, make it unique, modify
something to get a different material. Do this for six, seven times. Ok, now
select all you rooftiles object, select correct working list a click "Assign".
If you want to add new material to collection just assign it to list, select all
objects with first button and reassign all.
With the new 'mbe' property you can use different names, beacuse addon doesn't
care about names now.


What you said? Ok, ok... I understand: I'm upgrading a script and it holds at
least an half than previous version's functions... Du hast recht!
But I don't use that functions and I think that them make it less usable.
Anyway, I'm planning to integrate them as a 'plus' into the script, so you won't
have thousands buttons that you don't use.


DOWNLOAD LINK:
material by element - 0.9.7.tar.gz


ChangeLog (0.9.7):
 - the addon is now splitted into 3 files; to install it, simply unzip
'material_by_element.xxx.tar.gz' into you  addon folder and activate it in user
preferences/addon
 - you cannot generate new materials with random diffuse: this is beacuse in my
everyday work I saw that I never use it. And with cycles it's bettere setting up
every material each one.


TODO:
 - let list selector update itself as soon as you choose
 - identify 'subobject' quickly (quite difficult, please refer to blenderartist
thread: http://blenderartists.org/forum/showthread.php?256937-Get-list-of-selected-vertices-segment-polys-without-looping-the-entire-geometry





I wish to give my thanks to:
blenderartists.org forum - CoDEmanX, TrumanBlending, kgeogeo, batFINGER
Thomas Larsson - "Code snippets. Introduction to scripting with Blender
2.5x."
Mark Pilgrim - "Dive into Python"
Witold Jaworski - "Programming Add-ons for Blender 2.5"
http://blenderpython.blogspot.de/
Blender 2.5x official documentation (www.blender.org)

...sorry if I forgot someone, blender community is really wide!



Cheers,
Pietro