How to control mesh density based on a texture brightness

   1748   5   0
User Avatar
Member
15 posts
Joined: March 2020
Offline
Most be the most simple thing in the world, but God knows if i can get it right.

I have a grid that have his height controlled by a poly extrude node, what i need now is to been able to add non uniform subdivisions (greeble style) to my mesh, based on the brightness of the texture I apply on the grid.

if someone could be so kind to show me the graph i would really apreciate.
thank you
User Avatar
Member
8554 posts
Joined: July 2007
Offline
you can also use Polyreduce SOP to reduce based on attribute to get map controlled density of the mesh
Edited by tamte - April 25, 2021 17:27:29
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
15 posts
Joined: March 2020
Offline
mestela
Some good tutorals on this from Konstantin Magnus and Entagma:

https://www.youtube.com/watch?v=Ri2dZ1st4E8&ab_channel=KonstantinMagnus [www.youtube.com]

https://www.youtube.com/watch?v=uN8Kxxvpkzc&ab_channel=Entagma [www.youtube.com]

HAHA MAN!! your great!! if only i would have post a little before I would have been done yesterday, you got the exact tutorials i found just less then an hour ago!!
and precisely what I was needing for, really thank you so much to take the time!
User Avatar
Member
15 posts
Joined: March 2020
Offline
tamte
you can also use Polyreduce SOP to reduce based on attribute to get map controlled density of the mesh
thank you for the help
User Avatar
Member
142 posts
Joined: Aug. 2009
Offline
@hidalgo884
check this vex
void grid(int dim;vector p,color){
    vector pos,uv;
    int pt,prim;
    for (int i;i<dim*dim;i++){
        pos = set(i%dim,i/dim)/(dim-1);
        uv = pos;
        pos += p;
        pt = addpoint(0,pos);
        if(uv.x<1 && uv.y<1)
        prim = addprim(0,"poly",array(pt,pt+dim,pt+dim+1,pt+1));
        setprimattrib (0,"Cd",prim,color);
        }
        
  }   
  
int  main_dim = 10;
int dim;


int n = pow (main_dim,2);
vector p,uv;
float mask;
for(int i;i<n;i++){
    p = set(i%main_dim,i/main_dim);
    uv = p/(main_dim-1);
    mask = noise(uv*20.0+@Time);
    dim=int(20 *mask);+2;
    grid(dim,p,1);
    }

i@dim = 1000*@area + 2;
int n = pow(@dim,2);
int pt;

vector uv,pos;
for ( int i ;i < n;i++){
    uv = set(i%i@dim,i/i@dim,0)/(i@dim-1);
    pos = primuv(0,"P",@primnum,uv);
    pt = addpoint(0,pos);
    if(uv.x<1 && uv.y<1)
        addprim(0,"poly",array(pt,pt+@dim,pt+@dim+1,pt+1));
        }

        removeprim(0,@primnum,1);

first detail
second its --take test geometry _ measure node and wrangle prim
Have FUn

Attachments:
fhhh.jpg (277.2 KB)
sfsf.jpg (199.3 KB)

  • Quick Links