SlideShare a Scribd company logo
OGRE (v2.1)
Changes: Objects, Scene &
Nodes
王聖川
2017/9/21
ID Uniqueness
Names are now optional (no need to be unique).
Identify uniqueness via IdObject::getId().
Entities/MovableObjects will not share the same ID.
Entity may share the same ID with scene node.
Debug Object Data
Data is stored in SoA (structure of arrays).
How 4 vectors are packed:
OGRE_USE_SIMD = 0 for C version array (debug purpose).
MovableObject::mObjectData for SoA data.
mIndex (0~3), packed index in SoA.
mParents: parents for packed 4 MovableObejcts.
Interpret ArrayVector3
mIndex order in m_chunkBase is right to left.
ArrayVector3 packs 4 vectors (ARRAY_PACKED_REALS = 4)
m_chunkBase: {mIndex=3, mIndex=2, mIndex=1, mIndex=0}
If 4 nodes created A, B, C, D.
Pack dummy pointer instead NULL.
MovableObject::mObjectData::mParents, Transform::mParents, …
Avoid null pointer checking.
Attachment and Visibility
OGRE 1.x:
Scene hierarchy traversal is expensive.
Objects were in the scene when being attached to scene
nodes.
OGRE 2.x:
Objects always in the scene, being attached to nodes to
hold their positions.
Detach object (entity) from node, will call setVisible(false)
implicitly. Previous visibility is lost. Call setVisible(true) while
detached will crash!
Optimized scene updates and iterations. Attach/detach
becomes more expensive. Call setVisible() for
hiding/showing objects.
MovableObject Require
SceneNode
MovableObjects (Entity, Light, Camera) require
being attached to SceneNodes.
No nodeless lights anymore. Light::setDirection() redirect to
SceneNode (fail if not attached).
Camera however have its own position and rotation (avoid
breaking old coder). Default camera is attached to the root
scene node. Need call Camera::detachFromParent() before
attaching camera to SceneNode manually.
Derived Transform
In 1.x, call SceneNode::_getDerivedPosition(), OGRE
keep flags to check if derived transform is dirty.
In 2.x, flags are removed for performance sake,
return cached derived transform.
The following won’t work.
SceneManager::updateAllTransforms() efficiently
update all, then cached derived transforms are
updated.
APIs force updating derived transform (including
all parents, slow!).
SCENE_STATIC and
SCENE_DYNAMIC
MovableObject/Node creation as static or dynamic.
Static means no move, rotation, scaling (or infrequently); save CPU
performance.
Default = dynamic.
SCENE_STATIC Node: no transform update.
SceneManager::notifyStaticDirty( scenenode ) to issue static node
update (recursively).
Dynamic node as child of static node (fit OGRE design); static node as
child of dynamic node may be a bug.
SCENE_STATIC Entity: no AABB bounds update (for culling).
SceneManager::notifyStaticDirty(entity) will update AABB, or when
attached Node is flagged as dirty.
Scene General Case
Static entity for static node only; dynamic entity for
dynamic node only.
Entity, Node can switch dynamic/static
(InstancedEntity cannot).
Destroy and recreate a new InstancedEntity instead.
SceneNode::setStatic() force all attached MovableObjects to
change concurrently.
Call setStatic(), change false to true, will call
notifyStaticDirty() implicitly.
Change static = true, can gain performance bump (no
transform & AABB update, and culling is much faster than
v1.x); batch counts remain the same.
Debug Mode Assertion
When AABB/transform is out of date, and
attempted to be used, OGRE issue assertion.
Solutions:
Static objects, do changes with notifyStaticDirty().
Avoid changes after SceneManager::updateAllTransforms()
or SceneManager::updateAllBounds().
Call Node::_getFullTransformUpdated() or
MovableObject::getWorldAabbUpdate(), be careful about
performance drop.
OGRE may also have bugs. Σ(;゚д゚), fire bug issues to them.
Renderable,
MovableObject subclass
In OGRE 1.x, allows add only Renderable objects
into render queues.
In OGRE 2.x, one Renderable MUST have one
MovableObject.
Visitor pattern for iterating MovableObject from Renderable
is removed, due to performance issue.
MovableObject subclasses must populate member,
MovableObject::mRenderables.
Vertex from V2 Mesh
Mesh  SubMesh  VertexArrayObjectArray 
VertexBufferPacked/IndexBufferPacked 
VertexElement2Vec.
Vertex Element
Element offset, index, and total size can be
calculated.
VaoManager::calculateVertexSize(const
VertexElement2Vec&).
Too Dark?
PBS (physically based shading) expects gamma
correction.
Materials for PBS need serious adjustment. High Fresnel,
roughness can affect diffuse a lot. Textures also need to be
tweaked.
Color (1.0, 1.0, 1.0) means incredibly bright.
PBS works best with HDR (high dynamic range rendering).
Light::setPowerScale( 3.14) to compensate in LDR case.
External GUI texture may need gamma correction manually.
Activate gamma correction (default).

