Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Allow to control Global Illumination settings in CreateMesh node of PathGenerator
#1
Currently, the "Create Mesh" node in the PathGenerator doesn't allow to control some of the MeshRenderer settings. Most notably, we would appreciate to have access to the "Contribute Global Illumination" and "Receive Global Illumination" settings. When baking our lightmaps, we don't want the path to cast dark spots onto the ground below.

Our current work-around is to manually disable the "Contribute Global Illumination" setting on the generated mesh. The problem is that every update to the PathGenerator re-enables that setting, so we often end up accidentally baking the path's AO and having to redo it again.

As a thought to make these "component generator" nodes more future-proof: could it be viable to, instead of manually replicating all settings of the component in the node, allow the user to drag in a component preset for that component? That way, we could just define a fitting preset for our MeshRenderer, for instance.

Thanks for the support, and please do let me know if you need any additional info!


Attached Files Thumbnail(s)
       
Reply
#2
Hi

Thanks for your preset suggestion, a really good one. I added it to the backlog. Will probably not be part of the next update, but I will consider it for the one after.

Now to solve your issue, I see two solutions:
  1. To add a script to your scene, that will listen to your module's OnRefresh event, and disable those mesh's options when the event is triggered.
  2. To modify the Create Mesh class (\Curvy\Base\CG Modules\CreateMesh.cs), and make it disable the options at every refresh. You would do that in GetNewMesh method.
The downside of method 1 is that you need to add that script to your scene.
The downside of method 2 is that you need to reapply the modification at each update of the asset.

Did this help?
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
Hi, and thanks for the quick reply!

Thank you for the suggestions - listening to the OnRefresh event sounds like a very viable workaround for now. We'll definitely give this a try.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to generate gameobject on the control point Yang Yi 1 6 Yesterday, 10:14 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 9 03-28-2024, 10:08 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_
  Collider doesn't get created by the CreateMesh Module pako88 5 11 12-26-2023, 11:13 AM
Last Post: _Aka_

Forum Jump: