rest state for proceduaral textures

Houdini Integrated Plugin

Moderator: juanjgon

WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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 ?
User avatar
galleon27
Licensed Customer
Posts: 292
Joined: Wed Jul 15, 2015 11:55 am
Location: Serbia
Contact:

WoutTgh 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 ?
Rest position is not implemented yet. Its planned for Octane 2022.x
Win 10 64bit // GTX 4090 + GTX 3090 // 5900x // 64GB // SideFX Houdini // C4D
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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)
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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 ?
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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];
}
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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
User avatar
jamnique
Licensed Customer
Posts: 227
Joined: Tue Jan 12, 2010 9:47 am
Location: Warsaw, Poland

Huge thank you for sharing @WoutTgh! :) Just what I was looking for
Intel Core2Quad 9200 / 4 GB OCZ / Gainward 460 2GB
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

jamnique wrote:Huge thank you for sharing @WoutTgh! :) Just what I was looking for
hey ! you're very welcome, glad you found it helpful :p
rifat
Licensed Customer
Posts: 63
Joined: Sat Nov 28, 2015 9:06 am
Location: Melbourne

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!
WoutTgh
Licensed Customer
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Contact:

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!
Ello !
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.
Post Reply

Return to “Houdini”