More Related Content

What's hot

Memory Management on iOS
Memory Management on iOSMemory Management on iOS
Memory Management on iOS
Make School
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
mattpodwysocki
 
Multithreading and Parallelism on iOS [MobOS 2013]
 Multithreading and Parallelism on iOS [MobOS 2013] Multithreading and Parallelism on iOS [MobOS 2013]
Multithreading and Parallelism on iOS [MobOS 2013]Kuba Břečka
 
Exploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic LanguagesExploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic Languages
Tobias Lindaaker
 
Beirut Java User Group JVM presentation
Beirut Java User Group JVM presentationBeirut Java User Group JVM presentation
Beirut Java User Group JVM presentation
Mahmoud Anouti
 
Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014
Mark Rees
 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2
NokiaAppForum
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
AMD Developer Central
 
Introduction to Garbage Collection
Introduction to Garbage CollectionIntroduction to Garbage Collection
Introduction to Garbage Collection
Artur Mkrtchyan
 

What's hot (9)

Memory Management on iOS
Memory Management on iOSMemory Management on iOS
Memory Management on iOS
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
 
Multithreading and Parallelism on iOS [MobOS 2013]
 Multithreading and Parallelism on iOS [MobOS 2013] Multithreading and Parallelism on iOS [MobOS 2013]
Multithreading and Parallelism on iOS [MobOS 2013]
 
Exploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic LanguagesExploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic Languages
 
Beirut Java User Group JVM presentation
Beirut Java User Group JVM presentationBeirut Java User Group JVM presentation
Beirut Java User Group JVM presentation
 
Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014
 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
Introduction to Garbage Collection
Introduction to Garbage CollectionIntroduction to Garbage Collection
Introduction to Garbage Collection
 

Similar to OGRE v2.1 manual - Changes: Objects, Scene & Nodes

E2D3 ver. 0.2 API Instruction
E2D3 ver. 0.2 API InstructionE2D3 ver. 0.2 API Instruction
E2D3 ver. 0.2 API Instruction
E2D3.org
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkitnikhilyagnic
 
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.ppt
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.pptDESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.ppt
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.ppt
AntoJoseph36
 
Max Koretskyi "Why are Angular and React so fast?"
Max Koretskyi "Why are Angular and React so fast?"Max Koretskyi "Why are Angular and React so fast?"
Max Koretskyi "Why are Angular and React so fast?"
Fwdays
 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel Schulhof
WithTheBest
 
4. The size of instructions can be fixed or variable. What are advant.pdf
4. The size of instructions can be fixed or variable. What are advant.pdf4. The size of instructions can be fixed or variable. What are advant.pdf
4. The size of instructions can be fixed or variable. What are advant.pdf
mumnesh
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
Make School
 
Drupal 7 field API
Drupal 7 field APIDrupal 7 field API
Drupal 7 field API
Karoly Negyesi
 
Memory Management In C++
Memory Management In C++Memory Management In C++
Memory Management In C++
ShriKant Vashishtha
 
Tutorial 6 queues & arrays & results recording
Tutorial 6   queues & arrays & results recording Tutorial 6   queues & arrays & results recording
Tutorial 6 queues & arrays & results recording
Mohd Batati
 
Average- An android project
Average- An android projectAverage- An android project
Average- An android projectIpsit Dash
 
openFrameworks 007 - GL
openFrameworks 007 - GL openFrameworks 007 - GL
openFrameworks 007 - GL
roxlu
 
Need help with questions 2-4. Write assembly code to find absolute v.pdf
Need help with questions 2-4. Write assembly code to find absolute v.pdfNeed help with questions 2-4. Write assembly code to find absolute v.pdf
Need help with questions 2-4. Write assembly code to find absolute v.pdf
feelinggifts
 
Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...
Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...
Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...
ScyllaDB
 
Endless fun with Arduino and Eventmachine
Endless fun with Arduino and EventmachineEndless fun with Arduino and Eventmachine
Endless fun with Arduino and Eventmachine
Bodo Tasche
 
JavaScript ES10 and React Js Introduction
JavaScript ES10 and React Js IntroductionJavaScript ES10 and React Js Introduction
JavaScript ES10 and React Js Introduction
Amanpreet Singh
 
Treinamento Qt básico - aula II
Treinamento Qt básico - aula IITreinamento Qt básico - aula II
Treinamento Qt básico - aula II
Marcelo Barros de Almeida
 
Core data orlando i os dev group
Core data   orlando i os dev groupCore data   orlando i os dev group
Core data orlando i os dev group
Andrew Kozlik
 

Similar to OGRE v2.1 manual - Changes: Objects, Scene & Nodes (20)

E2D3 ver. 0.2 API Instruction
E2D3 ver. 0.2 API InstructionE2D3 ver. 0.2 API Instruction
E2D3 ver. 0.2 API Instruction
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
 
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.ppt
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.pptDESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.ppt
DESIGNING A PERSISTENCE FRAMEWORK WITH PATTERNS.ppt
 
Max Koretskyi "Why are Angular and React so fast?"
Max Koretskyi "Why are Angular and React so fast?"Max Koretskyi "Why are Angular and React so fast?"
Max Koretskyi "Why are Angular and React so fast?"
 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel Schulhof
 
4. The size of instructions can be fixed or variable. What are advant.pdf
4. The size of instructions can be fixed or variable. What are advant.pdf4. The size of instructions can be fixed or variable. What are advant.pdf
4. The size of instructions can be fixed or variable. What are advant.pdf
 
Intro to Core Data
Intro to Core DataIntro to Core Data
Intro to Core Data
 
Drupal 7 field API
Drupal 7 field APIDrupal 7 field API
Drupal 7 field API
 
Java unit i
Java unit iJava unit i
Java unit i
 
Qe Reference
Qe ReferenceQe Reference
Qe Reference
 
Memory Management In C++
Memory Management In C++Memory Management In C++
Memory Management In C++
 
Tutorial 6 queues & arrays & results recording
Tutorial 6   queues & arrays & results recording Tutorial 6   queues & arrays & results recording
Tutorial 6 queues & arrays & results recording
 
Average- An android project
Average- An android projectAverage- An android project
Average- An android project
 
openFrameworks 007 - GL
openFrameworks 007 - GL openFrameworks 007 - GL
openFrameworks 007 - GL
 
Need help with questions 2-4. Write assembly code to find absolute v.pdf
Need help with questions 2-4. Write assembly code to find absolute v.pdfNeed help with questions 2-4. Write assembly code to find absolute v.pdf
Need help with questions 2-4. Write assembly code to find absolute v.pdf
 
Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...
Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...
Key-Key-Value Store: Generic NoSQL Datastore with Tombstone Reduction and Aut...
 
Endless fun with Arduino and Eventmachine
Endless fun with Arduino and EventmachineEndless fun with Arduino and Eventmachine
Endless fun with Arduino and Eventmachine
 
JavaScript ES10 and React Js Introduction
JavaScript ES10 and React Js IntroductionJavaScript ES10 and React Js Introduction
JavaScript ES10 and React Js Introduction
 
Treinamento Qt básico - aula II
Treinamento Qt básico - aula IITreinamento Qt básico - aula II
Treinamento Qt básico - aula II
 
Core data orlando i os dev group
Core data   orlando i os dev groupCore data   orlando i os dev group
Core data orlando i os dev group
 

More from River Wang

FairyGUISDK_UIPackage_Analysis.pptx
FairyGUISDK_UIPackage_Analysis.pptxFairyGUISDK_UIPackage_Analysis.pptx
FairyGUISDK_UIPackage_Analysis.pptx
River Wang
 
20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx
River Wang
 
zenject extenject-intro
zenject extenject-introzenject extenject-intro
zenject extenject-intro
River Wang
 
Unity optimize mobile game performance
Unity optimize mobile game performanceUnity optimize mobile game performance
Unity optimize mobile game performance
River Wang
 
DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學
River Wang
 
Gamedev: Multi-threaded animate model
Gamedev: Multi-threaded animate modelGamedev: Multi-threaded animate model
Gamedev: Multi-threaded animate model
River Wang
 
桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)
River Wang
 
OpenCascade Technology Overview: Modeling Data
OpenCascade Technology Overview: Modeling DataOpenCascade Technology Overview: Modeling Data
OpenCascade Technology Overview: Modeling Data
River Wang
 
OpenCascade Technology Overview: OCAF
OpenCascade Technology Overview: OCAFOpenCascade Technology Overview: OCAF
OpenCascade Technology Overview: OCAF
River Wang
 
[breakdown] Shadow of the Colossus. (Chinese translation中譯)
[breakdown] Shadow of the Colossus. (Chinese translation中譯)[breakdown] Shadow of the Colossus. (Chinese translation中譯)
[breakdown] Shadow of the Colossus. (Chinese translation中譯)
River Wang
 
OpenCascade Technology Overview: Visualization
OpenCascade Technology Overview: VisualizationOpenCascade Technology Overview: Visualization
OpenCascade Technology Overview: Visualization
River Wang
 
OpenCascade Technology Overview: Foundation Classes
OpenCascade Technology Overview: Foundation ClassesOpenCascade Technology Overview: Foundation Classes
OpenCascade Technology Overview: Foundation Classes
River Wang
 
2017 graphics-01: 電腦圖學繪圖流程
2017 graphics-01: 電腦圖學繪圖流程2017 graphics-01: 電腦圖學繪圖流程
2017 graphics-01: 電腦圖學繪圖流程
River Wang
 
2017 unity5.5 manual_navigation
2017 unity5.5 manual_navigation2017 unity5.5 manual_navigation
2017 unity5.5 manual_navigation
River Wang
 
2017 unity5.5 manual_physics
2017 unity5.5 manual_physics2017 unity5.5 manual_physics
2017 unity5.5 manual_physics
River Wang
 
2017 unity5.5 manual_animation
2017 unity5.5 manual_animation2017 unity5.5 manual_animation
2017 unity5.5 manual_animation
River Wang
 
Shader forge設定說明文件
Shader forge設定說明文件Shader forge設定說明文件
Shader forge設定說明文件
River Wang
 
矩陣 轉換
矩陣   轉換矩陣   轉換
矩陣 轉換
River Wang
 
矩陣 基本說明
矩陣   基本說明矩陣   基本說明
矩陣 基本說明
River Wang
 
2017 unity5 manual_intro
2017 unity5 manual_intro2017 unity5 manual_intro
2017 unity5 manual_intro
River Wang
 

More from River Wang (20)

FairyGUISDK_UIPackage_Analysis.pptx
FairyGUISDK_UIPackage_Analysis.pptxFairyGUISDK_UIPackage_Analysis.pptx
FairyGUISDK_UIPackage_Analysis.pptx
 
20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx20220529_UniTask_Intro.pptx
20220529_UniTask_Intro.pptx
 
zenject extenject-intro
zenject extenject-introzenject extenject-intro
zenject extenject-intro
 
Unity optimize mobile game performance
Unity optimize mobile game performanceUnity optimize mobile game performance
Unity optimize mobile game performance
 
DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學DoozyUI_基礎介紹教學
DoozyUI_基礎介紹教學
 
Gamedev: Multi-threaded animate model
Gamedev: Multi-threaded animate modelGamedev: Multi-threaded animate model
Gamedev: Multi-threaded animate model
 
桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)
 
OpenCascade Technology Overview: Modeling Data
OpenCascade Technology Overview: Modeling DataOpenCascade Technology Overview: Modeling Data
OpenCascade Technology Overview: Modeling Data
 
OpenCascade Technology Overview: OCAF
OpenCascade Technology Overview: OCAFOpenCascade Technology Overview: OCAF
OpenCascade Technology Overview: OCAF
 
[breakdown] Shadow of the Colossus. (Chinese translation中譯)
[breakdown] Shadow of the Colossus. (Chinese translation中譯)[breakdown] Shadow of the Colossus. (Chinese translation中譯)
[breakdown] Shadow of the Colossus. (Chinese translation中譯)
 
OpenCascade Technology Overview: Visualization
OpenCascade Technology Overview: VisualizationOpenCascade Technology Overview: Visualization
OpenCascade Technology Overview: Visualization
 
OpenCascade Technology Overview: Foundation Classes
OpenCascade Technology Overview: Foundation ClassesOpenCascade Technology Overview: Foundation Classes
OpenCascade Technology Overview: Foundation Classes
 
2017 graphics-01: 電腦圖學繪圖流程
2017 graphics-01: 電腦圖學繪圖流程2017 graphics-01: 電腦圖學繪圖流程
2017 graphics-01: 電腦圖學繪圖流程
 
2017 unity5.5 manual_navigation
2017 unity5.5 manual_navigation2017 unity5.5 manual_navigation
2017 unity5.5 manual_navigation
 
2017 unity5.5 manual_physics
2017 unity5.5 manual_physics2017 unity5.5 manual_physics
2017 unity5.5 manual_physics
 
2017 unity5.5 manual_animation
2017 unity5.5 manual_animation2017 unity5.5 manual_animation
2017 unity5.5 manual_animation
 
Shader forge設定說明文件
Shader forge設定說明文件Shader forge設定說明文件
Shader forge設定說明文件
 
矩陣 轉換
矩陣   轉換矩陣   轉換
矩陣 轉換
 
矩陣 基本說明
矩陣   基本說明矩陣   基本說明
矩陣 基本說明
 
2017 unity5 manual_intro
2017 unity5 manual_intro2017 unity5 manual_intro
2017 unity5 manual_intro
 

Recently uploaded

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 

