mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
add test scene for facevarying vertex attribute.
This commit is contained in:
102
models/uv-tex-facevarying.usda
Normal file
102
models/uv-tex-facevarying.usda
Normal file
@@ -0,0 +1,102 @@
|
||||
#usda 1.0
|
||||
(
|
||||
defaultPrim = "root"
|
||||
doc = "Blender v4.1.0"
|
||||
metersPerUnit = 1
|
||||
upAxis = "Z"
|
||||
)
|
||||
|
||||
def Xform "root" (
|
||||
customData = {
|
||||
dictionary Blender = {
|
||||
bool generated = 1
|
||||
}
|
||||
}
|
||||
)
|
||||
{
|
||||
def Xform "Camera"
|
||||
{
|
||||
matrix4d xformOp:transform = ( (0.6859206557273865, 0.7276763319969177, 0, 0), (-0.32401347160339355, 0.305420845746994, 0.8953956365585327, 0), (0.6515582203865051, -0.6141703724861145, 0.44527140259742737, 0), (7.358891487121582, -6.925790786743164, 4.958309173583984, 1) )
|
||||
uniform token[] xformOpOrder = ["xformOp:transform"]
|
||||
|
||||
def Camera "Camera"
|
||||
{
|
||||
float2 clippingRange = (0.1, 100)
|
||||
float focalLength = 0.5
|
||||
float horizontalAperture = 0.36
|
||||
float horizontalApertureOffset = 0
|
||||
token projection = "perspective"
|
||||
float verticalAperture = 0.2025
|
||||
float verticalApertureOffset = 0
|
||||
}
|
||||
}
|
||||
|
||||
def Xform "Grid"
|
||||
{
|
||||
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )
|
||||
uniform token[] xformOpOrder = ["xformOp:transform"]
|
||||
|
||||
def Mesh "Grid" (
|
||||
prepend apiSchemas = ["MaterialBindingAPI"]
|
||||
)
|
||||
{
|
||||
uniform bool doubleSided = 1
|
||||
float3[] extent = [(-1, -1, 0), (1, 1, 0)]
|
||||
int[] faceVertexCounts = [4, 4]
|
||||
int[] faceVertexIndices = [0, 1, 3, 2, 2, 3, 5, 4]
|
||||
rel material:binding = </root/_materials/Material_001>
|
||||
normal3f[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1)] (
|
||||
interpolation = "faceVarying"
|
||||
)
|
||||
point3f[] points = [(-1, -1, 0), (1, -1, 0), (-1, 0, 0), (1, 0, 0), (-1, 1, 0), (1, 1, 0)]
|
||||
bool[] primvars:sharp_face = [1, 1] (
|
||||
interpolation = "uniform"
|
||||
)
|
||||
texCoord2f[] primvars:UVMap = [(0, 0), (1, 0), (1, 0.5), (0, 0.5), (0, 0.5), (1, 0.5), (1, 1), (0, 1)] (
|
||||
interpolation = "faceVarying"
|
||||
)
|
||||
uniform token subdivisionScheme = "none"
|
||||
}
|
||||
}
|
||||
|
||||
def Scope "_materials"
|
||||
{
|
||||
def Material "Material_001"
|
||||
{
|
||||
token outputs:surface.connect = </root/_materials/Material_001/Principled_BSDF.outputs:surface>
|
||||
|
||||
def Shader "Principled_BSDF"
|
||||
{
|
||||
uniform token info:id = "UsdPreviewSurface"
|
||||
float inputs:clearcoat = 0
|
||||
float inputs:clearcoatRoughness = 0.03
|
||||
color3f inputs:diffuseColor.connect = </root/_materials/Material_001/Image_Texture.outputs:rgb>
|
||||
float inputs:ior = 1.5
|
||||
float inputs:metallic = 0
|
||||
float inputs:opacity = 1
|
||||
float inputs:roughness = 0.5
|
||||
float inputs:specular = 0.5
|
||||
token outputs:surface
|
||||
}
|
||||
|
||||
def Shader "Image_Texture"
|
||||
{
|
||||
uniform token info:id = "UsdUVTexture"
|
||||
asset inputs:file = @./textures/texture-cat.jpg@
|
||||
token inputs:sourceColorSpace = "sRGB"
|
||||
float2 inputs:st.connect = </root/_materials/Material_001/uvmap.outputs:result>
|
||||
token inputs:wrapS = "repeat"
|
||||
token inputs:wrapT = "repeat"
|
||||
float3 outputs:rgb
|
||||
}
|
||||
|
||||
def Shader "uvmap"
|
||||
{
|
||||
uniform token info:id = "UsdPrimvarReader_float2"
|
||||
token inputs:varname = "UVMap"
|
||||
float2 outputs:result
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user