openscenegraph 3 cookbook

427 1.3K 0
openscenegraph 3 cookbook

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... Internet 30 1 Introduction 30 5 Merging geometry data 30 6 Compressing texture 31 0 Sharing scene objects 31 6 Configuring the database pager 32 1 Designing a simple culling strategy 32 4 Using occlusion query to cull objects 33 1 Managing scene objects with an octree algorithm 33 3 Rendering point cloud data with draw instancing 34 2 Speeding up the scene intersections 34 7 Introduction 35 3 Integrating OSG with Qt 35 4... with Qt 35 4 Starting rendering loops in separate threads 35 9 Embedding Qt widgets into the scene 36 1 iii Table of Contents Embedding CEGUI elements into the scene Using the osgWidget library Using OSG components in GLUT Running OSG examples on Android Embedding OSG into web browsers Designing the command buffer mechanism 36 5 37 4 37 9 38 3 38 6 39 2 Chapter 10: Miscellaneous Discussion in Depth This chapter... Designing Creative Effects 227 Chapter 7: Visualizing the World 279 Chapter 8: Managing Massive Amounts of Data 30 5 Chapter 9: Integrating with GUI 35 3 Introduction 227 Using the bump mapping technique 229 Simulating the view-dependent shadow 233 Implementing transparency with multiple passes 237 Reading and displaying the depth buffer 241 Implementing the night vision effect 245 Implementing the depth-of-field... The OpenSceneGraph official download link is: http://www .openscenegraph. org/projects/osg/wiki/Downloads Binaries provided by the AlphaPixel, including Windows, Mac OS X, and Linux versions, can be found at: http:/ /openscenegraph. alphapixel.com/osg/downloads/freeopenscenegraph-binary-downloads And the online installer for Windows developers is located at: http://www .openscenegraph. org/files/dev /OpenSceneGraph- Installer.exe... world Use osgEarth to display a VPB-generated database Index 39 7 iv Preface During the last 12 years, OpenSceneGraph, which is one of the best 3D graphics programming interfaces in the world, has grown up so rapidly that it has already become the industry's leading open source scene graph technology The latest distribution, OpenSceneGraph 3. 0, now runs on all Microsoft Windows platforms, Apple Mac OS... extension 124 Chapter 4: Manipulating the View 129 Chapter 5: Animating Everything 171 Introduction 129 Setting up views on multiple screens 130 Using slave cameras to simulate a power-wall 133 Using depth partition to display huge scenes 139 Implementing the radar map 1 43 Showing the top, front, and side views of a model 148 Manipulating the top, front, and side views 152 Following a moving model 155 Using... source code This is exactly what we want in this recipe 9 Customizing OpenSceneGraph For Ubuntu users 1 Check out the OpenSceneGraph trunk by typing the following command in the terminal (you may have to add sudo at the beginning to run as an administrator): # svn checkout http://www .openscenegraph. org/svn/osg /OpenSceneGraph/ trunk OpenSceneGraph 2 The first argument, checkout indicates the command to... sudo apt-get install zlib1g-dev 2 Download Qt online installer from: http://qt.nokia.com/downloads/sdk-linux-x11 -32 bit-cpp 3 Make it executable and run it to download and install Qt SDK: # sudo chmod u+x Qt_SDK_Lin32_online_v1_1_1_en.run # sudo /Qt_SDK_Lin32_online_v1_1_1_en.run 19 Customizing OpenSceneGraph 4 Now it's time to configure these libraries using cmake-gui Just reopen the GUI window and click... OpenGL support, with the latest OpenGL device driver installed from your graphics hardware vendor You will need to download OpenSceneGraph 3. 0.1 from http://www .openscenegraph org Some recipes may require the latest developer version The CMake utility is also necessary for compiling OpenSceneGraph and the source code of this book You may download it from http://www.cmake.org/ You will also need a working... local path here): # svn checkout http://www .openscenegraph. org/svn/osg /OpenSceneGraph- Data/trunk OpenSceneGraph- data VirtualPlanetBuilder is a terrain database-creation tool which will be used for managing and rendering massive paged data We are going to demonstrate it in Chapter 7 Here it is so you can check it out for later use: # svn checkout http://www .openscenegraph. org/svn/VirtualPlanetBuilder/trunk . h0" alt="" OpenSceneGraph 3 Cookbook Over 80 recipes to show advanced 3D programming techniques with the OpenSceneGraph API Rui Wang Xuelei Qian BIRMINGHAM - MUMBAI OpenSceneGraph 3 Cookbook Copyright. and play with some state-of-art techniques. So the book " ;OpenSceneGraph 3 Cookbook comes onto the scene, with over 80 recipes demonstrating how to make use of some advanced API features. osgEarth: another way to visualize the world Use osgEarth to display a VPB-generated database Index 39 7 Preface During the last 12 years, OpenSceneGraph, which is one of the best 3D graphics programming

