Leanpub Header

Skip to main content

Inter-Process Communication in Real-Time 3D Applications : First Edition

A Practical C++ Guide to Live-Linking Pixar'S OpenUSD With Modern gRPC.

A hands-on introduction to IPC in real-time 3D Applications using modern C++, gRPC, and OpenUSD, featuring a practical LiveLink pipeline between Autodesk Maya and a custom USD viewer.

Minimum price

$35.00

$45.00

You pay

$45.00

Author earns

$36.00
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
EPUB
WEB
About

About

About the Book

Inter-Process Communication in Real-Time 3D Applications is a practical guide to building production-ready IPC systems using gRPC and Protocol Buffers in C++.

Targeted at experienced developers in VFX, animation, and games, it covers effective message design, service architecture, performance optimization, and both synchronous RPCs and the modern callback-based asynchronous API—with real-world code examples throughout.

The book concludes with a hands-on capstone project: building a LiveLink system that connects Autodesk Maya to a custom UsdViewer using gRPC. You'll stream live edits and state changes across processes while working directly with OpenUSD stages—gaining a solid, adaptable foundation for creating responsive, real-time integrations in your own pipeline.

Before diving in, it helps to have some familiarity with the tools and technologies used throughout this book. You don't need to be fluent in all of them and every major concept is introduced with clear, step-by-step examples. However, having a basic working knowledge will make the material easier to absorb.

Helpful Background Knowledge:

·         C++: Solid understanding of modern C++ (C++11/14/17/20), including memory management, object lifetimes, and threading concepts.

·         OpenGL: Familiarity with modern OpenGL concepts, including framebuffers, shaders, and rendering pipelines.

·         Pixar’s OpenUSD: Working knowledge of core USD concepts such as stages, prims, attributes, and layers.

·         Maya API: Experience with C++ plugin development for Maya, including MObject usage and Function Set patterns.

·         MayaUSD Plugin: Understanding of how OpenUSD integrates into Maya through the MayaUSD plugin.

·         Cmake:  Familiarity with configuring, building, and linking C++ projects using CMake.

·         Qt: Comfortable with creating Qt widgets, signal/slot communication model, and the Qt event loop.

If you are not fully comfortable with one or more of these topics, don't worry. Each chapter introduces the concepts you need as they become relevant and builds on them progressively.


Chapter 1 – Protocol Buffers Fundamentals

Introduces Protocol Buffers as a language-agnostic data serialization format. This chapter covers schema design, type systems, versioning rules, and best practices for evolving message definitions in long-lived pipelines.


Chapter 2 – Modern gRPC Fundamentals

Explores gRPC as a high-performance RPC framework built on HTTP/2. The chapter explains RPC models, streaming semantics, synchronous and asynchronous APIs in C++.


Chapter 3 – OpenUSD Fundamentals

Provides a foundational understanding of Universal Scene Description.


Chapter 4 – MayaUSD Plugin Fundamentals

Examines how OpenUSD is integrated into Autodesk Maya through the MayaUSD plugin. This chapter covers stage access, observing scene changes, interacting with prims and attributes, and using the MayaUsd API to react to edits in real time.


Chapter 5 – Building a Custom USD Viewer

Focuses on constructing a lightweight custom USD viewer. It introduces stage loading, viewport rendering, basic interaction, and how a standalone viewer can serve as a receiving endpoint for live USD updates.


Chapter 6 – Building LiveLink Services

Brings the previous chapters together by implementing a real-time LiveLink service. This chapter demonstrates detecting changes in Maya, serializing USD data, streaming updates via gRPC, and safely applying those updates to a live stage in the viewer.


Chapter 7 – OpenTelemetry Instrumentation

Introduces observability for real-time systems using OpenTelemetry and Prometheus. The chapter shows how to instrument gRPC clients and servers, collect metrics, and use measurement to guide performance and design decisions.

Author

About the Author

Hamed Sabri

Hamed Sabri is a software developer specializing in high-performance computer graphics and real-time systems, with over a decade of professional experience. He has played key roles in production at world-class studios and companies, including Autodesk, Weta Digital, and Sony Santa Monica Studio. His work spans diverse industries, including Media & Entertainment, Advanced Manufacturing, and Video Game.

In his spare time, Hamed enjoys baking and cherishing quality moments with his young son.

Contents

Table of Contents

Preface

  1. Why I Wrote This Book
  2. Who This Book Is For
  3. How to Use This Book
  4. How To Get the Source Code
  5. Demos
  6. Feedback
  7. Errata
  8. Artist Credit

Prerequisites

  1. Supported Platform
  2. CMake

Chapter 1 - Protocol Buffers Fundamentals

  1. Schema Definition and Data Types
  2. Style Guide
  3. Syntax
  4. Package
  5. Import
  6. Message and Field
  7. Oneof
  8. Limitations
  9. Exercise Example
  10. How to Consume Protobuf
  11. CMake Setup
  12. Attribute.proto
  13. Build and Install the Project
  14. Summary

