Skip to content

Instantly share code, notes, and snippets.

View meshula's full-sized avatar
💭
Exploring liminal spaces

Nick Porcino meshula

💭
Exploring liminal spaces
View GitHub Profile
@meshula
meshula / tinyTVcolor.c
Created April 12, 2025 18:54
tinyTVcolor.c
// ttvColor.h
#ifndef TTVCOLOR_INCLUDED
#define TTVCOLOR_INCLUDED
typedef struct {
float x, y;
} ttvCIEXY;
typedef struct {
float r, g, b;
@meshula
meshula / labcart.md
Created March 23, 2025 00:58
bring up RPi with vk and no x11

Install development tools and SDL2

apt-get update apt-get install -y zsh git build-essential cmake
libsdl2-dev libsdl2-2.0-0
libvulkan-dev vulkan-tools
libsdl2-mixer-dev # For audio

Create our game user and directories

useradd -m -s /usr/bin/zsh game mkdir -p /opt/game/{assets,config}

@meshula
meshula / what-is-a-color-space.md
Last active March 21, 2025 06:55
What is a color space

What is a color space, and what is Rec709?

Illuminant E and the Spectral Locus

A long time ago before most of us were born, the science of the measurement of light had become quite advanced, sensitive instruments and clever procedures could very precisely distinguish one wavelength of light from another and could measure all the wavelengths in a spectrum. Knowledge of the eye too had advanced, and clever and precise methods relying on both instruments and people's abilities to judge what they were seeing led to quite good descriptions of how the retina, via the rods and cones, could turn a certain amount of light into a certain amount of retinal activity.

These retinal response curves led to the mathematical RGB tristimulus model we are all familiar with, each of the red, green, and blue curves corresponding very well to the response of the retina to light. Unsurprisingly, those corresponds very well also to the distribution of light in the environment, and there's good quantum mechanical reasons for

@meshula
meshula / bio.md
Created February 20, 2025 01:08
biography

Nick Porcino has worked at the intersection of art and engineering since the first days of 8 bit computers and consoles. His early research into computer graphics, neural networks and robotics in the 1980s led to a career developing technologies for toys, game engines, film production, mobile phones, and AR/VR. He has developed and contributed to toys at Bandai, tools and engines for games and films at Disney, LucasArts, Industrial Light and Magic, and Pixar, frameworks for interactive 3d at Apple, human avatars at Oculus Research, and is now a principal engineer on Pixar’s OpenUSD team.

First, invoke hydra to render, then fetch the texture from the HdxTaskController, which is on HdEngine.

    // do the render
    _engine->Render();

    auto tc = _engine->GetHdxTaskController();
    HdRenderBuffer* buffer = tc->GetRenderOutput(HdAovTokens->color);
    buffer->Resolve();

Next steps for the Gusteau architecture, (c) 2021 Nick Porcino

I take a strong philosophical break with many game editors. It's considered in normal in editors that one directly manipulates the representation of objects in the scene, rather than transacting properties of the objects in the scene.

To sidebar that a bit, a really common criticism of C and C++ is the lack of reflection of structs and classes, and the large number of macro and template libraries that attempt to add it in some way are evidence that it's a common way of thinking about user facing data editing. We can also see the prevelance of systems like CapnProto, flatbuffers, protobuf, etc., that all draw a one to one correspondence between an object and its implementation.

That approach ties directly what a program does to what a program represents. It also means that a barrier to portability between systems is that instead of a system functioning, in a conceptual sense, the same as another system, it must instead to the degree necessary t

@meshula
meshula / UsdSkyAPI.usda
Last active October 16, 2024 16:29
sky schema for usd
#usda 1.0
(
doc = """UsdSkyModel is a schema representing procedural sky parameters.
It allows for defining parameters like solar position, atmospheric clarity,
and the underlying sky model (Preetham, Hosek-Wilkie, Nishita) for realistic
sky rendering.
UsdCloudModel is a schema for defining procedural cloud parameters,
inspired by meteorological concepts like cloud cover, cloud types, altitude,
and density. Multiple layers can be combined to create complex cloud formations.
@meshula
meshula / lab_noodle.h
Created September 13, 2024 01:02
lab_noodle.h
#ifndef included_noodle_h
#define included_noodle_h
/*
LabNoodle
Graphical Graph Editor
The interface does not expose the UI system, but currently the
@meshula
meshula / radiometric-vs-photometric.md
Last active March 3, 2025 09:18
radiometric-vs-photometric.md

Measuring Light

Light is measured in two ways. Radiometry measures the energy impinging on a sensor, and photometry attempts to qualitatively measure light to represent how a human observer experiences light. Radiometry is important when physical metrics must be preserved, such as in simulation tasks, and photometry is important in subjective tasks, such as selecting lights to illuminate a street.


Radiometric Units

Radiometric units measure the physical properties of light, independent of human perception. These units are based on the total energy or power of light across all wavelengths.

To better understand how these radiometric units are related, imagine a conceptual "cube" where each axis represents a dimension of measurement integration:

@meshula
meshula / template.usda
Last active June 3, 2024 06:38
template.usda
#usda 1.0
(
endTimeCode = 241
framesPerSecond = 24
metersPerUnit = 1
startTimeCode = 101
timeCodesPerSecond = 24
upAxis = "Y"
)