Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating MaterialID in MetaCGOptions at Runtime
#4
Hi

You have to activate the Materials option in the Shape Extrusion module so that they are taken into consideration.
Since you were not aware of this, I am wondering if you did assign Material Ids in the shape used for extrusion.
Let me summerize to you what you need to do:
1- You add instances of type Meta CG Options to the control points of the spline used as a cross section for your extrusion . More about that here: https://curvyeditor.com/documentation/splines/curvysplinesegment#meta_cg_options
2- You activate the Materials option in the Shape Extrusion module
3- You associate each used Material Id with a material in the Volume Mesh module.

Did you manage to make it work?

You can find in the example scenes cases of mesh extrusions using multiple materials. One example is the 26_CGExtrusionExtendedUV.unity scene. Also the rails in all train scenes use two materials

You do that by setting the material Ids at the Control Point level using the Meta CG Options script.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
RE: Updating MaterialID in MetaCGOptions at Runtime - by _Aka_ - 06-15-2021, 09:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
Wink Modifying Splines at Runtime artsung 1 7 01-30-2024, 09:40 AM
Last Post: _Aka_
  Is it possible to create a road texture at runtime? artsung 1 4 01-30-2024, 09:30 AM
Last Post: _Aka_

Forum Jump: