14.04.2013 Views

Integrando Blender, Boinc y Legión

Integrando Blender, Boinc y Legión

Integrando Blender, Boinc y Legión

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Integrando</strong> <strong>Blender</strong>,<br />

<strong>Boinc</strong> y <strong>Legión</strong>


<strong>Blender</strong>


¿Que es <strong>Blender</strong>?<br />

● Creación de contenido 3D.<br />

● Software libre.<br />

● Multiples sistemas operativos.<br />

● Licencia GNU General Public License.


<strong>Blender</strong> - GUI


<strong>Blender</strong> – Consola de Comandos<br />

blender [-b <br />

[-o ][-F ]<br />

-x [0|1]][-t ][-S ]<br />

[-f ]<br />

[-s -e -a]]<br />

[[-P [-- ]]<br />

# blender -b file.blend -x 1 -o //file -F MOVIE -s 003 -e 005 -a


Ejemplo de <strong>Blender</strong> - Sintel


Ejemplo de <strong>Blender</strong> - Big Bunny


<strong>Blender</strong> - Renderizar


<strong>Blender</strong> - Renderizar


<strong>Blender</strong> – API Python<br />

● Python 3.x.<br />

● Crear elementos de interfaz de<br />

usuario, como menús, cabeceras y<br />

paneles.<br />

● Dibujar en la vista 3D.<br />

● Crear nuevos motores de renderizado.


BOINC<br />

Berkeley Open Infrastructure for Network<br />

Computing


¿Que es BOINC?<br />

● Infrastructura abierta de Berkley para<br />

la Computacion en Red.<br />

● Programas de código abierto para<br />

computación voluntaria y computación<br />

en red (grid).


BOINC - Proyectos<br />

Fisica y Astronomía Biología Matemática<br />

Ciencias de la Tierra


BOINC – Computación Distribuida<br />

Secuencial Distribuido


BOINC – ¿Como funciona?


BOINC - Componentes<br />

Servidor<br />

Cliente<br />

● Generador de Workunits (API C++).<br />

● Calendarizador (Scheduling).<br />

● Servidor de Archivos.<br />

● Core.<br />

● <strong>Boinc</strong> Manager (RPC).<br />

● Protector de pantalla.


BOINC – Servidor (I)<br />

Config:<br />

<br />

<br />

i686-pc-linux-gnu<br />

<br />

Linux Intel x86-compatible CPU<br />

<br />

<br />

<br />

uppercase<br />

<br />

UperCASE<br />

<br />

<br />


BOINC – Servidor (II)<br />

Template Input:<br />

<br />

<br />

0<br />

in<br />

<br />

<br />

1<br />

logo.jpg<br />

<br />

600<br />

1<br />

<br />

Template Output:<br />

<br />

<br />

<br />

20000000<br />

<br />

<br />

<br />

<br />

<br />

out<br />

<br />


BOINC – Servidor (III)<br />

Crear una tarea:<br />

./bin/create_work<br />

-appname nombreapplicacion<br />

-wu_name nombre_calculo<br />

-wu_template templates/input.xml<br />

-result_template templates/output.xml<br />

in logo.jpg


BOINC – Cliente GUI


BOINC – Cliente Consola de Cmd.


<strong>Legión</strong>


¿Qué es <strong>Legión</strong>?<br />

● Sistema de computación en malla.<br />

● Procesamientos de grandes cálculos.<br />

● Interface Web amigable.<br />

● Dirección Informatica Académica (DIA).


<strong>Legión</strong> – Arquitectura


<strong>Legión</strong> – Web Interface (I)


<strong>Legión</strong> – Web Interface (II)


<strong>Legión</strong> – Web Interface (III)


<strong>Legión</strong> – Web Interface (IV)


Integración


Integración


Integración<br />

● Interface de usuario<br />

● Procesamiento<br />

● Dividir y renderizar<br />

● Unir partes<br />

● Post Procesamiento


<strong>Legión</strong> – Formulario


Integración - Procesamiento<br />

{{Form:txtName}}<br />

{{Form:txtDescription}}<br />

<br />

/usr/bin/python<br />

image.png<br />

<br />

blender_render_split.py {{Form:sResolution}} 60<br />

{{Form:chckTexture}} {x} {{Form:sMovie}}<br />

<br />

{{Project:compress}}<br />

<br />

x<br />

{{Form:txtFrameStart}}<br />

{{Math:{Form:txtFrameEnd}+1}}<br />

1<br />

<br />

<br />

<br />

x<br />

{{Form:txtFrameStart}}<br />

{{Math:{Form:txtFrameEnd}+1}}<br />

1<br />

<br />

<br />

<br />

blender_render_split.py<br />

<br />

<br />

frame_split.py<br />

<br />

<br />

other<br />

image.png<br />

<br />


Integración – Dividir Renderizar (I)<br />

import bpy, sys<br />

bpy.context.scene.render.resolution_x = int(sys.argv[7])<br />

bpy.context.scene.render.resolution_y = int(sys.argv[8])<br />

bpy.context.scene.render.fps = int(sys.argv[9])<br />

bpy.context.scene.render.use_textures =<br />

(int(sys.argv[10])==1)<br />

bpy.context.scene.frame_set(int(sys.argv[11]))


...<br />

Integración – Dividir Renderizar (II)<br />

#Bucle por secciones 'n'x'm'<br />

bpy.context.scene.render.border_min_x = b_min_x<br />

bpy.context.scene.render.border_max_x = b_max_x<br />

bpy.context.scene.render.border_min_y = b_smin_y<br />

bpy.context.scene.render.border_max_y = b_smax_y<br />

bpy.ops.render.render()<br />

bpy.data.images["Result"].save_render("./file_n_m.bmp")


Conclusión<br />

● La integración permite accelerar el<br />

proceso de renderizado.<br />

● Es posible realizar renderizado<br />

utilizando <strong>Legión</strong>.


Referencias<br />

● www.blender.org<br />

● boinc.berkeley.edu<br />

● wiki.blender.org/index.php<br />

● www.renderfarm.fi<br />

● blenderscripting.blogspot.com<br />

● wiki.pucp.edu.pe/legion


Gracias por su atención<br />

legion@pucp.edu.pe


Preguntas?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!