Skip to content

Instantly share code, notes, and snippets.

View alaingalvan's full-sized avatar
Resident Latte Graphics Engineer. 👍

Alain Galvan alaingalvan

Resident Latte Graphics Engineer. 👍
View GitHub Profile
@alaingalvan
alaingalvan / custom-baker-importer.py
Last active August 28, 2020 20:58
A Marmoset Toolbag plugin showcasing how to design a custom importer for the baker.
import mset
# Create a new BakerObject
baker = mset.BakerObject()
# Import model
myMesh = mset.importModel("E:/MyMesh.fbx")
# Traverse myMesh and find objects I want to be "High" or "Low"

fujifilm pic

A shot of me with the fujifilm set to a lens length of 38 mm with 3 lights. In heinsight I look a little agressive but heh, at least it's different. 😅

Camera Setup

So I've been improving my camera setup to help with video recordings, livestreams, Zoom calls, etc.

Equipment

void printOpenGLDebugInfo()
{
int majorVersion, minorVersion;
glGetIntegerv(GL_MAJOR_VERSION, &majorVersion);
glGetIntegerv(GL_MINOR_VERSION, &minorVersion);
std::cout << "OpenGL Version: " << majorVersion << "." << minorVersion
<< std::endl;
int work_grp_cnt[3];
@alaingalvan
alaingalvan / RecordingVSCodeMiniMap.md
Created August 14, 2019 04:13
Recording VS Code for use in YouTube Videos, etc.

So I wanted to make an animation of code being written in the minimap, so I set up VS Code so that it would write the minimap canvas to a PNG file every time there's a backspace (play that in reverse and you have typing out a file).

var fs = require('fs')
var curFrame = 0;
function saveCallback() {
    // Get the DataUrl from the Canvas
    const url = document.querySelectorAll('canvas')[1].toDataURL();

 // remove Base64 stuff from the Image
@alaingalvan
alaingalvan / sobol.cpp
Last active June 4, 2020 06:14
Sobol Quasi-Random Sequence Generation by Dr. John Burkardt. Forked to not use cout errors, use less dimensions (saving code size)
/**
* Sobol Noise Generation
* GNU LGPL license
* By Dr. John Burkardt (Virginia Tech)
* https://gist.github.com/alaingalvan/af92ddbaf3bb01f5ef29bc431bd37891
*/
//returns the position of the high 1 bit base 2 in an integer n
int getHighBit1(int n)
{
@alaingalvan
alaingalvan / halton.cpp
Last active December 5, 2020 03:28
Ray Tracing Gem's Halton State code, by Electronic Arts, Colin Barré-Brisebois et al. Errata corrected by Alain Galvan.
// Ray Tracing Gems Chapter 25
// Code provided by Electronic Arts
// Colin Barré-Brisebois, Henrik Halén, Graham Wihlidal, Andrew Lauritzen,
// Jasper Bekkers, Tomasz Stachowiak, and Johan Andersson
// Errata corrected by Alain Galvan
struct HaltonState
{
unsigned dimension;
@alaingalvan
alaingalvan / Batch Scene Rendering.py
Last active July 9, 2023 08:29
A Marmoset Toolbag 3 plugin for rendering batches of scene data automatically.
"""
Batch Rendering
To render a set of scenes individually, you could create a scene with the lights/camera set up
how you would like, then run this plugin after configuring a list of files you want to render.
"""
import mset
import os.path
# List of scenes to load and render
  1. Download Geth, Etherium's official CLI and CPU miner.

  2. Create an account:

geth account new
  1. Download Ethminer.
//-----------------------------------------------------------------------------
// Photoshop Trick
// Author: Kiran Sudhakara
//
// Produces an image that most image editors cannot downsize Inspired
// by http://www.4p8.com/eric.brasseur/gamma.html
//-----------------------------------------------------------------------------
#include "windows.h"
#include <stdio.h>
//-----------------------------------------------------------------------------
import React from 'react';
import Anime from 'react-anime';
class PlaybackAnime extends React.Component {
constructor() {
this.state = { play: true };
this.anime = null;
}
toggleAnime = () => {