Woden 2: Developing a modern 3D
graphics engine
Ronie Salgado
Universidad de Chile
Talk Outline: Foundations
● Why rewriting Woden?
– OpenGL problems
– Classic graphics API (OpenGL, Direct 3D except 12)
– “Modern” PC architecture
– Modern graphics API (Vulkan, Direct 3D 12 and Metal)
● Core abstraction layers
– AbstractGPU
– Dastrel (Data Stream Language)
– Slovim (Dastrel back-end)
Talk Outline: Woden 2 Layers
● WodenMath library
● Core
– Pipeline state cache
– Resource cache
– GPU resource management
● Basic layers
– Scene graph
– Woden athens backend
● Application layers
– Woden Roassal ported to Woden 2
– Woden 2 Game System
– Level Editor
Why rewriting Woden 2?
● OpenGL is very complex.
● OpenGL drivers are very buggy!
– NVIDIA does not follow strictly the spec.
– AMD is very strict.
– Intel, OS specific behavior.
● OpenGL uses a thread local context.
● OpenGL is old.
● GLSL compiler is in the driver.
Choose a desktop OpenGL version
OpenGL GLSL
1.2 Not available
2.0 1.10
2.1 1.20
3.0 1.30
3.1 1.40
3.2 1.50
3.3 3.30
4.0 4.00
4.1 4.10
4.2 4.30
4.4 4.40
4.5 4.50
Classic graphics API
Canvas
Shader
CPU
● Set shader, depth buffer state, ...
● Set texture.
● Set vertex buffer.
● Set index buffer.
● Draw indexed elements.
GPU/CP
“Modern” PC Architecture
CPU
RAM
IOMMU VRAM
GPU
CP
Modern Low-Level Graphics API
CPU
CPCommand List
Pipeline State Object
Vertex BufferUniform Buffer Index Buffer
GPUMMap
Texture
Descriptor Set
DMA
Core Abstraction Layers
● AbstractGPU
– https://github.com/ronsaldo/abstract-gpu
● Dastrel (Data Stream Language)
– http://smalltalkhub.com/#!/~ronsaldo/Dastrel
● Slovim (LLVM inspired typed SSA form)
– http://smalltalkhub.com/#!/~ronsaldo/Slovim
AbstractGPU
● Abstraction above Vulkan, Metal and D3D 12.
● API in C inspired by OpenCL
● Implementation in C++
● XML spec for headers and bindings
● Mostly tested with Vulkan in Linux
Dastrel (Data Stream Language)
● Intended to be a semi-visual language
● Statically typed
● Syntax inspired by C, Rust, Swift and Smalltalk
● Dumb type inference
● Compiler front-end written in Pharo
● Emits Slovim SSA form
Dastrel Sample
import environment;
import fragment;
import material;
import lighting;
code_block(fragment) main
{
let N = normalize(FragmentInput.normal);
let V = normalize(-FragmentInput.position);
color: FragmentOutput.color <== forwardLightingModel
albedo: FragmentInput.color*MaterialState.albedo
fresnel: MaterialState.fresnel smoothness: MaterialState.smoothness
normal: N viewVector: V position: FragmentInput.position;
}
Dastrel Sample
struct ObjectStateData
{
matrix: float4x4;
inverseMatrix: float4x4;
color: float4;
visible: int;
}
uniform(set=0, binding=0) ObjectState
{
objectState: ObjectStateData;
}
buffer(set=0, binding=1) InstanceObjectState
{
instanceStates: ObjectStateData[];
}
uniform(set=1, binding=0) CameraState
{
inverseViewMatrix: float4x4;
viewMatrix: float4x4;
projectionMatrix: float4x4;
currentTime: float;
}
Dastrel
function transformPositionToWorld(position: float3) -> float4
{
using ObjectState;
using InstanceObjectState;
using VertexStage;
return objectState.matrix *
(instanceStates[instanceID].matrix * float4(position, 1.0f));
}
Slovim
● LLVM style SSA form in Pharo.
● Strongly typed.
● Some very basics optimizations.
● Backends for:
– Spir-V (Done)
– GLSL (Done for Vulkan, missing OpenGL)
– C++ (For testing/experimenting)
– HLSL (To be done)
– Metal Shading Language (To be done)
WodenMath
● 3D graphics linear algebra
– Vectors (2D, 3D, 4D)
– Complex
– Quaternions
– Matrices (3x3 and 4x4)
● Same memory layout as C/GPU structures.
● Optimized using Lowcode extended bytecodes.
WodenMath
● 3D graphics linear algebra
– Vectors (2D, 3D, 4D)
– Complex
– Quaternions
– Matrices (3x3 and 4x4)
● Same memory layout as C/GPU structures.
● Optimized using Lowcode extended bytecodes.
WodenMath
Woden 2 Core
● WTEngine is the main entry point
● WTPipelineStateCache loads PSO from JSON
● WTResourceCache for loading files
● WTApplication provides support for Morphic
and OSWindow
● They are wrappers above the AbstractGPU
object for supporting image session saving and
restoring
Woden 2 Core Utilities
● Custom bitmap font format
● Mesh building
● Some GPU structures matching shader
definitions
– WTObjectState
– WTCameraState
– WTLightSourceData
● 3D Model with skeletal animation loading
How do I get Woden 2
● https://github.com/ronsaldo/woden2
● newImage.sh builds dependencies and creates
a Woden 2 image
● Warning: this currently requires a modified VM
at https://github.com/ronsaldo/pharo-vm-
lowcode
Woden 2 Scene Graph
● Simpler than the scene graph in Woden 1.
● Only rendering a 3D scene (except for
WTSNodeModel)
WTFPSSampleApplicationCube
3D Scene Rendering
● Standard forward rendering.
● WTSForwardSceneRenderer
● Command lists are reused if the scene topology
does ot change
● Shadows and a deferred shading renderer are
not yet implemented
Woden 2 Athens Backend
Woden Roassal
Game System
Level Editor
● Bloc over Woden 2
Where is Woden 2?
● https://github.com/ronsaldo/woden2
● But, it requires a modified Pharo VM
● https://github.com/ronsaldo/pharo-vm-lowcode

More Related Content

PPTX
Photosynthesis (teach)
PPTX
Common Elements and their Uses
PPTX
learn about Direct View Storage Tube.pptx
PDF
0610 s08 qp_1
PPT
Animation Techniques
PDF
IL DIRITTO D'AUTORE NELL'ERA DIGITALE
PPTX
Petroleum formation and petroleum forming environment
PPTX
Digital Camera Working Mechanism
Photosynthesis (teach)
Common Elements and their Uses
learn about Direct View Storage Tube.pptx
0610 s08 qp_1
Animation Techniques
IL DIRITTO D'AUTORE NELL'ERA DIGITALE
Petroleum formation and petroleum forming environment
Digital Camera Working Mechanism

What's hot (20)

PPTX
Introduction to Visual Basic 6.0 Fundamentals
PPTX
Computer graphics
PPTX
Cellular Respiration
PDF
Key stage-3-ks3-science-36 p1-2010
PPTX
IGCSE ICT 0417 P2 Document Production
PDF
Cellular Respiration in Yeast
PPTX
Digital Image Processing
ODP
Physical and Chemical changes in pictures
PPTX
Igcse biology edexcel 4.1 4.17
PPTX
Interactions and Interdependence.pptx
PPTX
Image resolution
PDF
"Rainbow Technology"
PPT
Cellular Respiration
PPTX
Igcse biology edexcel 3.8 3.12
PPTX
Monitors & workstation,Donald ch-2
PPT
Visual basic
PPTX
Flat panel display
PPT
History of the Microscope
DOCX
Macromedia Flash Player Practical file
Introduction to Visual Basic 6.0 Fundamentals
Computer graphics
Cellular Respiration
Key stage-3-ks3-science-36 p1-2010
IGCSE ICT 0417 P2 Document Production
Cellular Respiration in Yeast
Digital Image Processing
Physical and Chemical changes in pictures
Igcse biology edexcel 4.1 4.17
Interactions and Interdependence.pptx
Image resolution
"Rainbow Technology"
Cellular Respiration
Igcse biology edexcel 3.8 3.12
Monitors & workstation,Donald ch-2
Visual basic
Flat panel display
History of the Microscope
Macromedia Flash Player Practical file
Ad

Viewers also liked (20)

