Geometry vertex and triangle AOVs
Posted: Sat Mar 21, 2020 4:14 pm
Introduction
The initial discussion about storing arbitrary custom data associated mesh vertices and triangles started here: viewtopic.php?f=4&t=1884
Vertex and Triangle AOVs
LuxCore now supports up to 8 custom float values associated to each mesh vertex. It also supports up to 8 custom float values associated to each mesh triangle. They are totally arbitrary data that can be used by textures (see below) or more.
New "hitpointvertexaov" and "hitpointtriangleaov" textures
The new "hitpointvertexaov" and "hitpointtriangleaov" textures can be used for shading purpouse, like "hitpointcolor", "hitpointalpha" and "hitpointgrey":
"makefloat3" texture
"makefloat3" texture can be used to join 3 AOV channels in a color if you need to transport a RGB value instead of a scalar values.
"random" texture
"random" is a new texture node that can used to randomize AOV values, for instance:
The ".seed" parameter is added to the input value coming from the texture (in this case is used to get a random RGB color out of a single AOV value).
"makefloat3" texture can be used to join 3 AOV channels in a color if you need to transport a RGB value instead of a scalar values.
Shape "pointiness"
Shape Pointiness has been update to support vertex AOVs and to, optionally, store there the curvature information (instead of using the alpha channel):
If the ".aovindex" is not used or the value 4294967296 (2^32) is used, the curvature information will be stored in vertex alpha channel for compatibility with the past.
New shape "islandaov"
The new shape "islandaov" assigns, to a triangle AOV, the index of the "island", for instance:
Assign island information to the hair mesh coming from a strand file.
New shape "randomtriangleaov"
The new shape "randomtriangleaov" can add/replace the triangle AOV with a randomized value, for instance:
This is a faster solution than using "random" texture because the value is baked at pre-processing stage.
New LuxCore API SetMeshVertexAOV() and SetMeshTriangleAOV()
LuxCore API has been extended with new Scene::SetMeshVertexAOV() and Scene::SetMeshTriangleAOV() to set the values from an application.
The initial discussion about storing arbitrary custom data associated mesh vertices and triangles started here: viewtopic.php?f=4&t=1884
Vertex and Triangle AOVs
LuxCore now supports up to 8 custom float values associated to each mesh vertex. It also supports up to 8 custom float values associated to each mesh triangle. They are totally arbitrary data that can be used by textures (see below) or more.
New "hitpointvertexaov" and "hitpointtriangleaov" textures
The new "hitpointvertexaov" and "hitpointtriangleaov" textures can be used for shading purpouse, like "hitpointcolor", "hitpointalpha" and "hitpointgrey":
Code: Select all
scene.textures.curvature_orig.type = hitpointvertexaov
scene.textures.curvature_orig.dataindex = 0
"makefloat3" texture can be used to join 3 AOV channels in a color if you need to transport a RGB value instead of a scalar values.
"random" texture
"random" is a new texture node that can used to randomize AOV values, for instance:
Code: Select all
scene.textures.aovtex.type = hitpointtriangleaov
scene.textures.aovtex.dataindex = 0
##
scene.textures.randomtexR.type = random
scene.textures.randomtexR.texture = aovtex
scene.textures.randomtexR.seed = 0
##
scene.textures.randomtexG.type = random
scene.textures.randomtexG.texture = aovtex
scene.textures.randomtexG.seed = 1
##
scene.textures.randomtexB.type = random
scene.textures.randomtexB.texture = aovtex
scene.textures.randomtexB.seed = 2
##
scene.textures.randomtex.type = makefloat3
scene.textures.randomtex.texture1 = randomtexR
scene.textures.randomtex.texture2 = randomtexG
scene.textures.randomtex.texture3 = randomtexB
"makefloat3" texture can be used to join 3 AOV channels in a color if you need to transport a RGB value instead of a scalar values.
Shape "pointiness"
Shape Pointiness has been update to support vertex AOVs and to, optionally, store there the curvature information (instead of using the alpha channel):
Code: Select all
scene.shapes.luxshell.type = pointiness
scene.shapes.luxshell.aovindex = 0
New shape "islandaov"
The new shape "islandaov" assigns, to a triangle AOV, the index of the "island", for instance:
Code: Select all
scene.shapes.hair_shape.type = strands
scene.shapes.hair_shape.file = scenes/strands/straight.hair
scene.shapes.hair_shape.tessellation.type = solidadaptive
scene.shapes.hair_shape.tessellation.solid.sidecount = 8
scene.shapes.hair_shape.tessellation.adaptive.maxdepth = 32
scene.shapes.hair_shape.tessellation.adaptive.error = 0.025
##
scene.shapes.hair_shape_aov.type = islandaov
scene.shapes.hair_shape_aov.source = hair_shape
scene.shapes.hair_shape_aov.dataindex = 0
New shape "randomtriangleaov"
The new shape "randomtriangleaov" can add/replace the triangle AOV with a randomized value, for instance:
Code: Select all
scene.shapes.hair_shape.type = strands
scene.shapes.hair_shape.file = scenes/strands/straight.hair
scene.shapes.hair_shape.tessellation.type = solidadaptive
scene.shapes.hair_shape.tessellation.solid.sidecount = 8
scene.shapes.hair_shape.tessellation.adaptive.maxdepth = 32
scene.shapes.hair_shape.tessellation.adaptive.error = 0.025
##
scene.shapes.hair_shape_aov.type = islandaov
scene.shapes.hair_shape_aov.source = hair_shape
scene.shapes.hair_shape_aov.dataindex = 0
##
scene.shapes.hair_shape_raov.type = randomtriangleaov
scene.shapes.hair_shape_raov.source = hair_shape_aov
scene.shapes.hair_shape_raov.srcdataindex = 0
scene.shapes.hair_shape_raov.dstdataindex = 0
New LuxCore API SetMeshVertexAOV() and SetMeshTriangleAOV()
LuxCore API has been extended with new Scene::SetMeshVertexAOV() and Scene::SetMeshTriangleAOV() to set the values from an application.