2
$\begingroup$

I'm trying to make a procedural object where I can put a pixel art texture and get a voxel object. I want to be able to change one image and have either the geometry nodes or the material automatically use the same image. This is what I have so far.

I have a grid that goes through a Mesh to Points node and instanciate cubes, then merge by distance to make it one mesh. The texture's alpha selects the points. enter image description here

The material is simple. Just texture through emission node. enter image description here

With this result:

enter image description here

I tried making the color an output and attribute, then putting that attribute in the Material color. enter image description here enter image description here

but I get this

enter image description here

How can I make this work?

$\endgroup$

2 Answers 2

2
$\begingroup$

Set Attribute Domain in output settings to Face or Face corner:

enter image description here

By default, it is vertex, so that color information stored in vertices, not faces.

$\endgroup$
0
$\begingroup$

you can try this node setup:

enter image description here

you might need to play around a bit with the scale/multiply/add values for your image so that you can "see" someting.

enter image description here

result:

enter image description here

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.