[Blender 2.79/2.92] Importare oggetti (bene) con Link | Import objects (well) with Link

Importare un oggetto con “Link” non permette nemmeno di spostarlo. Usare gruppi e override consente anche di cambiare materiali e texture.
Il risultato ottenuto sarà che la mesh originale sarà contenuta in un file e verrà importata nel nuovo file con un riferimento relativo, così che non occuperà il doppio dello spazio. La procedura è utile per creare singolarmente oggetti articolati in file separati da unire in una scena composta, ad esempio se il lavoro è svolto da persone differenti.

Tutorial sui materiali: Corso Blender 2.79 – Lezione 02 – Materiali, Texture, Luci, Render

Importing an object with “Link” doesn’t even allow you to move it. Using groups and overrides also allows you to change materials and textures.
The result will be that the original mesh will be contained in a file and will be imported into the new file with a relative reference, so that it will not occupy twice as much space. The procedure is useful for creating individually articulated objects in separate files to be merged into a composite scene, for example if the work is made by different people.

Tutorial

Parte 1 (Blender 2.79)

È essenziale che l’ oggetto da importare sia contenuto in un gruppo. Questo permette sia di importare anche i suoi figli che di muoverlo.

Nel video uso alcuni Addon.

  1. Crea un nuovo file, cancella il cubo e salva per verificarne la dimensione
  2. Crea la scimmia (o qualsiasi altro oggetto che vuoi texturizzare).
    • Fai prima Unwrap e poi Subsurf (Ctrl+4), altrimenti rischi il crash del programma!
    • Subsurf serve per aumentare il numero di poligoni e la dimensione del file per dimostrare che la mesh rimane nel file originale.
  3. Aggiungi altri oggetti e poi Subsurf (Ctrl+4)
  4. Applica i modificatori Subsurf
  5. Imposta le parentele con Ctrl+P
  6. Seleziona nell’ outliner tutti gli oggetti da raggruppare selezionando il genitore con Ctrl+Click
  7. Ctrl+G per creare il gruppo (e dagli un nome)
    • Nel menù di aggiunta sarà presente il gruppo
  8. Vai in Compositing e crea dei materiali per tutti gli oggetti
    1. Nel caso della scimmia crea un materiale qualsiasi molto complesso del quale vorrai impostare una texture differente per ogni istanza dell’ oggetto
    2. Seleziona tutti i nodi dell’ oggetto ad eccezione della texture e crea un gruppo con Ctrl+G

Parte 2 (Blender 2.92)

Nota: in questa versione di Blender ScreenCast non è preistallato, se ne hai bisogno puoi prelevarlo da https://blender-addons.org/screencast-keys-addon e sembra pure vada attivato volta per volta. In ogni caso il suo funzionamento rimane un’ incognita: se è già attivato ed esco va riattivato. Sa di errore progettuale. La possibilità di personalizzare i tasti di scelta rapida forse aiuta chi viene da altri programmi, ma certo crea non pochi problemi nella realizzazione di tutorial (e nel seguirli).

  1. Elimina il cubo (questo è raro 😉)
  2. File > Link > Seleziona il file da importare > Collection (pare gli abbiano cambiato nome) > Pulsante Link
    • Se “Relative Path” è selezionato i riferimenti saranno relativi e sarà possibile spostare in blocco i vari file.
    • Per qualche ragione il file appare importato in due differenti voci nel menù di aggiunta
  3. Seleziona la collezione nell’ outliner (oggetto esterno in arancione, non quello interno in bianco)
  4. Object > Relations > Make Library Override > (dal pop up) Make Library Override
  5. Nell’ outliner: scheda Material > Tasto DX sul materiale della scimmia > Define Override
  6. Imposta “Object” dal menù con icona triangolare (un po’ diverso da come riportato qui)
  7. Clicca sull’ icona Link con Ctrl+Click
  8. Vai al Tab Shading e seleziona il materiale
  9. Salva il file accanto al sorgente
  10. Ora puoi cambiare la texture
  11. Crea una copia del gruppo con Shift+D e Alt+D (funzionano entrambe)
    • Avendo cura di aver selezionato tutti i figli
    • Noterai che cambiando la texture verrà applicata la stessa a tutte le istanze
  12. Crea delle copie del materiale (o creane di nuove usando il gruppo di nodi) ed imposta una texture differente per ogni materiale. Ogni istanza della scimmia avrà il suo materiale. Consiglio di nominare ogni materiale come “Nome originale\Nome texture”

Parte 3

Cancellare gli oggetti importati lascia dei residui. Dovrai cancellarli manualmente. Se poi vorrai reimportare gli oggetti dovrai ripetere la procedura della Parte 2.