OGRE v2.1 manual - Changes: Objects, Scene & Nodes

  • 1. OGRE (v2.1) Changes: Objects, Scene & Nodes 王聖川 2017/9/21
  • 2. ID Uniqueness Names are now optional (no need to be unique). Identify uniqueness via IdObject::getId(). Entities/MovableObjects will not share the same ID. Entity may share the same ID with scene node.
  • 3. Debug Object Data Data is stored in SoA (structure of arrays). How 4 vectors are packed: OGRE_USE_SIMD = 0 for C version array (debug purpose). MovableObject::mObjectData for SoA data. mIndex (0~3), packed index in SoA. mParents: parents for packed 4 MovableObejcts.
  • 4. Interpret ArrayVector3 mIndex order in m_chunkBase is right to left. ArrayVector3 packs 4 vectors (ARRAY_PACKED_REALS = 4) m_chunkBase: {mIndex=3, mIndex=2, mIndex=1, mIndex=0} If 4 nodes created A, B, C, D. Pack dummy pointer instead NULL. MovableObject::mObjectData::mParents, Transform::mParents, … Avoid null pointer checking.
  • 5. Attachment and Visibility OGRE 1.x: Scene hierarchy traversal is expensive. Objects were in the scene when being attached to scene nodes. OGRE 2.x: Objects always in the scene, being attached to nodes to hold their positions. Detach object (entity) from node, will call setVisible(false) implicitly. Previous visibility is lost. Call setVisible(true) while detached will crash! Optimized scene updates and iterations. Attach/detach becomes more expensive. Call setVisible() for hiding/showing objects.
  • 6. MovableObject Require SceneNode MovableObjects (Entity, Light, Camera) require being attached to SceneNodes. No nodeless lights anymore. Light::setDirection() redirect to SceneNode (fail if not attached). Camera however have its own position and rotation (avoid breaking old coder). Default camera is attached to the root scene node. Need call Camera::detachFromParent() before attaching camera to SceneNode manually.
  • 7. Derived Transform In 1.x, call SceneNode::_getDerivedPosition(), OGRE keep flags to check if derived transform is dirty. In 2.x, flags are removed for performance sake, return cached derived transform. The following won’t work. SceneManager::updateAllTransforms() efficiently update all, then cached derived transforms are updated. APIs force updating derived transform (including all parents, slow!).
  • 8. SCENE_STATIC and SCENE_DYNAMIC MovableObject/Node creation as static or dynamic. Static means no move, rotation, scaling (or infrequently); save CPU performance. Default = dynamic. SCENE_STATIC Node: no transform update. SceneManager::notifyStaticDirty( scenenode ) to issue static node update (recursively). Dynamic node as child of static node (fit OGRE design); static node as child of dynamic node may be a bug. SCENE_STATIC Entity: no AABB bounds update (for culling). SceneManager::notifyStaticDirty(entity) will update AABB, or when attached Node is flagged as dirty.
  • 9. Scene General Case Static entity for static node only; dynamic entity for dynamic node only. Entity, Node can switch dynamic/static (InstancedEntity cannot). Destroy and recreate a new InstancedEntity instead. SceneNode::setStatic() force all attached MovableObjects to change concurrently. Call setStatic(), change false to true, will call notifyStaticDirty() implicitly. Change static = true, can gain performance bump (no transform & AABB update, and culling is much faster than v1.x); batch counts remain the same.
  • 10. Debug Mode Assertion When AABB/transform is out of date, and attempted to be used, OGRE issue assertion. Solutions: Static objects, do changes with notifyStaticDirty(). Avoid changes after SceneManager::updateAllTransforms() or SceneManager::updateAllBounds(). Call Node::_getFullTransformUpdated() or MovableObject::getWorldAabbUpdate(), be careful about performance drop. OGRE may also have bugs. Σ(;゚д゚), fire bug issues to them.
  • 11. Renderable, MovableObject subclass In OGRE 1.x, allows add only Renderable objects into render queues. In OGRE 2.x, one Renderable MUST have one MovableObject. Visitor pattern for iterating MovableObject from Renderable is removed, due to performance issue. MovableObject subclasses must populate member, MovableObject::mRenderables.
  • 12. Vertex from V2 Mesh Mesh  SubMesh  VertexArrayObjectArray  VertexBufferPacked/IndexBufferPacked  VertexElement2Vec.
  • 13. Vertex Element Element offset, index, and total size can be calculated. VaoManager::calculateVertexSize(const VertexElement2Vec&).
  • 14. Too Dark? PBS (physically based shading) expects gamma correction. Materials for PBS need serious adjustment. High Fresnel, roughness can affect diffuse a lot. Textures also need to be tweaked. Color (1.0, 1.0, 1.0) means incredibly bright. PBS works best with HDR (high dynamic range rendering). Light::setPowerScale( 3.14) to compensate in LDR case. External GUI texture may need gamma correction manually. Activate gamma correction (default).