Ngày đăng: 29/05/2014, 18:36

Từ khóa liên quan

Mục lục

  • Cover

  • Copyright

  • Credits

  • About the Authors

  • About the Reviewers

  • www.PacktPub.com

  • Table of Contents

  • Preface

  • Chapter 1: Customizing OpenSceneGraph

    • Introduction

    • Checking out the latest version of OSG

    • Configuring CMake options

    • Building common plugins

    • Compiling and packaging OSG on different platforms

    • Compiling and using OSG on mobile devices

    • Compiling and using dynamic and static libraries

    • Generating the API documentation

    • Creating your own project using CMake

  • Chapter 2 : Designing the Scene Graph

    • Introduction

    • Using smart and observer pointers

    • Sharing and cloning objects

    • Computing the world bounding box of any node

    • Creating a running car

    • Mirroring the scene graph

    • Designing a breadth-first node visitor

    • Implementing a background image node

    • Making your node always face the screen

    • Using draw callbacks to execute NVIDIA Cg functions

    • Implementing a compass node

  • Chapter 3: Editing Geometry Models

    • Introduction

    • Creating a polygon with borderlines

    • Extruding a 2D shape to 3D

    • Drawing a NURBS surface

    • Drawing a dynamic clock on the screen

    • Drawing a ribbon following a model

    • Selecting and highlighting a model

    • Selecting a triangle face of the model

    • Selecting a point on the model

    • Using vertex-displacement mapping in shaders

    • Using the draw instanced extension

  • Chapter 4: Manipulating the View

    • Introduction

    • Setting up views on multiple screens

    • Using slave cameras to simulate a power-wall

    • Using depth partition to display huge scenes

    • Implementing the radar map

    • Showing the top, front, and side views of a model

    • Manipulating the top, front, and side views

    • Following a moving model

    • Using manipulators to follow models

    • Designing a 2D camera manipulator

    • Manipulating the view with joysticks

  • Chapter 5: Animating Everything

    • Introduction

    • Opening and closing doors

    • Playing a movie in the 3D world

    • Designing scrolling text

    • Implementing morph geometry

    • Fading in and out

    • Animating a flight on fire

    • Dynamically lighting within shaders

    • Creating a simple Galaxian game

    • Building a skeleton system

    • Skinning a customized mesh

    • Letting the physics engine be

  • Chapter 6: Designi ng Creative Effects

    • Introduction

    • Using the bump mapping technique

    • Simulating the view-dependent shadow

    • Implementing transparency with multiple passes

    • Reading and displaying the depth buffer

    • Implementing the night vision effect

    • Implementing the depth-of-field effect

    • Designing a skybox with the cube map

    • Creating a simple water effect

    • Creating a piece of cloud

    • Customizing the state attribute

  • Chapter 7: Visualizing the World

    • Introduction

    • Preparing the VirtualPlanetBuilder (VPB) tool

    • Generating a small terrain database

    • Generating terrain database on the earth

    • Working with multiple imagery and elevation data

    • Patching an existing terrain database with newer data

    • Building NVTT support for device-independent generation

    • Using SSH to implement cluster generation

    • Loading and rendering terrain from the Internet

  • Chapter 8: Managing Massive Amounts of Data

    • Introduction

    • Merging geometry data

    • Compressing texture

    • Sharing scene objects

    • Configuring the database pager

    • Designing a simple culling strategy

    • Using occlusion query to cull objects

    • Managing scene objects with an octree algorithm

    • Rendering point cloud data with draw instancing

    • Speeding up the scene intersections

  • Chapter 9: Integrating with GUI

    • Introduction

    • Integrating OSG with Qt

    • Starting rendering loops in separate threads

    • Embedding Qt widgets into the scene

    • Embedding CEGUI elements into the scene

    • Using the osgWidget library

    • Using OSG components in GLUT

    • Running OSG examples on Android

    • Embedding OSG into web browsers

    • Designing the command buffer mechanism

  • Index

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan