Skip to content

Instantly share code, notes, and snippets.

@vassvik
vassvik / Simulation_Projection.md
Last active March 27, 2024 09:31
Realtime Fluid Simulation: Projection

Realtime Fluid Simulation: Projection

The core of most real-time fluid simulators, like the one in EmberGen, are based on the "Stable Fluids" algorithm by Jos Stam, which to my knowledge was first presented at SIGGRAPH '99. This is a post about one part of this algorithm that's often underestimated: Projection

MG4_F32.mp4

Stable Fluids

The Stable Fluids algorithm solves a subset of the famous "Navier Stokes equations", which describe how fluids interact and move. In particular, it typically solves what's called the "incompressible Euler equations", where viscous forces are often ignored.

Twitter abuses all media file uploads, each type in its own way. If we want to upload a good looking animation loop from some low-color, high-detail generative art, we have to game their system's mechanisms.

  • don't upload a video file, they will re-encode it into absolute 💩

  • create a GIF, which they will auto-convert into a video file 😱

  • The frames of the GIF will be resized to an even-sized width using an extremely naive algorithm. Your GIF should be an even size (1000, 2000,

@chrisperrella
chrisperrella / Tech Art Expectations
Last active July 13, 2023 17:48
Tech Art Expectations
There are a handful of different specializations under the ‘Tech Art’ umbrella, the first step would be to identify what area interests them. Below are different specializations and what skills I would expect for each discipline.
Technical Animator (TD at IG)
This role is for an individual interested in empowering Animators. Physics, jiggle, muscle deformation and cloth simulation are particular areas that would be explored in this role. A portfolio would show the following:
• Understanding of Rigging
• Understanding of OpenMaya/PyMEL/MEL/Python
• Understanding of Mocap Pipelines
Technical Artist (Rendering)
@pixelsnafu
pixelsnafu / CloudsResources.md
Last active April 24, 2024 11:45
Useful Resources for Rendering Volumetric Clouds

Volumetric Clouds Resources List

  1. A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)

  2. S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]

  3. [R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand

// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
@ben-doyle
ben-doyle / perforce.MD
Last active November 21, 2023 18:33
Perforce for git users.

Understanding Perforce (as a git user).

Commands

Git Perforce Command Line P4V Notes
git pull p4 sync get latest revision
n/a p4 update ? Get latest revision without overwriting files that have been changed.
git checkout p4 edit checkout You plan to change a file from the version control system
git commit p4 submit submit
git push n/a n/a No perforce equivalent. There is no concept of a pure local submit in Perforce.
@notlion
notlion / gltf_primitive_pbr_fs.glsl
Last active February 15, 2022 07:20
GLTF2 Utils for Cinder (With support for up to 4 blendshapes)
precision highp float;
// The PBR shader below is adapted from the Khronos glTF WebGL example:
// https://github.com/KhronosGroup/glTF-WebGL-PBR/blob/master/shaders/pbr-frag.glsl
struct PBRInfo {
float NdotL; // cos angle between normal and light direction
float NdotV; // cos angle between normal and view direction
float NdotH; // cos angle between normal and half vector
float LdotH; // cos angle between light direction and half vector
@sebbbi
sebbbi / fast_spheres.txt
Created February 18, 2018 19:31
Fast way to render lots of spheres
Setup:
1. Index buffer containing N quads (each 2 triangles), where N is the max amount of spheres. Repeating pattern of {0,1,2,1,3,2} + K*4.
2. No vertex buffer.
Render N*2 triangles, where N is the number of spheres you have.
Vertex shader:
1. Sphere index = N/4 (N = SV_VertexId)
2. Quad coord: Q = float2(N%2, (N%4)/2) * 2.0 - 1.0
3. Transform sphere center -> pos