PDA

View Full Version : Surface instancing question..



Snosrap
01-16-2017, 08:45 PM
Using the "native" instancer is it possible for instances to take on the surface pixel color of the surface that they directly contact with? Example: You have a football field surface with a bitmap that is UVed with a bitmap of the lines and team logo and you want to add instances of "blades" of grass to give the field more depth and you want those blades of grass to take on the colors of the bitmap underneath. Is that possible using UV's and the native instancer? It's very possible to do this with a planar map set to world coordinates, but I need to do it with UV's. DP Instancer can handle it with UV's, but I need to use native. Thanks.

Sensei
01-17-2017, 09:52 AM
Hmm.. if you will fire RayTrace from World Spot (eventually after little offset), in some direction, you can get any color of close mesh (could be below, could be invisible to camera, but visible to rays f.e.)..

jeric_synergy
01-17-2017, 10:54 AM
Here's the previous discussion of this situation:

http://forums.newtek.com/showthread.php?132034-Instances-picking-color-from-UV-Map-the-target-item-is-using

It seems like it might be possible to naively do this, but that some blades of grass might be more than 2 colors. Then it wouldn't differ from a projection.

I think Dodgy/MG demo'd a way to project 'faces' onto instances, which basically made a possible camera of every point in the (LW) universe. Perhaps something like that could be broken up and used.

jeric_synergy
01-17-2017, 11:00 AM
Snosrap, here's a direct link to xSwampyX's solution, with LWS attached:

http://forums.newtek.com/showthread.php?132283-Instances-taking-color-of-an-image&p=1367475&viewfull=1#post1367475

Snosrap
01-17-2017, 06:39 PM
Super! Thanks guys!!!