DATA VISUALIZATION AND RENDERING WITH BLENDER AND VTK

[Pages:38]DATAVISUALIZATIONANDRENDERINGWITHBLENDERANDVTK

MattCragun TotalSimUSA mcragun@totalsim.us

OUTLINE

Introduction

3

UsingBlender

7

ImportingDatafromParaview

18

UsingBlenderDirectlywithVTKandPython

34

INTRODUCTION

INTRODUCTION

Introduction

What:

UseBlenderandVTKtoproducemorerealisticrenderingsofdatageneratedinOpenFOAM

Why: ?

? ?

Highqualityvisualizationsareexcitingtolookatandcanattracttheinterestofnon-science types. Goodformarketingimagesorotherapplicationswhereformmightoutweighfunction Notasuitablealternativetoastandardpost-processingprogramsuchasParavieworEnsight

Ojectivesofthistutorial: ? LearnBlenderUI ? ExportdatafromParaviewandimportinBlender ? UnderstandbasicsofmaterialpropertiesinBlender ? Learnhowtocreatecameras ? Learnhowtosetuplights ? PerformbasicrenderinginBlender ? DemonstratedirectVTK/Blenderintegration

INTRODUCTION

SoftwareOverview

Blender: ? Opensource3Drenderingsoftware ? ? ? Largecommunityandactivelydeveloped ? Reasonablystable ? Highlyscriptable ? Currentreleaseis2.5x ? BasedonPython3.x ? Veryniceinterface ? Faster,higherqualityrendering ? Blender2.49bisusedduringthistutorial ? BasedonPython2.x ? Slowerrendering ? Notasuserfriendly

VTK: ? ? ? ? ?

VisualizationToolkit PowerfulopensourceC++LibrariesusefulformanipulatingdatabyKitware ParaviewisbasedonVTK VTKcontainsPython2.xwrappers CurrentlynoPython3.xsupport

*BasicknowledgeofOpenFOAM,Python,andParaviewareassumedforthistutorial

INTRODUCTION

Method1

Simple: A. GenerateOpenFOAMdata B. VisualizeinParaview C. RenderinBlender

Method2

Complex: A. GenerateOpenFOAMdata B. UseVTKpythonwrappingtoreaddata intoBlenderwithblenderVTK.py module C. RenderinBlender

Pros:

? RequiresfewerBlenderskills ? Mostusersarealreadyfamiliar

withParaview ? Noscriptingneeded ? ModelscanbemovedtoBlender

2.5x

Cons:

? Cannotrenderanimations(orit wouldbeverypainfultodoso)

? Requirestheintermediatestepof usingParaview

Pros: ?

?

Everythingdonefrominsideof Blender

Capableofrenderinganimations/time- dependentdata

Cons: ?

ScriptingrequiredwithbothBlender andVTKmodules

INTRODUCTIONTOBLENDER

GETTINGSTARTED

StaringBlenderandUnderstandingtheUI

?Fromaterminaltype"blender" ?Mousebuttonsaredifferentfrommostprograms:

Button LMB RMB MMB

Shift+MMB Ctrl+MMB/Scroll

?OtherImportantShortcuts

Function Move3dCursor

Select RotateModel

Pan Zoom

Button LMB RMB MMB

Shift+MMB Ctrl+MMB/Scroll

Esc Ctrl+Z

F12 Tab Shift+D

Function Move3dCursor

Select RotateModel

Pan Zoom StopCurrentAction UNDO! RenderImage Switchbetweenobjectandeditmode Duplicate

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download