- Normals
- UVs
- Create normal (
N
) attribute if missing - Create
tangentu
attribute (preferably MikkT) - Create matrix3 from N and tangentu
- Convert matrix3 to
orient
attribute (quaternion)
const canvasSketch = require('canvas-sketch'); | |
const { lerp } = require('./util/math'); | |
const settings = { | |
animate: true, | |
duration: 3, | |
dimensions: [ 640, 640 ], | |
scaleToView: true, | |
playbackRate: 'throttle', | |
fps: 24 |
Using fixed-point encoding for position (14 bits per component) and texture coordinates (12 bits per component), with 32-bit index buffer | |
and this vertex format: | |
// 12 bytes | |
struct PackedVertexOct | |
{ | |
unsigned short px, py, pz; | |
unsigned char nu, nv; // octahedron encoded normal, aliases .pw | |
unsigned short tx, ty; | |
}; |
This might be handy if you have an SVG file that you want to use as, say, a mask for a generative algorithm.
Place the SVG file in the same directory that you are running penplot from.
This optimizes a GLTF file that was exported by blender (or similar) by de-duplicating buffer views (i.e. chunks of bytes) that are equal and removing redundant accessors.
For example, 100 cubes of different scales/materials/rotations/etc should all end up using a single BufferGeometry in ThreeJS, which isn't the case with current GLTF exporters in Blender and parsers for ThreeJS.
In scenes with a lot of instancing, it can dramatically reduce total file size as well as render performance. In one test scene:
Before: 4.8MB file size, 832 THREE.Geometry
instances across 832 THREE.Mesh
objects
After: 661KB file size, 13 THREE.Geometry
instances across 832 THREE.Mesh
objects
Leave a comment to add a project you've created or found!
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.
Name | Stars | Last Commit | Description |
---|---|---|---|
three.js | ![GitHub |
license: gpl-3.0 | |
height: 570 | |
border: no |
This is a list inspired by some of our current or potential lines of work at the World Bank Innovation Labs. The “Innovations in Big Data Analytics” program helps to strengthen the World Bank capabilities to effectively use big data in its operational and strategic work.
We are always looking for great Data Scientists. If you can solve any of these [using open software], you'll be heads down helping us from day one. Email us to [email protected]
(This list is updated frequently).
We are building an open stack to process nightly data from satellite and query light output from all known villages. Currently we are doing 20 years of nightly data for 600,000 villages in India.