Hi guys
i have a simple gradient image that i need convert to array of scalars or 3d vectors without using texture map attribute and after that connect with ICE tree.
is this possible?
i was try to use python and standart ice gradient node but gradient doesn't support more markers than 16
image gradient to ICE
- csaez
- Posts: 253
- Joined: 09 Jul 2012, 15:31
- Skype: csaezmargotta
- Location: Sydney, Australia
- Contact:
Re: image gradient to ICE
Hi maksut,
I don't have softimage in front of me, but a general solution might be something like getting the uv coords by point from Softimage (using something like UVWProperty.Elements.Array), query the color information at that pixel using a python library like PIL/Pillow, and storing the information as an ICEAttribute per object array sorted by point ID (Geometry.AddICEAttribute).
It's a bit of a roundtrip, but I can't see a better approach without using a texture map.
Are you sure you cannot use a temporary texture map to extract the data through python? It would ease things (not all systems have PIL/Pillow installed by default).
Cheers!
I don't have softimage in front of me, but a general solution might be something like getting the uv coords by point from Softimage (using something like UVWProperty.Elements.Array), query the color information at that pixel using a python library like PIL/Pillow, and storing the information as an ICEAttribute per object array sorted by point ID (Geometry.AddICEAttribute).
It's a bit of a roundtrip, but I can't see a better approach without using a texture map.
Are you sure you cannot use a temporary texture map to extract the data through python? It would ease things (not all systems have PIL/Pillow installed by default).
Cheers!
Re: image gradient to ICE
Hey Csaez,csaez wrote:Hi maksut,
I don't have softimage in front of me, but a general solution might be something like getting the uv coords by point from Softimage (using something like UVWProperty.Elements.Array), query the color information at that pixel using a python library like PIL/Pillow, and storing the information as an ICEAttribute per object array sorted by point ID (Geometry.AddICEAttribute).
It's a bit of a roundtrip, but I can't see a better approach without using a texture map.
Are you sure you cannot use a temporary texture map to extract the data through python? It would ease things (not all systems have PIL/Pillow installed by default).
Cheers!
Super thanks for the nice solution. Pillow module is exactly what i need for that!
Who is online
Users browsing this forum: No registered users and 21 guests