Message Boards Message Boards

Electrum Anatomy — a glowing metallic NFT

Posted 2 years ago

enter image description here

I recently joined in the fun of making an NFT and created the art set 'Electrum Anatomy'. It can be found on OpenSea here: https://opensea.io/collection/electrum-anatomy.

This collection contains images of various anatomical systems of human, horse, and dog -- all obtained through AnatomyData. The aesthetic is low-polygon, metallic, glowing, and a touch of a vaporwave color scheme. For each species, the collection contains separate images of bones, channels, muscles, and organs.

In this post I'd like to walk you through how these images were created, but first here's a few select images from the collection (click for higher resolution):


I'll walk through a simple example of rendering a gold skull with glowing eyes. The images listed on OpenSea have a few extra details and nuances that I'll gloss over in this post.

Obtaining anatomical data

Obtaining the 3D anatomical data was quite easy. A simple property lookup:

skull = Entity["AnatomicalStructure", "Skull"]["MeshRegion"]

Downsampling a mesh

The aesthetic I was after called for low-polygon meshes, so the next task was to simplify the meshes from AnatomyData. For this I implemented a bare-bones (pun intended) version of the algorithm presented in Surface Simplification Using Quadric Error Metrics, Garland et.al. The function, decimateMesh, takes in a mesh and the number of vertices to contract from the mesh. I plan to submit this to WFR once I flush out more details like handling boundaries differently, always preserving topology, and an optional bias to simplify planar regions less. I've attached the code for decimateMesh below.

Here's a simple example. Let's contract 2650 vertices from a triceratops model:

mr = ExampleData[{"Geometry3D", "Triceratops"}, "MeshRegion"];
mr2 = decimateMesh[mr, 2650];

We went from 5660 triangles to only 360:

MeshCellCount /@ {mr, mr2}
(* {{2832, 8490, 5660}, {182, 540, 360}} *)

And a visual comparison: enter image description here

Let's contract 96% of the skull's vertices to give it that low-poly feel:

dskull = decimateMesh[skull, Scaled[0.96]]

Glowing eyes

To make glowing eyes, I first took a RadialGradientImage, then clipped, rescaled, and blurred it. Finally I colored it cyan, all while preserving an appropriate alpha channel:

clip = 0.9;
grad = RadialGradientImage[{White, GrayLevel[0.8], Gray, Black, Black, Black}];
grad2 = Blur[ImageAdjust[(Clip[grad, {0, clip}, {0, clip + .05}]/clip)^1.5]];

geye = SetAlphaChannel[ImageMultiply[grad2, Cyan], grad]

Rendering

MaterialShading was used to render each 3D object over a black background. For the muscle and organ images, each object was randomly shaded with one of

{"Aluminum", "Brass", "Bronze", "Copper", "Electrum", "Gold", "Iron", "Pewter", "Silver"}

Once rasterized, ImageCompose was used to overlay the glowing eyes.

gskull = Graphics3D[
  GraphicsComplex[
    MeshCoordinates[dskull],
    {MaterialShading["Gold"], MeshCells[dskull, 2, "Multicells" -> True]}
  ],
  Background -> Black,
  Boxed -> False,
  ImageSize -> 700,
  Lighting -> "ThreePoint",
  ViewPoint -> {0, -100, 0},
  ViewVertical -> {0, 0, 1}
];

imskull = Rasterize[gskull, Background -> None];

imskulleyes = ImageCompose[
  ImageCompose[
    imskull, 
    ImageResize[geye, Scaled[5]], 
    Scaled[{.3, .44}]
  ], 
  ImageResize[geye, Scaled[5]], 
  Scaled[{.7, .44}]
];

RemoveAlphaChannel[imskulleyes]

Glowing background

The glowing background was obtained by simply blurring the alpha mask and coloring it gold.

mask = FillingTransform[AlphaChannel[imskulleyes2]];
blur = Blur[mask, 1000];
bg = ImageMultiply[ImageAdjust[blur, {0, 0, 0.75}], ColorData["HTML"]["Gold"]];
bg = ImageMultiply[bg, ColorNegate[mask]];

skullfinal = ImagePad[ImageCompose[bg, imskulleyes2], {{-200, -200}, {-600, -600}}]


Happy NFTing!

Attachments:
POSTED BY: Greg Hurst
6 Replies
Posted 2 years ago

As I asked the question, I offer a simple solution for a simplified ratio with low-poly and max-feature.

Area is a metric of 2D surface, so I evaluate the area and check the difference between original model. As the compress ratio goes up, the plot curve goes down, eventually. So the last biggest area is the last chance. In the triceratops case, 0.7 is a best ratio to keep max feature with a relative low-poly. enter image description here Also, pay attention to toes of triceratops, the toes geometry feature are kept. enter image description here

POSTED BY: Frederick Wu
Posted 2 years ago

Hi Greg,

Interesting work. It's important to have low quantity and high quality mesh for FEA and computer graphics.

One question, how to best decide the reduce rate for vertex without losing 3D model feature, like 0.95 0.96 in your case. What is your opinion ?

POSTED BY: Frederick Wu

Wow this is neat!

POSTED BY: Dariia Porechna

I love them Chip! Pretty awesome work. Let me know if you are interested in exploring Cardano NFTs :)

Posted 2 years ago

Yeah that would be be great!

POSTED BY: Greg Hurst

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract