3
$\begingroup$

I have around 200 small spheres that are a part of a 3D data plot and I want to color them based on their z position. The way this is done is by making a material that uses a color ramp based on the z coordinate of the object, and applying the material to every sphere.

The problem is that I want to export this to a glb/glTF and the color ramp node doesn’t function when exported. How can I convert my 1 material into a simple base color for every sphere? It is ok if every single sphere has a different material, its just that doing this by hand is very time consuming.

Thanks

$\endgroup$
1
  • 1
    $\begingroup$ @A T Please show your current material graph (with the color ramp node). $\endgroup$
    – scurest
    Jul 13, 2021 at 0:09

1 Answer 1

3
$\begingroup$

You can get away with 1 material and 1 image texture if you use Project from View for the UV unwrap.

Material: material

3D plot / cloud points: 3d plot

Add a square plane for your point cloud and give it the same material. Bake the texture. Then select everything and UV unwrap (U) with Project from View in orthographical view (Numpad 1). Scale the UV islands to fit the gradient image vertically if needed. Done.

PS: Yes, the UV map is scary. Keep the spheres low-poly.

uv unwrap

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .