Convert opacity maps to actual Geo
-
I have a lots of tree assets that use opacity maps to cut out the cards (leaf placeholders). Is there a way to use the opacity map to change the original geometry from a flat plane into the actual shape of the leaf?
I'm aware Redshift uses the sprite node, but I was thinking for engines like Arnold where a lot of opacity maps slows it down.
-
Hi smckenzie,
The idea of "Cards", "Sprites," or whatever name was used in the past three decades to create trees was always based on the problem that the application had very little power for many polygons.
Image-based details had fewer problems, but the contour was never easy to adapt to the shapes of trees or just leaves. It was created in some apps; if I recall correctly, black was just ignored (alpha-wise). This resulted then in AntiAlias problems.Today, things might be different, and we expect more and turn typically powerful machines into turtles.
With Instancing that has changed to a certain degree, and with that long story so far, we can work with the result of your question.
How to do it? Take an alpha channel from the object in question and set it to black or white. Then open it in Illustrator: Object> Trace Image> Trace and Expand. Clean it up. Yes, if the tree or leaf has a lot of border details, then the amount of polygons needed will get relatively high. This is perhaps the reason this question is not often asked.
Merge the Ai file into Cinema 4D, make it editable, and use only the front cap of the Extrusion (Vector Importer.)
Set up the material with the images.
Set the UV to match the image. It is often easier to keep the frame of the image and have that as a guide.
Pull the N-Gon from it and place it into the Remesher to get a better result.The RS Object on and Matrix Object (Matrix Scatter) will give you a single leave a whole tree, or if the image was a tree, a whole forest.
Example file
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2024_PROJECTS_DRS/20240226_CV4_2024_drs_24_RSpc_02.zip
All the best
-
Thank you as always - your infinite knowledge always amazes me
-
You're too kind, smckenzie, thank you very much.
Have a great weekend!