Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Using terrain alphamap in visual effect graph

Discussion in 'Visual Effect Graph' started by FabioGavinelli, May 6, 2020.

  1. FabioGavinelli

    FabioGavinelli

    Joined:
    Nov 24, 2018
    Posts:
    10
    hi all,

    I i'm trying to use terrain's alphamap in the vfx graph to determin where the particles have to spawn.

    I know I can use the "Set Position From Map" node to achive this but I want the particles to spwan according only one layer that in my case is rapresented by the green color of the texture. The problem is that I can't split the map in RGBA and use only the green part. Is this possible? If yes, how can I achive this?

    Annotazione 2020-05-06 162712.png
     
  2. marianomeijome

    marianomeijome

    Joined:
    Dec 23, 2019
    Posts:
    5
    I think you want to use the Sample Texture2D node and then feed it into 'Set Position'
     

    Attached Files:

    florianhanke likes this.
  3. FabioGavinelli

    FabioGavinelli

    Joined:
    Nov 24, 2018
    Posts:
    10
    but sample node take just one point of the texture right?