Skip to content

Instantly share code, notes, and snippets.

View cmuratori's full-sized avatar

Casey Muratori cmuratori

View GitHub Profile
LuaJIT - JIT for the popular LUA scripting language https://luajit.org/luajit.html
Magic Wormhole - conveniently transfer files directly from one computer to another https://github.com/magic-wormhole/magic-wormhole
ffmpeg - antagonizes Theo https://www.ffmpeg.org/
rclone - cli tool for copying/syncing files across network or to/from cloud services: https://rclone.org/
mergerfs - union filesystem on linux: https://trapexit.github.io/mergerfs/
mkvtoolnix - cli tools for mkv file property editing/muxing/etc: https://mkvtoolnix.download/
Calibre - e-book management/conversion: https://calibre-ebook.com/
Subtitle Edit - video subtitle editor: https://www.nikse.dk/subtitleedit
FreeTube - client for youtube without google nonsense: https://freetubeapp.io/
SmartTube - similar as above but for AndroidTV's: https://smarttubeapp.github.io/
This file has been truncated, but you can view the full file.
<!DOCTYPE html><html lang='en' itemscope itemtype='https://schema.org/Article'><head>
</head>
<body>
<svg id='Graph' style='width:100%;height:50vh;user-select:none;' viewBox='0 0 21.487562 16.000000'>
<g id='ViewXForm'>
<line x1='0.693147' y1='0' x2='0.693147' y2='16.000000' vector-effect='non-scaling-stroke' stroke='#eeeeee' stroke-width='1.0' />
<line x1='1.098612' y1='0' x2='1.098612' y2='16.000000' vector-effect='non-scaling-stroke' stroke='#eeeeee' stroke-width='1.0' />
<line x1='1.609438' y1='0' x2='1.609438' y2='16.000000' vector-effect='non-scaling-stroke' stroke='#eeeeee' stroke-width='1.0' />
<text x='2.197225' y='16.000000' fill='#888888' font-size='0.5' alignment-baseline='baseline'>8b</text>
If I'm understanding correctly:
If you are talking about position, then the apparent relative position of the mesh (m) relative to the camera (c) is just (m - c). This means that, relative to the mesh, the camera _already has_ the position track you wanted the mesh to get, only it's negated.
So one answer is, assuming the mesh is at the origin, just copy the translation track from the camera to the mesh, and negate all three translation channels (X/Y/Z). Move the camera back to the origin, and zero out its animation. That should "just work".
If you are tool can't do that, depending on how you need to construct this, and what your art tool supports, you could go through some relatively convoluted nonsense, for example:
1) Create a dummy object at the location of the mesh.
2) Parent the camera to the dummy, but make sure to leave it's relative transform (don't zero it).
@cmuratori
cmuratori / gist:48ab8f6a6d78196e1323d4a0796e7732
Created July 8, 2016 05:32
Microsoft Visual Studio 2012 Internal Compiler Error
// Put this in a .c file and cl it to cause the internal compiler error. It also crashes as a .cpp, but you have to extern "C" the declarations.
typedef union __m128 {float m128_f32[4];} __m128;
__m128 _mm_load_ps(float const *);
void _mm_store_ps(float *, __m128);
void main(void) {_mm_store_ps(0, _mm_load_ps(0));}
/* ========================================================================
$File: tools/ctime/ctime.c $
$Date: 2016/05/08 04:16:55PM $
$Revision: 7 $
$Creator: Casey Muratori $
$Notice:
The author of this software MAKES NO WARRANTY as to the RELIABILITY,
SUITABILITY, or USABILITY of this software. USE IT AT YOUR OWN RISK.