coolbutuseless
banner
coolbutuseless.fosstodon.org.ap.brid.gy
coolbutuseless
@coolbutuseless.fosstodon.org.ap.brid.gy
Nerd. #RStats

[bridged from https://fosstodon.org/@coolbutuseless on the fediverse by https://fed.brid.gy/ ]
#rstats Dev Diary: Realization about this rendering technique: I'm not warping the object, I'm warping space to be non-euclidean!

"It is not the spoon that bends; it is only yourself."

#thereisnospoon
October 24, 2025 at 10:02 PM
#rstats #art using R to glitch 3d rendering

This one is titled: "The ice caves of Hoth"
October 14, 2025 at 8:15 AM
#rstats Dev Diary

Oh yeah! I'm definitely loving this :)

Glitched 3d rendering
October 14, 2025 at 8:08 AM
#rstats Dev Diary - Glitched 3D rendering of a signed distance field

This should be a stack of spheres. But it isn't. And I love it!!!!
October 14, 2025 at 8:08 AM
#rstats Living the dream!

vector memory limit of 16.0 Gb reached, see mem.maxVSize()
October 14, 2025 at 7:42 AM
#rstats Dev Diary - signed distance fields can be constructed from arbitrary user-supplied functions.

* specified using signed distance field
* marching cubes to convert to mesh
* render mesh in {rayrender}
October 14, 2025 at 1:01 AM
#rstats Dev Diary - meshed version of signed distance field now rendering nicely in {rayrender} !

Using the OIDN de-noising library really tidies things up!

Thanks @tylermorganwall
October 13, 2025 at 9:33 PM
#rstats Dev Diary - Figured out some #rayrender settings which work!
October 13, 2025 at 10:33 AM
#rstats Dev Diary - Still debugging the #rayrender export.

Have i got the normals messed up? Tried flipping them, but didn't help.
October 13, 2025 at 10:14 AM
#rstats #balls

3d object created using signed distance fields - a finite repetition of a single field.

Rendered with PBRT
October 13, 2025 at 10:11 AM
#rstats Dev Diary - signed distance field rendering.

Balls!

Finite repetition of a sphere.

csg_sphere(5) |>
csg_repeat_finite(x = 10, lx = 2, y = 10, ly = 1, z = 10, lz = 2)
October 13, 2025 at 5:38 AM
#rstats Dev Diary - infinite spheres in a signed distance field now appear to be working.

Code to create is short:
scene <- csg_sphere(5) |>
csg_repeat_infinite(x = 10, y = 10, z = 10)

Code to render is a bit more complicated :)
October 11, 2025 at 10:23 AM
#rstats Dev Diary - infinite repetition of a sphere in a signed distance field

Pretty debugging plots 😍

#mood #art

csg_sphere(3) |>
csg_repeat_infinite(x = 10, y = 10, z = 10)
October 11, 2025 at 10:08 AM
That's no moon!

#rstats
October 11, 2025 at 1:03 AM
#rstats Dev Diary - SDF/CSG rendering

A rotated space-filling structure (gyroid)
October 10, 2025 at 10:05 AM
I needed some bitmapped text for "a thing" (TM) in #rstats

{lofifont} includes 'unifont' with unicode chars as coordinates.

lofifonts::bitmap_text_coords('こんにちは') |>
ggplot() +
geom_tile(aes(x, y)) +
ggtitle("Hello") +
coord_equal() +
theme_minimal() […]

[Original post on fosstodon.org]
October 10, 2025 at 9:47 AM
#rstats Dev Diary: refactor of rending from signed-distance field to {grid} graphics

#art
October 9, 2025 at 9:17 PM
#rstats Dev Diary - tidied rendering of signed-distance fields to {rgl} polygons

csg_gyroid() |>
csg_to_rgl(lower = -8, upper = 8, size = 0.2, smooth = TRUE, color = 'royalblue')

Internally:
* signed distance field function created
* evaluated at array grid […]

[Original post on fosstodon.org]
October 9, 2025 at 11:09 AM
#rstats Dev Diary - signed-distance field rendering via raymarching.

Finally found time to shake out some of the standard plots

1. Num of iterations to object
2. Normals at object intersection
3. Ambient occlusion
4. Distance from eye
October 9, 2025 at 10:03 AM
Looks like I may have to write my own crappy data-frame-to-PDF exporter.

I just want something quick-and-dirty. Not having to import the entire latex/rmarkdown ecosystem.

#rstats
September 25, 2025 at 9:40 PM
#rstats Dev Diary - I have now implemeneted perspective rays for my signed-distance-field renderer

Image 1: Orthographic render
Image 2: Perspective render
September 24, 2025 at 12:05 PM
#rstats Dev Diary: Testing generation of initial rays for ray-marching signed-distance-field by plotting with {rgl}

Given eye, lookat & up as well as viewing plane dimensions, generate initial rays into the scene
September 22, 2025 at 10:20 AM
#rstats Dev Diary - Ray marching through a signed distance field (a sphere intersected with 2 cylinders)

I now have some ambient occlusion calculations working. Shading indicates the ambient occlusion factor which will be used to modify the global lighting on the object.
September 20, 2025 at 4:37 AM
#rstats Dev Diary SDF Ray marching - a bit more abstract

Infinite repeating canonical object

#art
September 19, 2025 at 11:29 AM
#rstats Dev Diary - SDF ray marching: figured out how to calculate surface normals!

This means I can now do some lighting.

I'm wondering if I can just get away with ambient occlusion as being "good enough" because there's little chance I chance I want to go […]

[Original post on fosstodon.org]
September 19, 2025 at 10:30 AM