PDF
Replicated Service Objects -- A Strategy for Distributed Applications
PDF
GemStone/64 product update and road map
PDF
Perfection & Feedback Loops or: why worse is better
PDF
Lub: a DSL for Dynamic Context Oriented Programming
PPSX
Introduction to Direct 3D 12 by Ivan Nevraev
KEY
Interactive Graphic Storytelling: “How the Internet Impacts the Graphic Novel”
PPT
Human Action Recognition Based on Spacio-temporal features
PPTX
Pelican Mapping - FOSS4G 2011
PDF
UP200 dental 3d scanner with dental CAD
PPTX
Special Photo Effects
PPT
Radiosity algorithm
PDF
GLSL Shading with OpenSceneGraph
PPT
Shtanchaev_SPEKTR
PPTX
Steel monkeys: Unity3D глазами программиста графики
PPTX
Shells
PDF
Typography on the Web
PPTX
Quadtree In Game
PPTX
What is 3 d modeling unit 66
PPTX
Orthographic projection
ODP
Building a DIY 3D Scanner
Replicated Service Objects -- A Strategy for Distributed Applications
GemStone/64 product update and road map
Perfection & Feedback Loops or: why worse is better
Lub: a DSL for Dynamic Context Oriented Programming
Introduction to Direct 3D 12 by Ivan Nevraev
Interactive Graphic Storytelling: “How the Internet Impacts the Graphic Novel”
Human Action Recognition Based on Spacio-temporal features
Pelican Mapping - FOSS4G 2011
UP200 dental 3d scanner with dental CAD
Special Photo Effects
Radiosity algorithm
GLSL Shading with OpenSceneGraph
Shtanchaev_SPEKTR
Steel monkeys: Unity3D глазами программиста графики
Shells
Typography on the Web
Quadtree In Game
What is 3 d modeling unit 66
Orthographic projection
Building a DIY 3D Scanner
Ad

Similar to Woden 2: Developing a modern 3D graphics engine in Smalltalk (20)

PDF
Developing games and graphic visualizations in Pascal
PDF
Computer Graphics - Lecture 01 - 3D Programming I
PDF
Syysgraph 2018 - Modern Graphics Abstractions & Real-Time Ray Tracing
PDF
GPU Programming with Java
PPT
Vpu technology &gpgpu computing
PPT
Vpu technology &gpgpu computing
PPT
Vpu technology &gpgpu computing
PDF
Newbie’s guide to_the_gpgpu_universe
PPT
Vpu technology &gpgpu computing
PDF
One Year of Porting - Post-mortem of two Linux/SteamOS launches
PPT
Advanced Graphics Workshop - GFX2011
PPTX
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
PPTX
Graphics processing uni computer archiecture
PDF
Ceph RBD Update - June 2021
ODP
Javascript Update May 2013
PPTX
Cuda Architecture
PDF
Docker and-containers-for-development-and-deployment-scale12x
PDF
Introduction to Docker (as presented at December 2013 Global Hackathon)
PDF
Challenges in GPU compilers
PDF
Rohit Yadav - The future of the CloudStack Virtual Router
Developing games and graphic visualizations in Pascal
Computer Graphics - Lecture 01 - 3D Programming I
Syysgraph 2018 - Modern Graphics Abstractions & Real-Time Ray Tracing
GPU Programming with Java
Vpu technology &gpgpu computing
Vpu technology &gpgpu computing
Vpu technology &gpgpu computing
Newbie’s guide to_the_gpgpu_universe
Vpu technology &gpgpu computing
One Year of Porting - Post-mortem of two Linux/SteamOS launches
Advanced Graphics Workshop - GFX2011
[Unite Seoul 2019] Mali GPU Architecture and Mobile Studio
Graphics processing uni computer archiecture
Ceph RBD Update - June 2021
Javascript Update May 2013
Cuda Architecture
Docker and-containers-for-development-and-deployment-scale12x
Introduction to Docker (as presented at December 2013 Global Hackathon)
Challenges in GPU compilers
Rohit Yadav - The future of the CloudStack Virtual Router

More from ESUG (20)

PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
PDF
Directing Generative AI for Pharo Documentation
PDF
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
PDF
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
PDF
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
PDF
Analysing Python Machine Learning Notebooks with Moose
PDF
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
PDF
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
PDF
Package-Aware Approach for Repository-Level Code Completion in Pharo
PDF
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
PDF
An Analysis of Inline Method Refactoring
PDF
Identification of unnecessary object allocations using static escape analysis
PDF
Control flow-sensitive optimizations In the Druid Meta-Compiler
PDF
Clean Blocks (IWST 2025, Gdansk, Poland)
PDF
Encoding for Objects Matters (IWST 2025)
PDF
Challenges of Transpiling Smalltalk to JavaScript
PDF
Immersive experiences: what Pharo users do!
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
PDF
Cavrois - an Organic Window Management (ESUG 2025)
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
Micromaid: A simple Mermaid-like chart generator for Pharo
Directing Generative AI for Pharo Documentation
Even Lighter Than Lightweiht: Augmenting Type Inference with Primitive Heuris...
Composing and Performing Electronic Music on-the-Fly with Pharo and Coypu
Gamifying Agent-Based Models in Cormas: Towards the Playable Architecture for...
Analysing Python Machine Learning Notebooks with Moose
FASTTypeScript metamodel generation using FAST traits and TreeSitter project
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
Package-Aware Approach for Repository-Level Code Completion in Pharo
Evaluating Benchmark Quality: a Mutation-Testing- Based Methodology
An Analysis of Inline Method Refactoring
Identification of unnecessary object allocations using static escape analysis
Control flow-sensitive optimizations In the Druid Meta-Compiler
Clean Blocks (IWST 2025, Gdansk, Poland)
Encoding for Objects Matters (IWST 2025)
Challenges of Transpiling Smalltalk to JavaScript
Immersive experiences: what Pharo users do!
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
Cavrois - an Organic Window Management (ESUG 2025)

Recently uploaded (20)

PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
CloudStack 4.21: First Look Webinar slides
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
DOCX
search engine optimization ppt fir known well about this
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Taming the Chaos: How to Turn Unstructured Data into Decisions
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Zenith AI: Advanced Artificial Intelligence
CloudStack 4.21: First Look Webinar slides
NewMind AI Weekly Chronicles – August ’25 Week III
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
TEXTILE technology diploma scope and career opportunities
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Enhancing plagiarism detection using data pre-processing and machine learning...
Consumable AI The What, Why & How for Small Teams.pdf
Build Your First AI Agent with UiPath.pptx
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Flame analysis and combustion estimation using large language and vision assi...
OpenACC and Open Hackathons Monthly Highlights July 2025
search engine optimization ppt fir known well about this
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide

Woden 2: Developing a modern 3D graphics engine in Smalltalk

  • 1. Woden 2: Developing a modern 3D graphics engine Ronie Salgado Universidad de Chile
  • 2. Talk Outline: Foundations ● Why rewriting Woden? – OpenGL problems – Classic graphics API (OpenGL, Direct 3D except 12) – “Modern” PC architecture – Modern graphics API (Vulkan, Direct 3D 12 and Metal) ● Core abstraction layers – AbstractGPU – Dastrel (Data Stream Language) – Slovim (Dastrel back-end)
  • 3. Talk Outline: Woden 2 Layers ● WodenMath library ● Core – Pipeline state cache – Resource cache – GPU resource management ● Basic layers – Scene graph – Woden athens backend ● Application layers – Woden Roassal ported to Woden 2 – Woden 2 Game System – Level Editor
  • 4. Why rewriting Woden 2? ● OpenGL is very complex. ● OpenGL drivers are very buggy! – NVIDIA does not follow strictly the spec. – AMD is very strict. – Intel, OS specific behavior. ● OpenGL uses a thread local context. ● OpenGL is old. ● GLSL compiler is in the driver.
  • 5. Choose a desktop OpenGL version OpenGL GLSL 1.2 Not available 2.0 1.10 2.1 1.20 3.0 1.30 3.1 1.40 3.2 1.50 3.3 3.30 4.0 4.00 4.1 4.10 4.2 4.30 4.4 4.40 4.5 4.50
  • 6. Classic graphics API Canvas Shader CPU ● Set shader, depth buffer state, ... ● Set texture. ● Set vertex buffer. ● Set index buffer. ● Draw indexed elements. GPU/CP
  • 8. Modern Low-Level Graphics API CPU CPCommand List Pipeline State Object Vertex BufferUniform Buffer Index Buffer GPUMMap Texture Descriptor Set DMA
  • 9. Core Abstraction Layers ● AbstractGPU – https://github.com/ronsaldo/abstract-gpu ● Dastrel (Data Stream Language) – http://smalltalkhub.com/#!/~ronsaldo/Dastrel ● Slovim (LLVM inspired typed SSA form) – http://smalltalkhub.com/#!/~ronsaldo/Slovim
  • 10. AbstractGPU ● Abstraction above Vulkan, Metal and D3D 12. ● API in C inspired by OpenCL ● Implementation in C++ ● XML spec for headers and bindings ● Mostly tested with Vulkan in Linux
  • 11. Dastrel (Data Stream Language) ● Intended to be a semi-visual language ● Statically typed ● Syntax inspired by C, Rust, Swift and Smalltalk ● Dumb type inference ● Compiler front-end written in Pharo ● Emits Slovim SSA form
  • 12. Dastrel Sample import environment; import fragment; import material; import lighting; code_block(fragment) main { let N = normalize(FragmentInput.normal); let V = normalize(-FragmentInput.position); color: FragmentOutput.color <== forwardLightingModel albedo: FragmentInput.color*MaterialState.albedo fresnel: MaterialState.fresnel smoothness: MaterialState.smoothness normal: N viewVector: V position: FragmentInput.position; }
  • 13. Dastrel Sample struct ObjectStateData { matrix: float4x4; inverseMatrix: float4x4; color: float4; visible: int; } uniform(set=0, binding=0) ObjectState { objectState: ObjectStateData; } buffer(set=0, binding=1) InstanceObjectState { instanceStates: ObjectStateData[]; } uniform(set=1, binding=0) CameraState { inverseViewMatrix: float4x4; viewMatrix: float4x4; projectionMatrix: float4x4; currentTime: float; }
  • 14. Dastrel function transformPositionToWorld(position: float3) -> float4 { using ObjectState; using InstanceObjectState; using VertexStage; return objectState.matrix * (instanceStates[instanceID].matrix * float4(position, 1.0f)); }
  • 15. Slovim ● LLVM style SSA form in Pharo. ● Strongly typed. ● Some very basics optimizations. ● Backends for: – Spir-V (Done) – GLSL (Done for Vulkan, missing OpenGL) – C++ (For testing/experimenting) – HLSL (To be done) – Metal Shading Language (To be done)
  • 16. WodenMath ● 3D graphics linear algebra – Vectors (2D, 3D, 4D) – Complex – Quaternions – Matrices (3x3 and 4x4) ● Same memory layout as C/GPU structures. ● Optimized using Lowcode extended bytecodes.
  • 17. WodenMath ● 3D graphics linear algebra – Vectors (2D, 3D, 4D) – Complex – Quaternions – Matrices (3x3 and 4x4) ● Same memory layout as C/GPU structures. ● Optimized using Lowcode extended bytecodes.
  • 19. Woden 2 Core ● WTEngine is the main entry point ● WTPipelineStateCache loads PSO from JSON ● WTResourceCache for loading files ● WTApplication provides support for Morphic and OSWindow ● They are wrappers above the AbstractGPU object for supporting image session saving and restoring
  • 20. Woden 2 Core Utilities ● Custom bitmap font format ● Mesh building ● Some GPU structures matching shader definitions – WTObjectState – WTCameraState – WTLightSourceData ● 3D Model with skeletal animation loading
  • 21. How do I get Woden 2 ● https://github.com/ronsaldo/woden2 ● newImage.sh builds dependencies and creates a Woden 2 image ● Warning: this currently requires a modified VM at https://github.com/ronsaldo/pharo-vm- lowcode
  • 22. Woden 2 Scene Graph ● Simpler than the scene graph in Woden 1. ● Only rendering a 3D scene (except for WTSNodeModel)
  • 24. 3D Scene Rendering ● Standard forward rendering. ● WTSForwardSceneRenderer ● Command lists are reused if the scene topology does ot change ● Shadows and a deferred shading renderer are not yet implemented
  • 25. Woden 2 Athens Backend
  • 28. Level Editor ● Bloc over Woden 2
  • 29. Where is Woden 2? ● https://github.com/ronsaldo/woden2 ● But, it requires a modified Pharo VM ● https://github.com/ronsaldo/pharo-vm-lowcode