Custom Render Texture + Vertex Positions

Node-based Shader Editor

Custom Render Texture + Vertex Positions

Postby Osteel » Fri Jan 18, 2019 7:26 pm

Hi ASE,

I have a bit of a complicated question, and I might butcher explaining what I'm trying to achieve. Essentially, we're deforming a plane and would like to generate a readable texture that maps the vertex positions onto the RGB channels to be read by a script. By doing this, we want to be able to position world objects at specific vertices by simply reading the texture's pixel values.

After some research, we did stumble across this post http://amplify.pt/forum/viewtopic.php?f=8&t=752 about how ASE now supports the use of custom render textures.

So my question is: how would you approach creating this RBG texture based on vertex positions of a plane in ASE? From there, following your existing example of how to pass it into a custom RT seems quite simple.

Thank you!
Osteel
 
Posts: 3
Joined: Fri Nov 09, 2018 4:36 pm

Re: Custom Render Texture + Vertex Positions

Postby Amplify_Borba » Mon Jan 21, 2019 4:49 pm

Hello!

Although I'm not entirely sure how you would build the render texture from the values, perhaps you could define min and max values of height, length and depth for each of the x, y and z coordinates in local space, and then convert those values into a range of 0 to 1 for each.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 9 guests