Jump to content
konstantin magnus

Weathering texture tool

Recommended Posts

Currently working on a from-scratch texturing procedure that simulates water running down surfaces.

dripping_curves.thumb.jpg.f8c17fb819634c57245018fe80c392d6.jpg
Models shamelessly taken from @animatrix course files.
Starting with projected points, the curves run along a volume until they drop onto the next underlying surfaces using nested while loops.
The watery effect is achieved in COPs where the texture is drawn based on measuring distance from texture positions to these curves.

Alright, enough art, here comes the proof of dripping ^_^ :

dripping_curves_drop_off.thumb.jpg.9a3de6eedc51a6a9dae35338c314fedd.jpg

Edited by konstantin magnus
  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites

Super cool Konstantin! I love seeing this kind of very unique and original ideas. Would be a great tutorial :)

I can imagine a dozen uses just off top of my head!

  • Like 1

Share this post


Link to post
Share on other sites

A minimalist generator for creating occlusion textures right in COPs.

occlusion_texture.thumb.jpg.7fbd186bd8da18621057c64c88fc4a51.jpg

// INPUT
vector pos_tex = set(X, Y, 0.0);
vector pos_mesh = uvsample(geo_mesh, 'P', 'uv', pos_tex);
vector nml_mesh = uvsample(geo_mesh, 'N', 'uv', pos_tex);

float a = radians(angle);

// OCCLUSION
float occ_sum = 0.0;
for(int i = 0; i < samples; i++){
    vector2 u = rand(pos_tex * i);
    vector dir = sample_direction_cone(nml_mesh, a, u);
    vector pos_ray = pos_mesh + nml_mesh * 1e-3;
    vector dir_ray = dir * range;
    vector pos_hit;
    vector uvw_hit;
    int prim_hit = intersect(geo_mesh, pos_ray, dir_ray, pos_hit, uvw_hit);
    occ_sum += prim_hit == -1;   
}
float occ = occ_sum / float(samples);

// OUTPUT
vector color = vector(occ);
assign(R, G, B, color);

 

texture_occlusion.hipnc

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

A texture generator for image based direct lighting.

texture_ibl.thumb.jpg.9f5ad7b3facff5556f0064b8314f49bd.jpg

This example is just using a tonemapped JPG. Though by appending ToneMap Ql the same procedure works with HDRIs, too. 

// INPUT
vector pos_tex = set(X, Y, 0.0);
vector pos_mesh = uvsample(geo_mesh, 'P', 'uv', pos_tex);
vector nml_mesh = uvsample(geo_mesh, 'N', 'uv', pos_tex);

float a = radians(angle);

// IMAGE BASED DIRECT LIGHTING

vector clr_sum = 0.0;
for(int i = 0; i < samples; i++){
    vector2 u = rand(pos_tex * i);
    vector dir = sample_direction_cone(nml_mesh, a, u);
    vector pos_ray = pos_mesh + nml_mesh * 1e-3;
    vector dir_ray = dir * range;
    vector pos_hit;
    vector uvw_hit;
    int prim_hit = intersect(geo_sky, pos_ray, dir_ray, pos_hit, uvw_hit);
    vector clr_hit = primuv(geo_sky, 'Cd', prim_hit, uvw_hit);
    clr_sum += clr_hit;   
}
vector clr = clr_sum / float(samples);

// OUTPUT
vector color = vector(clr);
assign(R, G, B, color);

 

texture_hdri.hipnc

  • Thanks 1

Share this post


Link to post
Share on other sites
On 18/09/2020 at 10:11 PM, konstantin magnus said:
 
⭐
 
On 18/09/2020 at 10:11 PM, konstantin magnus said:

Currently working on a from-scratch texturing procedure that simulates water running down surfaces.

dripping_curves.thumb.jpg.f8c17fb819634c57245018fe80c392d6.jpg
Models shamelessly taken from @animatrix course files.
Starting with projected points, the curves run along a volume until they drop onto the next underlying surfaces using nested while loops.
The watery effect is achieved in COPs where the texture is drawn based on measuring distance from texture positions to these curves.

Alright, enough art, here comes the proof of dripping ^_^ :

dripping_curves_drop_off.thumb.jpg.9a3de6eedc51a6a9dae35338c314fedd.jpg

You are not weathering it, you are making art Konstantin! :)

I haven't seen much example as obviously Subtance has more than enough but a very nice example of advanced weathing in Houdini which picked my interest few months ago was from Wiek Luijken, 

I especially like the rainstreak flow and the realistic procedural rivet placement, something which will make sense to do procedurally in Houdini without too much struggle hopefully. On my list on things to do.

 

 

 

 

 

Edited by vinyvince
  • Like 1

Share this post


Link to post
Share on other sites

:wub: Thank You for those beautiful Solutions and Tricks

  • Haha 1

Share this post


Link to post
Share on other sites

Here is the VEX version of the streaking texture procedure. It's pretty flexible now: Starting curves from uncovered areas to any angle, jumping over gaps, gradually changing target direction, measuring curve length for any point and of course texture mapping.

skel_streaks3.png.62b032acdc9bfa926592091298f60478.png
Model taken from threedscans.com

streaks_VEX_2.hipnc

Edited by konstantin magnus
  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×