Jump to content

How to Scatter geometry Using Color Information


Recommended Posts

Hello.I am a new user to Houdini.
I imported an unwrapped model (In UDIM format) . I then Painted on the object in MARI for preparing it to scatter on the locations where there is color(Black). I Imported them in Houdini and got them on my object using attribute to MAP.
My object now has the paint. I want to know how do I scatter on the specific black color only and nowhere else? 

Link to comment
Share on other sites

In scatter sop you can turn on "Density Attribute", and set it to an attribute that will drive the density. By default this is set to "density" but you could use color also. 

But since you painted black as the color you want, you need to use a complement to get it to put points where you want. Complement is 1 - (val). So since you have black as the area you want to fill, and black = 0, 1 - 0 = 1, so there will be full density there. We may as well just bind it out to density while we're at it, too.

nodes.png.2815d137c87f8ebd4d4fe0183310da68.png

complement.thumb.png.5949f386308aceddb6ab155636ca0fc0.png

scattercolot.png.4beff52e2cdd16b768e2adb9e49f08db.png 

Link to comment
Share on other sites

9 hours ago, jamesr said:

In scatter sop you can turn on "Density Attribute", and set it to an attribute that will drive the density. By default this is set to "density" but you could use color also. 

But since you painted black as the color you want, you need to use a complement to get it to put points where you want. Complement is 1 - (val). So since you have black as the area you want to fill, and black = 0, 1 - 0 = 1, so there will be full density there. We may as well just bind it out to density while we're at it, too.

nodes.png.2815d137c87f8ebd4d4fe0183310da68.png

complement.thumb.png.5949f386308aceddb6ab155636ca0fc0.png

scattercolot.png.4beff52e2cdd16b768e2adb9e49f08db.png 

Thank you James. It works but just having one problem. When you use copy to points SOP, and try to scatter geometry of a bit High density scale(from the scatter SOP) like 5000 instead of 10 the system crashes again and again. How can this be fixed without making the file heavy?

My system config is Intel® Xeon(R) CPU E3-1240 v5 @ 3.50GHz × 8 with a 62GB RAM and 8GB Quattro M4000 Nvedia Graphic card. 

Link to comment
Share on other sites

43 minutes ago, jamesr said:

In the Copy SOP, try turning on the "pack and instance" toggle. Packed geometry is much more efficient. Just note that if you're not rendering in mantra, it will need to be unpacked before rendering. 

Thank you James! It works fine!! Gracias!

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...