Skip to content

Instantly share code, notes, and snippets.

Nicolas Lelong rotoglup

View GitHub Profile
View 202006 - notes about tools.md

Conan (on Windows)

  • conan search <name> -r conan-center

What I liked :

  • easy install through python's pip

What I don't like :

View 202005 - notes about system configuration
* `Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private`
@rotoglup
rotoglup / 202005 - notes about c-c++ libraries.md
Created May 21, 2020
Random notes while using random libraries
View 202005 - notes about c-c++ libraries.md

Handmade Math

  • v1.11, 05/2020, https://github.com/HandmadeMath/Handmade-Math
  • I like the C API, and single-file distribution, but had the following problems
    • no support for matrix inverse
    • troubles building in C++ code, with gcc: error: ISO C++ prohibits anonymous structs [-Werror=pedantic]
@rotoglup
rotoglup / 202005 - threejs gotchas.md
Last active May 18, 2020
A personal list of traps if fell into using threejs
View 202005 - threejs gotchas.md

applyMatrix on Geometry does not flip faces when needed

applyMatrix, on Geometry or BufferGeometry, does not flip faces indices when applying a matrix that flips normals (determinant < 0).

see https://github.com/mrdoob/three.js/issues/17361

View 202003 - a look into threejs shaders.md

Based on my looking at ThreeJS r115dev source code, while trying to figure out how to customize the lighting by writing my own shader.

Materials

ThreeJS has the following Material classes :

  • MeshBasicMaterial, not affected by lights
  • MeshLambertMaterial: lighting is computed at each vertex, for diffuse lighting, and interpolated in gouraud like fashion
View 202003 - a look into threejs API.md

Once more, I'm struggling to wrap my head around the threejs API, here are my notes.

IMPORTANT base on threejs r114 (march 2020)

API topics covered :

  • Scene and Object3D, hierarchy, transforms
  • Maths, linear algebra
  • DirectionalLight, as I'm currently trying to understand how to attach one of them to a Camera...
View 202003 - a look into threejs API
Once more, I'm struggling to wrap my head around the threejs API, here are my notes.
> **IMPORTANT** base on threejs `r114` (march 2020)
API topics covered :
* Scene and Object3D, hierarchy, transforms
* Maths, linear algebra
* DirectionalLight, as I'm currently trying to understand how to attach one of them to a Camera...
@rotoglup
rotoglup / Blender scripting notes.md
Last active Mar 9, 2020
Some Blender 2.80 scripting notes
View Blender scripting notes.md

Materials

  • Material slots :
    • bpy.ops.object.material_slot_add({'object':obj})
    • bpy.ops.object.material_slot_remove({'object': obj})
  • Could not a find a way to get material preview images from a script, browsing the source code, they seem to be generated in an async way only in the related UI components

GLTF export

To export ambient occlusion textures, one have to use a glTF Settings node group, which can be created by script :

@rotoglup
rotoglup / graphics-companies.geojson
Last active Dec 6, 2019
A map of companies developping graphics software, in Europe
View graphics-companies.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rotoglup
rotoglup / 201909 - a look into threejs raycaster.md
Last active Apr 21, 2020
201909 - a look into threejs raycaster
View 201909 - a look into threejs raycaster.md

A look into threejs raycaster

I've been looking at the current master source code, not a specific version : github commit b3ce68b4 on sept. 2019.

The source code is located in src/core/Raycaster.js, and the doc is online.

A Raycaster instance is constructed given a ray (origin point + direction vector) and a range on this ray (near, far distances), and offers the following API :

  • intersectObject( object, recursive, optionalTarget ) : Array
You can’t perform that action at this time.