[Solved] UDIMs concatenation error in USD Reference
6482 9 1- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
Hi,
I was studying Solaris workshop, and I downloaded the assets from the documentation’s link
In my original Houdini file, I can see and render the UDIM files in LOPs,
but it does not appear when i load the USD reference file back
i tried jeff Wagner expression “from his workshop”:
$HIP/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_%(UDIM)d_BaseColor.png
it does not appear when i load the USD reference file back.
i tried the documentation expression https://www.sidefx.com/docs/houdini/solaris/tutorial_1.html#matlib [www.sidefx.com]
$HIP/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png
also it does not appear.
the only way makes it work, is to map the UDIM number itself “ 1001 ”
$HIP/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_1001_BaseColor.png
then it will show up in the USD reference file, but definitely it will not read the other UDIM files.
I hope you can help me find the solution
Regards,
Hazem
I was studying Solaris workshop, and I downloaded the assets from the documentation’s link
In my original Houdini file, I can see and render the UDIM files in LOPs,
but it does not appear when i load the USD reference file back
i tried jeff Wagner expression “from his workshop”:
$HIP/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_%(UDIM)d_BaseColor.png
it does not appear when i load the USD reference file back.
i tried the documentation expression https://www.sidefx.com/docs/houdini/solaris/tutorial_1.html#matlib [www.sidefx.com]
$HIP/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_<UDIM>_BaseColor.png
also it does not appear.
the only way makes it work, is to map the UDIM number itself “ 1001 ”
$HIP/Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_1001_BaseColor.png
then it will show up in the USD reference file, but definitely it will not read the other UDIM files.
I hope you can help me find the solution
Regards,
Hazem
Edited by Hazem Elshawaf - Sept. 12, 2020 12:34:16
- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
here is the material USD which show gray shader
#usda 1.0 ( metersPerUnit = 1 upAxis = "Y" ) def Scope "materials" { def Material "Barrel" { token outputs:karma:displacement.connect = </materials/Barrel/Barrel1_displace.outputs:displacement> token outputs:karma:surface.connect = </materials/Barrel/Barrel1_surface.outputs:surface> token outputs:surface.connect = </materials/Barrel/Barrel1_preview.outputs:surface> def Shader "Barrel1_surface" { uniform token info:implementationSource = "sourceAsset" uniform asset info:sourceAsset = @opdef:/Vop/principledshader::2.0?SurfaceVexCode@ vector3f inputs:basecolor = (1, 1, 1) asset inputs:basecolor_texture = "../Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_%(UDIM)d_BaseColor.png" int inputs:basecolor_useTexture = 1 float inputs:metallic = 1 float inputs:rough = 1 token outputs:surface } def Shader "Barrel1_displace" { uniform token info:implementationSource = "sourceAsset" uniform asset info:sourceAsset = @opdef:/Vop/principledshader::2.0?DisplacementVexCode@ token outputs:displacement } def Shader "Barrel1_preview" { uniform token info:id = "UsdPreviewSurface" float inputs:clearcoatRoughness = 0 color3f inputs:diffuseColor = (1, 1, 1) color3f inputs:diffuseColor.connect = </materials/Barrel/Barrel1_preview_texture_diffuseColor.outputs:rgb> float inputs:metallic = 1 float inputs:opacity.connect = </materials/Barrel/Barrel1_preview_texture_diffuseColor.outputs:a> float inputs:roughness = 1 color3f inputs:specularColor = (1, 1, 1) token outputs:surface } def Shader "Barrel1_preview_uv" { uniform token info:id = "UsdPrimvarReader_float2" float2 inputs:fallback = (0, 0) token inputs:varname = "st" float2 outputs:result } def Shader "Barrel1_preview_texture_diffuseColor" { uniform token info:id = "UsdUVTexture" asset inputs:file = @../Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_1001_BaseColor.png@ float4 inputs:scale = (1, 1, 1, 1) float2 inputs:st.connect = </materials/Barrel/Barrel1_preview_uv.outputs:result> token inputs:wrapS = "repeat" token inputs:wrapT = "repeat" float outputs:a color3f outputs:rgb } } }
- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
here when i even try to change it in the material usd to hard coded it to UDIM number 1001 directly
immediately the USD Reference file can read UDIM 1001
immediately the USD Reference file can read UDIM 1001
#usda 1.0 ( metersPerUnit = 1 upAxis = "Y" ) def Scope "materials" { def Material "Barrel" { token outputs:karma:displacement.connect = </materials/Barrel/Barrel1_displace.outputs:displacement> token outputs:karma:surface.connect = </materials/Barrel/Barrel1_surface.outputs:surface> token outputs:surface.connect = </materials/Barrel/Barrel1_preview.outputs:surface> def Shader "Barrel1_surface" { uniform token info:implementationSource = "sourceAsset" uniform asset info:sourceAsset = @opdef:/Vop/principledshader::2.0?SurfaceVexCode@ vector3f inputs:basecolor = (1, 1, 1) asset inputs:basecolor_texture = "../Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_1001_BaseColor.png" int inputs:basecolor_useTexture = 1 float inputs:metallic = 1 float inputs:rough = 1 token outputs:surface } def Shader "Barrel1_displace" { uniform token info:implementationSource = "sourceAsset" uniform asset info:sourceAsset = @opdef:/Vop/principledshader::2.0?DisplacementVexCode@ token outputs:displacement } def Shader "Barrel1_preview" { uniform token info:id = "UsdPreviewSurface" float inputs:clearcoatRoughness = 0 color3f inputs:diffuseColor = (1, 1, 1) color3f inputs:diffuseColor.connect = </materials/Barrel/Barrel1_preview_texture_diffuseColor.outputs:rgb> float inputs:metallic = 1 float inputs:opacity.connect = </materials/Barrel/Barrel1_preview_texture_diffuseColor.outputs:a> float inputs:roughness = 1 color3f inputs:specularColor = (1, 1, 1) token outputs:surface } def Shader "Barrel1_preview_uv" { uniform token info:id = "UsdPrimvarReader_float2" float2 inputs:fallback = (0, 0) token inputs:varname = "st" float2 outputs:result } def Shader "Barrel1_preview_texture_diffuseColor" { uniform token info:id = "UsdUVTexture" asset inputs:file = @../Textures/repacked_BarrelWithLid/repacked_BarrelWithLid_UV_1001_BaseColor.png@ float4 inputs:scale = (1, 1, 1, 1) float2 inputs:st.connect = </materials/Barrel/Barrel1_preview_uv.outputs:result> token inputs:wrapS = "repeat" token inputs:wrapT = "repeat" float outputs:a color3f outputs:rgb } } }
- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
ok … i found the issue
by default .. the USD ROP has an option in the output processing … called use relative path
this option makes the material USD file look like this
which makes the USD reference file render like this
but when i remove the option of “use relative path” the material USD file uses the full path of the textures
and the render read the UDIM normally
by default .. the USD ROP has an option in the output processing … called use relative path
this option makes the material USD file look like this
which makes the USD reference file render like this
but when i remove the option of “use relative path” the material USD file uses the full path of the textures
and the render read the UDIM normally
- jsmack
- Member
- 8037 posts
- Joined: Sept. 2011
- Offline
- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
i think what is happening with me is … if the path is relative path, the UDIM concatenation it can not be resolved … thats why when i write one patch number manually “like 1001” .. it can read the file “while its relative” and render it normally.
or .. if i make the path as absolute path, then the UDIM concatenation will work normally
or .. if i make the path as absolute path, then the UDIM concatenation will work normally
- mtucker
- Staff
- 4521 posts
- Joined: July 2005
- Offline
- Hazem Elshawaf
- Member
- 10 posts
- Joined: Aug. 2013
- Offline
mtucker
Oh, sorry, there was an accidental backport of a change from the next Houdini version back to Houdini 18… Thanks for pointing this out. I'll fix this in the next couple of days (18.0.580 or 18.0.581).
Great news .. thanks
i will be waiting for this update.
until then, i will be working with absolute path to keep learning Solaris.
i truly appreciate your efforts
Regards,
Hazem
-
- Quick Links