PDA

View Full Version : Node to return position of all instances on a surface?



jds580s
08-31-2012, 10:44 PM
I'm instancing hair on a skin surface for an extreme close-up shot. Is there a node that will give me the position of each hair so I can apply a displacement mound and color variation on the skin where each hair is being generated?

My first instinct was to use the Instance Info position but that returns the position for an individual instance, not the positions of all nodes on the generator's surface... at least as far as I understand it. Any ideas?

Thanks!

RebelHill
09-01-2012, 05:09 AM
No, instance position in instance info is a vector set, that includes position values for all instances of that generator.

Im not entirely sure of all the different permutations of pulling instance info in networks elsewhere (obv it work in surfacing, but only on the object being instanced).. so a lil experimentation to see if it all works might be needed.

jds580s
09-10-2012, 12:13 PM
Thanks for the feedback! That is exactly what I thought too, but in doing some testing I think it only returns data when applied to a surface of an object that is being instanced, and returns nothing when applied to the surface that the instances are being generated on. (If that makes sense)

adk
09-10-2012, 05:19 PM
After rethinking this a bit I managed to get the surface part to work. Not sure about displacement tho.
It works by cloning another bit of geometry along with each hair (an sort of inverted half dome) & the ball texture is essentially the distance between it's surface & those dome instances. There is probably another way of doing this without all that hassle tho.

jds580s
09-11-2012, 08:26 AM
adk,

That is an interesting approach. I can see a few limitations, but honestly when is there ever a solution without some kind of trade off. If I use world coordinate textures I think I can get something looking acceptable with adding the geometry to the instance instead of the generator object.

I submitted a feature request and would love to see a node that could handle this in the future.

Thanks so much for letting me know I wasn't just missing something.




After rethinking this a bit I managed to get the surface part to work. Not sure about displacement tho.
It works by cloning another bit of geometry along with each hair (an sort of inverted half dome) & the ball texture is essentially the distance between it's surface & those dome instances. There is probably another way of doing this without all that hassle tho.