Parte 4 (extra)

Se devi importare un oggetto privo di meteriali:

  1. Assegna un materiale qualsiasi dall’ elenco, tra quelli in scena
  2. Vai sull’ icona a triangolo e seleziona Object (il materiale sparisce)
  3. Rimetti il materiale qualsiasi di prima
  4. Clicca sul numero di istanze del materiale per crearne una copia

Ora si può modificare. Probabilmente: l’ importazione oggetti non è progettata molto bene.

Tutorial

Part 1 (Blender 2.79)

It is essential that the object to be imported is contained in a group. This allows you both to import its children as well and to move it.

In the video I use some Addons.

  1. Create a new file, delete the cube and save to check its size
  2. Create the monkey (or any other object you want to texturize).
    • Do first Unwrap and then Subsurf (Ctrl+4), otherwise you risk a program crash!
    • Subsurf is used to increase the number of polygons and the file size to show that the mesh remains in the original file.
  3. Add more objects and then Subsurf (Ctrl+4)
  4. Apply Subsurf modifiers
  5. Set parentheses with Ctrl+P
  6. Select in the outliner all the objects to group selecting the parent with Ctrl+Click
  7. Ctrl+G to create the group (and give it a name)
    • In the add menu the group will be present
  8. Go to Compositing and create materials for all objects
    1. In the case of the monkey create any very complex material of which you want to set a different texture for each instance of the object
    2. Select all the nodes of the object except the texture and create a group with Ctrl+G

Part 2 (Blender 2.92)

  1. Delete the cube
  2. File > Link > Select the file to import > Collection (it seems they changed its name) > Link button
    • If “Relative Path” is selected the references will be relative and you will be able to block move the various files.
    • For some reason the file appears imported in two different items in the add menu
  3. Select the collection in the outliner (outer object in orange, not the inner one in white)
  4. Object > Relations > Make Library Override > (from pop up) Make Library Override
  5. In the outliner: Material tab > Right click on the monkey’s material > Define Override
  6. Set “Object” from the menu with the triangular icon (a bit different from the one shown here)
  7. Click on the Link icon with Ctrl+Click
  8. Go to the Shading Tab and select the material
  9. Save the file next to the source
  10. Now you can change the texture
  11. Create a copy of the group with Shift+D and Alt+D (both work)
    • Making sure you have selected all the children
    • You’ll notice that changing the texture will apply the same texture to all instances
  12. Make copies of the material (or create new ones using the node group) and set a different texture for each material. Each instance of the monkey will have its own material. I recommend naming each material as “Original Name/Texture Name”.

Part 3

Deleting imported objects leaves residue. You will have to delete them manually. If you then want to re-import the objects you will have to repeat the procedure in Part 2.

Part 4 (extra)

If you need to import an object with no materials:

  1. Assign any material from the list, among those in the scene
  2. Go to the triangle icon and select Object (the material disappears)
  3. Reinsert any material as before
  4. Click on the number of instances of the material to create a copy

Now you can edit. Probably: the object import is not designed very well.

Commento

Avevo già pubblicato un articolo sull’ importazione di oggetti, ma si trattava di una copia integrale.

Una cosa che mi ha sorpreso è l’ impossibilità di impostare una texture associata all’ oggetto e, nel materiale, indicare di usare quella texture. Non ho mai avuto modo di provare ma pare che in Blender Render fosse possibile. Questo avrebbe ovviato al problema di dover creare tanti materiali quanti sono le varianti dell’ oggetto. Anche perchè non è possibile raggruppare i materiali.

Ho provato ad importare dalla cartella Object e ad imparentare ad un Empty ma non consente di spostare l’ oggetto.

Per completezza segnalo anche l’ esistenza di questo che però non sono riuscito a far funzionare, probabilmente per via dei percorsi assoluti.

“Make Library Override” Esiste almeno da Blender 2.91 (che non è LTS). Non ne ho trovata traccia nel 2.79.

Il principale inconveniente di questo metodo è che si allungano i tempi di caricamento del file (e, ad esempio, quando fai i rendering deve reimportarsi tutte le texture dai file collegati). Inoltre non ho trovato delle statistiche circa quanti sono i dati importati (in byte).


Purtroppo esiste la possibilità, creando il file sorgente, che si creino tanti gruppi inutili. Leggi come Cancellare Collection/Group inutilizzati.

Alla fine conviene anche cancellare le collection importate (il contenitore, non il contenuto), così da non avere gli oggetti replicati due volte nell’ outliner.

Lascia un commento