Jump to content
Masoud

How could I transfer colors from material to points?

Recommended Posts

13 hours ago, ikoon said:

Hi Masoud, isn’t Attribute from Map SOP what you need?

https://www.sidefx.com/docs/houdini/nodes/sop/attribfrommap.html

Hi;

AttributeFromMap, creates a point attribute from the color information found in an image (file), but I need to extract colors from texture used in a material, automatically.

Actually, I need this in a digital asset.

 

Thanks.

 

Share this post


Link to post
Share on other sites

I can't find any useful things. some links in that page are broken.

Share this post


Link to post
Share on other sites

@Masoud what effect do you want to achieve.... Please post reference  :wub:

Share this post


Link to post
Share on other sites

I want to use it as a part of my digital asset, so by connecting a geometry to input of my asset, it first converts input geometry to points using ADD SOP, then it needs to fetch and transfers colors from material to points. (Later I will use these colored points to make something else...)

 

1.JPG

Share this post


Link to post
Share on other sites
On 2017-05-12 at 12:05 PM, konstantin magnus said:

Usually I would just copy-paste the nodes from a material network and reconnect their global inputs and outputs.

As shaders work on pixels and not on points I don't think there is a direct way of exporting its calculations to points, but you could try baking out pixel maps and then import them with attribfrommap.

@Masoud most important thing that i need.... you choose to left behind hm ....... :rolleyes:

Quote

(Later I will use these colored points to make something else...)

 

 

here is 6 ...and read please (pixels , values and other stuffs )

explore

6met.hipnc

have a nice Day

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi "srletak";

At first I want to thank you for the file. It's very helpful.

The problem is  I don't want to use a picture file to extract color information (like AttributeFromMap SOP, Pic(), VOP SOP color map, tex() and so on).

I think when a geometry has a material (and a diffuse texture), we should be able to read the color information from it, right? 

I find a Mantra attribute that seems it can pass diffuse information to point : " vm_surface ", but I don't know how to use it..

Edited by Masoud

Share this post


Link to post
Share on other sites
On 6/9/2019 at 1:59 PM, Masoud said:

Hi "srletak";

At first I want to thank you for the file. It's very helpful.

The problem is  I don't want to use a picture file to extract color information (like AttributeFromMap SOP, Pic(), VOP SOP color map, tex() and so on).

I think when a geometry has a material (and a diffuse texture), we should be able to read the color information from it, right? 

I find a Mantra attribute that seems it can pass diffuse information to point : " vm_surface ", but I don't know how to use it..

hi Masoud ,

away from my workstation , but maybe this mixed technique could work ; bake wahtever info from your material into a texture map and then simply read those attributes with a truly_simple_and_pretty_editable AttribFromMap . as bonus points you can edit the bakedTexure with COP context and have a_lot_more control without going to rerender . dont know if this will do the work for your case , but just a suggestion ..

 

.cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×