Hello,
I'm aware that you can bind procedural textures to meshes with the projection node linked to the projection input in a procedural texture. This kinda defeats the purpose though, as the seamless procedurals are now sampled in uv space and so that means seams. Is it possible to simply define a rest state on the points and have the procedural textures sample that ?
rest state for proceduaral textures
Moderator: juanjgon
Rest position is not implemented yet. Its planned for Octane 2022.xWoutTgh wrote:Hello,
I'm aware that you can bind procedural textures to meshes with the projection node linked to the projection input in a procedural texture. This kinda defeats the purpose though, as the seamless procedurals are now sampled in uv space and so that means seams. Is it possible to simply define a rest state on the points and have the procedural textures sample that ?
Win 10 64bit // GTX 4090 + GTX 3090 // 5900x // 64GB // SideFX Houdini // C4D
I see, would it be possible to do that with an projection OSL Shader ? I'm playing around with it but I can't seem to import a vertex attribute ( I would use a rest attribute to offset the sampled point)
Okay, some progress, I can import a uv projection with
point proj1 = point(u, v, 0)
but the w coordinate is ignored/doesn't exist ?
point proj1 = point(u, v, 0)
but the w coordinate is ignored/doesn't exist ?
Cool, I got it working !
Here the osl projection shader code:
shader projection
(
point proj1 = point(u, v, 0)
[[string label = "Projection1"]],
point proj2 = point(u, v, 0)
[[string label = "Projection2"]],
matrix test = 0,
output vector uvw = vector(0,0,0)
)
{
uvw[0]= proj1[0];
uvw[1]= proj1[1];
uvw[2]= proj2[0];
}
proj 1 is 1st uv set, where u = rest x and v = rest y
proj 2 is 2nd uv set where u = rest z
uvw[0]= proj1[0];
uvw[1]= proj1[1];
uvw[2]= proj2[0];
}
Here the osl projection shader code:
shader projection
(
point proj1 = point(u, v, 0)
[[string label = "Projection1"]],
point proj2 = point(u, v, 0)
[[string label = "Projection2"]],
matrix test = 0,
output vector uvw = vector(0,0,0)
)
{
uvw[0]= proj1[0];
uvw[1]= proj1[1];
uvw[2]= proj2[0];
}
proj 1 is 1st uv set, where u = rest x and v = rest y
proj 2 is 2nd uv set where u = rest z
uvw[0]= proj1[0];
uvw[1]= proj1[1];
uvw[2]= proj2[0];
}
Weird, is gives nice results on diffuse textures, procedural sticking to the surface and all that, but when used in a bump map, the intensity of the bump map is much higher along the z axis.. hmmmmmmm
hey ! you're very welcome, glad you found it helpful :pjamnique wrote:Huge thank you for sharing @WoutTgh!Just what I was looking for
Ello !rifat wrote:Hi and thanks WoutTgh,
Would anyone share a file or show me how to use the OSL in houdini octane 2022 please?
or did Octane already come up with solution to use @rest for triplanar
Thank you!
Off the top of my head: add an OSL shader ( for uv/mapping/projection ), paste the code, link the output to the projection input of for example a procedural shader.