Page 1 of 2
					
				rest state for proceduaral textures
				Posted: Sun May 22, 2022 3:45 pm
				by WoutTgh
				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 ?
			 
			
					
				Re: rest state for proceduaral textures
				Posted: Sun May 22, 2022 4:09 pm
				by galleon27
				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
 
			
					
				Re: rest state for proceduaral textures
				Posted: Sun May 22, 2022 4:19 pm
				by WoutTgh
				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)
			 
			
					
				Re: rest state for proceduaral textures
				Posted: Sun May 22, 2022 4:32 pm
				by WoutTgh
				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 ?
			 
			
					
				Re: rest state for proceduaral textures
				Posted: Sun May 22, 2022 4:43 pm
				by WoutTgh
				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];  
}
			 
			
					
				Re: rest state for proceduaral textures
				Posted: Sun May 22, 2022 5:07 pm
				by WoutTgh
				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
			 
			
					
				Re: rest state for proceduaral textures
				Posted: Sun Jul 24, 2022 6:21 pm
				by jamnique
				Huge thank you for sharing @WoutTgh! 

 Just what I was looking for
 
			
					
				Re: rest state for proceduaral textures
				Posted: Sun Jul 24, 2022 6:26 pm
				by WoutTgh
				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
 
			
					
				Re: rest state for proceduaral textures
				Posted: Thu Mar 16, 2023 1:40 am
				by rifat
				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!
			 
			
					
				Re: rest state for proceduaral textures
				Posted: Thu Mar 16, 2023 5:26 pm
				by WoutTgh
				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.