rest state for proceduaral textures

Forums: rest state for proceduaral textures
Houdini Integrated Plugin

Moderator: juanjgon

rest state for proceduaral textures

Postby WoutTgh » Sun May 22, 2022 3:45 pm

WoutTgh Sun May 22, 2022 3:45 pm
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 ?
WoutTgh
Licensed Customer
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: rest state for proceduaral textures

Postby galleon27 » Sun May 22, 2022 4:09 pm

galleon27 Sun May 22, 2022 4:09 pm
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
User avatar
galleon27
Licensed Customer
Licensed Customer
 
Posts: 240
Joined: Wed Jul 15, 2015 11:55 am
Location: Serbia

Re: rest state for proceduaral textures

Postby WoutTgh » Sun May 22, 2022 4:19 pm

WoutTgh Sun May 22, 2022 4:19 pm
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
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: rest state for proceduaral textures

Postby WoutTgh » Sun May 22, 2022 4:32 pm

WoutTgh Sun May 22, 2022 4:32 pm
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
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: rest state for proceduaral textures

Postby WoutTgh » Sun May 22, 2022 4:43 pm

WoutTgh Sun May 22, 2022 4:43 pm
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
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: rest state for proceduaral textures

Postby WoutTgh » Sun May 22, 2022 5:07 pm

WoutTgh Sun May 22, 2022 5:07 pm
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
WoutTgh
Licensed Customer
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: rest state for proceduaral textures

Postby jamnique » Sun Jul 24, 2022 6:21 pm

jamnique Sun Jul 24, 2022 6:21 pm
Huge thank you for sharing @WoutTgh! :) Just what I was looking for
Intel Core2Quad 9200 / 4 GB OCZ / Gainward 460 2GB
User avatar
jamnique
Licensed Customer
Licensed Customer
 
Posts: 227
Joined: Tue Jan 12, 2010 9:47 am
Location: Warsaw, Poland

Re: rest state for proceduaral textures

Postby WoutTgh » Sun Jul 24, 2022 6:26 pm

WoutTgh Sun Jul 24, 2022 6:26 pm
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
WoutTgh
Licensed Customer
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm

Re: rest state for proceduaral textures

Postby rifat » Thu Mar 16, 2023 1:40 am

rifat Thu Mar 16, 2023 1:40 am
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!
rifat
Licensed Customer
Licensed Customer
 
Posts: 53
Joined: Sat Nov 28, 2015 9:06 am
Location: Melbourne

Re: rest state for proceduaral textures

Postby WoutTgh » Thu Mar 16, 2023 5:26 pm

WoutTgh Thu Mar 16, 2023 5:26 pm
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.
WoutTgh
Licensed Customer
Licensed Customer
 
Posts: 182
Joined: Sat Jul 27, 2019 8:39 pm
Next

Return to Houdini


Who is online

Users browsing this forum: No registered users and 12 guests

Tue Apr 23, 2024 9:44 am [ UTC ]