Jump to content
konstantin magnus

Weathering texture tool

Recommended Posts

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

  • Like 1
  • 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

Oooh, pretty ! What's the render time on that ?

Share this post


Link to post
Share on other sites
1 hour ago, Wout said:

Oooh, pretty ! What's the render time on that ?

Thank you. Calculating the emission map takes just a few seconds. The actual render time is not really affected.

Share this post


Link to post
Share on other sites
Posted (edited)

Oh really, so you get these beautiful caustics for mere seconds, nice !! :)  I'll have to check out the scene file later :)

Edited by Wout

Share this post


Link to post
Share on other sites
On 03/03/2021 at 10:03 PM, konstantin magnus said:

A caustics map generator rendered out in Karma using intersect() and refract().

caustics_karma2.thumb.jpg.2338470365d94c30f26ebcec2545ceca.jpg

caustics_map.hiplc

Really love this Konstantin! What is the cuastics/piclc file you're using in LOPS to render it? Is that a file you're saving out of Houdini or is that something else? If I open the file and hit render, i don't get the same results. Just trying to figure out why. 

Share this post


Link to post
Share on other sites
On 17.9.2021 at 1:29 PM, PaulEsteves said:

What is the cuastics/piclc file you're using in LOPS to render it?

Hey Paul,

I had to save out the caustics texture map because Solaris did not update data live from COPs to LOPs. Set the gamma to 2.2 and save the image as a pic-file. 

image.png.887c235c2225deae43285f81b75fb436.png

After you have saved the image, just update the file path in stage/materiallibrary1/principledshader1 under "emission texture" and set the "tint intensity" to something like 4.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 16/10/2020 at 9:13 PM, konstantin magnus said:

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

 Im surprised the result looks accurate while there are lot's of overlapping UV , do you know guys if there is a way with autouvlayout to pack and avoid cross UDIM vertex? 

  Im  trying to establish better link with Substance and Houdini , trying to get the best of both worlds.  Basically, if I create and get some asset a look made in substance of a given procedural shader like an edge and scratch procedural wearing material recreat live the mesh dependency map directly in Houdini, without any export, baking in substance, importing back blablabla... 

When I link that AO and curvature with an external prebake EXR map it's work (after I have to fix a naming error in the Lab tools) but not when I try to "live" connect. Like shown above

The image plane doesn't seem to be recognized and taken into consideration in the SBSAR processing... Im totally bloked. Image plane are named correctly, single channel as expected by substance..

Ideally at the end, processing every asset with PDG. I haven't a post from you @konstantin magnus about PDG, are you not using it ?

Im joining my hip and test substance file I quickly created.. Maybe it's a limitation of substance archive? It can't only take baked, but I guess if so we should be able to trick it isn'it?

Has Anyone done PDG map baking for all element of a scene and don't mind sharing it by chance ?

Im joining my hip and test substance file I quickly created.. Maybe it's a limitation of substance archive? It can't only take baked, but I guess if so we should be able to trick it isn'it?

 

Many thanks guys!!:lol:

image.thumb.png.ec85068b432a739d76abd488f87c6128.png

image.thumb.png.8f972f8b728d8ae3bbbcea4276d80c45.pngimage.thumb.png.bdec7bfabcb63772ad093287f69b6104.png

image.thumb.png.94351cdd4f03fc5574f5b869966b59e3.png

 

pig_1_Ambient Occlusion Map from Mesh.png

pig_1_Curvature Map from Mesh.png

testhoudini2.sbsar

testhoudini3.sbsar

Substance_automation_vince.hip

Edited by vinyvince

Share this post


Link to post
Share on other sites

Her's my take. I quickly added few things to your setup, geting more color to our blessed duck.    i tried to fade the leaking .I have not found yet how to only fade the streaks not the all thing in case I want this but I like it :)

@konstantin magnusimage.thumb.png.9f19f3ba47347d7e320aa294b38d9ff6.png

________________________________________________________________

Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts

 http://fr.linkedin.com/in/vincentthomas

@konstantin magnus

 

image.png.8c0bdfed6b5c357511ec3f38239a3a23.png

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

×