leakec / sihm

Standalone Interactive HTML Movie (SIHM): A highly-portable, interactive way to visualize your simulations.
https://leakec.github.io/sihm/
MIT License
1 stars 0 forks source link

Create at least 5 examples total #13

Open leakec opened 1 year ago

leakec commented 1 year ago
leakec commented 1 year ago

I'd like to do one with a fancy GLSL shader. Some neat info here A nice gallery here.

I'm thinking this one would be cool to place on a mesh. I could even replace their Perlin noise with the glslify Perlin noise available in JS, since we can now add extra modules (#12).

leakec commented 1 year ago

I'm going to try and use the above shader plus the transparent head from this scene in a double pendulum example. Will need to add support for MeshLambertMaterial for this: #15.

EDIT: Decided to use a 3D perlin noise version of the shader to avoid seams on the mesh. Also, decided to go with a reflectivity version rather than the transparent head above, since it looks better with the background.

leakec commented 1 year ago

Ran into an unexpected issue with a shader. I was using UV coordinates but the meshes from FreeCAD do not export with UV coordinates. Hence, all UV coordinates = (0,0). Going to try using Blender to add UV coordinates to a mesh using this.

This works really well after a few modifications. Added to utils in 276cdd53ac91485cd3e606d62907bfd0606276a9.

leakec commented 1 year ago

Something like this but done with shaders rather than in the render loop would be a cool demonstration of vertex shaders used in sihm. Calling this the "amoebic glob".