meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
pg_extend_trunk_texture [2023/04/03 18:19] steph.jorgensenpg_extend_trunk_texture [2023/04/03 18:19] (current) steph.jorgensen
Line 8: Line 8:
 In order to use a 3d scan, you must first import the mesh as a [[kcmeshes|mesh asset]]. Next, create a [[toolmaterialsassetsbar|material asset]] that uses the textures associated with the scan.  Be sure to associate the mesh asset with the material. In order to use a 3d scan, you must first import the mesh as a [[kcmeshes|mesh asset]]. Next, create a [[toolmaterialsassetsbar|material asset]] that uses the textures associated with the scan.  Be sure to associate the mesh asset with the material.
  
-{{ ::pg_asset_setup.jpg |}}+{{pg_asset_setup.jpg}}
  
 Meshes must be a single model that can have a single material on it.  Photogrammetry meshes are typically saved as single meshes with unwrapped UV data that correspond to a texture atlas. Meshes must be a single model that can have a single material on it.  Photogrammetry meshes are typically saved as single meshes with unwrapped UV data that correspond to a texture atlas.
Line 15: Line 15:
 Once you have assets in place you'll use a [[mesh_generator|Mesh generator]] to make it part of your model.  Add a Mesh generator and then assign the material asset to it as pictured below.  It will automatically pick up the mesh asset via its association with the material asset. Once you have assets in place you'll use a [[mesh_generator|Mesh generator]] to make it part of your model.  Add a Mesh generator and then assign the material asset to it as pictured below.  It will automatically pick up the mesh asset via its association with the material asset.
  
-{{ ::pg_mesh_generator.jpg?nolink |}}+{{pg_mesh_generator.jpg?nolink}}
  
 >**Note:** You can move or rotate a mesh manually by switching to node editing mode, clicking on the mesh in the scene, and using the gizmo to transform the mesh. >**Note:** You can move or rotate a mesh manually by switching to node editing mode, clicking on the mesh in the scene, and using the gizmo to transform the mesh.
Line 23: Line 23:
 You should see a [[stitch_generator|Stitch generator]] and a [[branch_generator|Branch generator]] added to the trunk as pictured below. You should see a [[stitch_generator|Stitch generator]] and a [[branch_generator|Branch generator]] added to the trunk as pictured below.
  
-{{ ::pg_stitch_texture.jpg?nolink |}}+{{pg_stitch_texture.jpg?nolink}}
  
 =====Choose a good material for the child===== =====Choose a good material for the child=====
Line 31: Line 31:
 The Stitch will be placed near the center of the mesh.  It may be in a valid location but probably isn't. Switch to node editing mode, select either the stitch ring (if it's not valid) or the stitch geometry (if it is valid) and move the Stitch to the desired location.  It should be placed near the end but not all the way to the end of the trunk as pictured below. The Stitch will be placed near the center of the mesh.  It may be in a valid location but probably isn't. Switch to node editing mode, select either the stitch ring (if it's not valid) or the stitch geometry (if it is valid) and move the Stitch to the desired location.  It should be placed near the end but not all the way to the end of the trunk as pictured below.
  
-{{ ::pg_move_stitch.gif |}}+{{pg_move_stitch.gif}}
  
 You must leave enough trunk geometry beyond the stitch location to be used in the blending process.  The height of the blend region can be controlled in the "Blend" property group on the Stitch generator.  Taller stitches require more trunk geometry beyond the stitch. You must leave enough trunk geometry beyond the stitch location to be used in the blending process.  The height of the blend region can be controlled in the "Blend" property group on the Stitch generator.  Taller stitches require more trunk geometry beyond the stitch.
Line 40: Line 40:
 Now that you have the Stitch where you'd like it, it's time to make the blend region as seamless as possible.  Use the properties in the "Band" group of the "Stitch" generator to control the geometry of the band.  Use the properties in the "Blend" group to control how the textures from the parent and child will be blended together.  When the "Stitch" is selected and in a valid location, you will see a preview of the texture at the bottom of the Tree Window. Now that you have the Stitch where you'd like it, it's time to make the blend region as seamless as possible.  Use the properties in the "Band" group of the "Stitch" generator to control the geometry of the band.  Use the properties in the "Blend" group to control how the textures from the parent and child will be blended together.  When the "Stitch" is selected and in a valid location, you will see a preview of the texture at the bottom of the Tree Window.
  
-{{ ::pg_edit_stitch.gif |}}+{{pg_edit_stitch.gif}}
  
 There will typically be a little bit of back and forth between blend settings, child positioning, child radius editing, and stitch positioning to get the stitch just right. There will typically be a little bit of back and forth between blend settings, child positioning, child radius editing, and stitch positioning to get the stitch just right.
Line 47: Line 47:
 Now that the stitch is valid and the texture preview is satisfactory, it's time to generate the texture maps for the band region.  Select "Band:Generate Textures..." option.  A series of maps that match the preview will be generated.  Use these maps to make a new material on the Material Asset Bar.  Apply that material to the band ("Band:Material") and the band region should seamlessly blend the mesh and the branch. Now that the stitch is valid and the texture preview is satisfactory, it's time to generate the texture maps for the band region.  Select "Band:Generate Textures..." option.  A series of maps that match the preview will be generated.  Use these maps to make a new material on the Material Asset Bar.  Apply that material to the band ("Band:Material") and the band region should seamlessly blend the mesh and the branch.
  
-{{ ::pg_stitch_blend.jpg |}}+{{pg_stitch_blend.jpg}}
  
 >**Note:** If you change anything about the mesh, the branch, or the blend you'll need to export a new set of maps. If a material has already been made from the maps, it will update automatically. >**Note:** If you change anything about the mesh, the branch, or the blend you'll need to export a new set of maps. If a material has already been made from the maps, it will update automatically.
Line 54: Line 54:
 Use traditional SpeedTree techniques to add a procedural branch structure and leaf canopy to the model.  Start by adding child branches to the blended branch and go from there.  Pictured below are a completed model and the corresponding generator hierarchy. Use traditional SpeedTree techniques to add a procedural branch structure and leaf canopy to the model.  Start by adding child branches to the blended branch and go from there.  Pictured below are a completed model and the corresponding generator hierarchy.
  
-{{ ::pg_stitch_blend_full.jpg |}}+{{pg_stitch_blend_full.jpg}}
  
 >**Note:**  It's often a good idea to add a few twigs or other decorations to the photogrammetry mesh using [[target_generator|Targets]] to further blend it in with the procedural geometry.  >**Note:**  It's often a good idea to add a few twigs or other decorations to the photogrammetry mesh using [[target_generator|Targets]] to further blend it in with the procedural geometry.