FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little...

15
FCG Lab07: Panda3D & Blender + Summarize Michele Svanera Department of Information Engineering University of Brescia 06 June 2016

Transcript of FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little...

Page 1: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

FCG Lab07: Panda3D & Blender + Summarize

Michele Svanera

Department of Information EngineeringUniversity of Brescia

06 June 2016

Page 2: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

1 Panda3D & Blender

2 Summarize

Page 3: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Models and Actors

Usually ready-made models are imported into panda

Models are drawn with proper modelling tools: Blender

Models can be animated by the engine

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 3

Page 4: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Blender exporting

Yabee exporter (Yet Another Blender EGG Exporter):Blender plugin

File → Export, Panda3D (.egg)

Hint: two separate files for Model and Animation

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 4

Page 5: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Panda3D: Loading Actors and Animations I

Actor operations:

Load the Actor Model

NodePath Actor = window ->load_model(window ->

get_render (), "models/panda -model");

Load the Animation

// the name of an animation is preceded in the .

egg file with <Bundle >

window ->load_model(Actor , "models/panda -walk4");

One-command animation

//bind models and animations + set it to loop

window ->loop_animations (0);

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 5

Page 6: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Panda3D: Loading Actors and Animations II

Control the Animations

// loop all animations

anim_collection.loop_all(true);

// loop a specific animation

anim_collection.loop("panda_walk_character", true)

// play an animation once

anim_collection.play("panda_walk_character");

// pose: hold a particular frame of the animation

anim_collection.pose("panda_walk_character", 5);

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 6

Page 7: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Assignment (final!!)

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 7

Page 8: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

1 Panda3D & Blender

2 Summarize

Page 9: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Little recap: OpenGL

Low-level library: “Software Interfaces to graphics hardware”

Speaks graphic cards “languages” (translator functionality)

Portable and very fast

System independent

Useful for implementing basic functionality

Simple tasks: simple objects, texture mapping, light source,little animation, . . .(basic of) Computer video games(basic of) Computer generated animationsCAD engineering and architectural applications

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 9

Page 10: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Little recap: Panda3D I

Open-source game engine

Library of subroutines for 3D rendering and game development

Provides:

GraphicsAudioI/OCollision detection. . .

Set of C++ library with Python bindings

Jointly developed by Disney and Carnegie Mellon University

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 10

Page 11: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Little recap: Panda3D II

Commercial and Open-source library. So 4 characteristics:

Power easy to implement complex scenes

Speed important frame-rates

Completeness contains tons of essential tools

scene graph browsing

performance monitoring

animation optimizers

Error tolerance all developers create bugs! Much code (it is anSDK) is dedicated to the problem of tracking andisolating errors. Panda3D almost never crashes!

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 11

Page 12: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

The Use of Models

Usually in Panda3D we don’t draw stuff

Boring. . .

Tricky to do procedurally

Not trivial to design “realistic” models

Usually ready-made models are imported into panda

Models are drawn with proper modelling tools:

Blender, Maya, 3DS MAXHigh-quality

Models can be animated by the engine

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 12

Page 13: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Panda3D alternatives

Unity (free for academic use?)

Unreal Engine (free for academic use)

Source Engine (Valve Corporation)

OGRE 3D (Object-Oriented Graphics RenderingEngine)

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 13

Page 14: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

Little recap: Blender

Integrated application (no coding) for creation of 2D and 3Dcontent

Provides a broad spectrum of tools in one package

ModelingTexturingLightingAnimation

Open-source (GNU/GPL → “free as in freedom”)

Cross-Platform (GNU/Linux, OSX, Windows)

Developed since 1993 by “Not a Number” company, now bythe “Blender Foundation”

Alternatives: Maya, 3DS MAX, . . .

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 14

Page 15: FCG Lab07: Panda3D & Blender + Summarizeprojects.i-ctm.eu/sites/default/files/Lab_07.pdf · Little recap: Blender Integrated application (no coding) for creation of 2D and 3D content

End of the course!

Michele Svanera FCG Lab07: Panda3D & Blender + Summarize 15