# Placing Specific Objects On Colored Surface

**URL:** https://forum.highend3d.com/t/placing-specific-objects-on-colored-surface/1548
**Category:** Maya
**Tags:** mel
**Created:** [April 21, 2008, 3:26pm UTC](https://forum.highend3d.com/t/placing-specific-objects-on-colored-surface/1548 "2008-04-21T15:26:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ewerybody](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@ewerybody](https://forum.highend3d.com/u/ewerybody)
#### Post date: [April 21, 2008, 3:26pm UTC](https://forum.highend3d.com/t/placing-specific-objects-on-colored-surface/1548/1 "2008-04-21T15:26:45Z")

</div>

Hello. I need a way to fill a surface with certain objects depending on the color in the texture underneath. Say the objects are plants and I want roses on green and bushes on red, trees on yellow, small trees on orange..

I could pic a random position. But how to determine the color on that position?

have an Idea?

---

<div class="post-metadata">

### Author: ![ewerybody](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@ewerybody](https://forum.highend3d.com/u/ewerybody)
#### Post date: [April 21, 2008, 3:35pm UTC](https://forum.highend3d.com/t/placing-specific-objects-on-colored-surface/1548/2 "2008-04-21T15:35:16Z")

</div>

ok I have an idea:

1. shoot rayIntersect on the surface to get 3d coords and UV-coords
2. get color from the texture via colorAtPoint on the spot

other ideas?

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [April 21, 2008, 4:04pm UTC](https://forum.highend3d.com/t/placing-specific-objects-on-colored-surface/1548/3 "2008-04-21T16:04:41Z")

</div>

how about extract the individual colors as separate masks and use paint objects aritsan tool with the import presure map option?

---

<div class="post-metadata">

### Author: ![amitc](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@amitc](https://forum.highend3d.com/u/amitc)
#### Post date: [April 21, 2008, 6:01pm UTC](https://forum.highend3d.com/t/placing-specific-objects-on-colored-surface/1548/4 "2008-04-21T18:01:31Z")

</div>

This may be too slow, but you could consider converting texture to particles, then query per particle color (rgbpp), then place your objects. Good thing is you get position for free from particle attribute