Chapter 2 - Modern gRPC Fundamentals

  1. Why gRPC is so popular?
  2. Synchronous vs Asynchronous APIs
  3. Stub
  4. Channel
  5. How Is RPC Call Processed?
  6. Service Types
  7. Defining RPC Services
  8. Listening Port
  9. Deadlines
  10. Setting a Deadline
  11. Checking Deadlines
  12. Exercises 1: Unary Service
  13. CMake Setup
  14. Find gRPC Package
  15. Defining a New RPC Service
  16. Generating gRPC Service Code
  17. Synchronous (Blocking)
  18. Server Implementation
  19. Client Implementation
  20. Asynchronous (non-blocking)
  21. Server Implementation
  22. Client Implementation
  23. Exercises 2: Client Streaming Service
  24. Proto Definition
  25. Synchronous (Blocking)
  26. Server Implementation
  27. Client Implementation
  28. Asynchronous (non-blocking)
  29. Server Implementation
  30. Client Implementation
  31. Summary

Chapter 3–OpenUSD Fundamentals

  1. Stage
  2. Stage Traversal
  3. Layer
  4. Local Layers
  5. EditTarget
  6. Paths
  7. Prim
  8. Default Prim
  9. Specifier
  10. Property
  11. Notice
  12. How to Consume OpenUSD
  13. Building OpenUSD Source
  14. CMake Setup
  15. Top-Level Project’s CMakeLists.txt
  16. Executable Target
  17. Environment Setup Script
  18. Hands-On Exercises
  19. How to Run the Executables
  20. Summary

Chapter 4–MayaUSD Plugin Fundamentals

  1. Getting Started with MayaUSD in Maya
  2. How to Build MayaUSD
  3. MayaUsdAPI : stable API library
  4. ProxyStageBaseNotice
  5. ProxyStageSetNotice
  6. ProxyStageObjectsChangedNotice
  7. UFE (Universal Front End)
  8. History
  9. Conceptual Analogy with the Maya API
  10. Core UFE Concepts
  11. Primary UFE Interfaces
  12. Why UFE Matters for OpenUSD Integration
  13. UFE And Maya Runtime (“Maya-DG”)
  14. UFE And MayaUSD Runtime (“USD”)
  15. Exercise 1: SimpleUsdObserver Plugin
  16. CMake Setup
  17. FindMaya.cmake
  18. FindMayaUSD.cmake
  19. FindUFE.cmake
  20. Top-Level Project’s CMakeLists.txt
  21. Linking the Plugin Target
  22. SimpleStageObserver
  23. SimpleSelectionObserver
  24. Installing and Loading the Plugin in Maya
  25. Steps to Install and Load
  26. Testing the Plugin
  27. Summary

Chapter 5–Building a Custom USD Viewer

  1. Directory Structure
  2. CMake Setup
  3. Creating a New Stage and Opening a Stage from File
  4. USD Document
  5. MainWindow
  6. MenuBar
  7. Logger Widget
  8. Camera Navigation
  9. Viewport
  10. UsdRenderEngineGL
  11. UsdDrawTargetFBO
  12. OpenGL Widget
  13. Viewport Dock Widget
  14. Global Single Selection
  15. Picking Object
  16. Summary

Chapter 6 - Building LiveLink Services

  1. LiveLink Directory Structure
  2. Implementing the OpenStage Service
  3. Object Lifetimes and RPC Design Choices
  4. Why Object Lifetimes Matter in gRPC
  5. Choosing Blocking RPCs for Opening a USD Stage
  6. Defining the Protocol Buffers Interface
  7. Server-Side OpenStage Implementation
  8. UsdServer Class
  9. MainWindow Integration
  10. LiveLink Menu
  11. Client-Side OpenStage Implementation
  12. The Maya Plugin Structure
  13. CMake Build Configuration
  14. UsdClient Class
  15. LiveLink Control Window
  16. LiveLink Command
  17. MayaUsd Stage Observer
  18. Maya Scene Observer
  19. Demo
  20. Implementing the Selection Service
  21. Proto Update
  22. Server-Side Selection Implementation
  23. Applying the Selection in the USDViewer
  24. Client-Side Selection Implementation
  25. MayaUsdSelectionObserver
  26. Demo
  27. Implementing a Naïve Attribute Streaming Service
  28. Server-Side Implementation
  29. SetAttributeStream
  30. AttributeReaderReactor
  31. Applying Updates in MainWindow
  32. Client-Side Implementation
  33. sendAttributeUpdate
  34. serializeUsdAttributeAsync
  35. Observing Attribute Changes in Maya
  36. Creating a Simple USD Test Scene
  37. Semantic Transform Support
  38. Protobuf Changes
  39. Client-Side Changes
  40. Server-Side Changes
  41. Improving Client’s Attribute Streaming Overhead
  42. AttributeStreamManager
  43. Implementing a Camera Service
  44. Protobuf Changes
  45. Client-Side Changes
  46. Server-Side Changes
  47. Summary

Chapter 7 - OpenTelemetry Instrumentation

  1. What OpenTelemetry Provides
  2. How gRPC Instrumentation Works
  3. Building gRPC with OpenTelemetry
  4. Building opentelemetry-cpp
  5. Building gRpc Against Opentelemetry-cpp
  6. Rebuilding Project against gRPC with OpenTelemetry Support
  7. Instrumenting Client/Server
  8. MetricLib
  9. Initializing OpenTelemetry Metrics
  10. Viewing Metrics
  11. Understanding Histogram Metrics
  12. Key Client Metrics
  13. Key Server Metrics
  14. Viewing Metrics in Prometheus
  15. Exercise: Measuring the Overhead of Naïve vs. Long-lived gRPC Attribute Streaming
  16. Visualizing Metrics with Grafana
  17. Install and Configure Grafana
  18. Summary

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub