Jump to content

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.

 

Link to comment
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

Link to comment
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

 

Link to comment
Share on other sites

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
Link to comment
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

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...