Sync edges after bakeTransformIntoVertices

Hey guys. Can you tell me how to update edge-lines (added with enableEdgesRendering) positions after applying bakeTransformIntoVertices for the mesh? Thank you

Hi A. You can simply re- .enableEdgesRendering(); on the transformed mesh. line 26

Sort of a bad fix, though. We MIGHT want to think about a mod/PR for the two mesh.ts “bake” methods… so that edgesRendering is updated automatically after bakes.

We should probably check highlightLayer, glowLayer, VLS, and lensFlare… to make sure THEY survive bakings, too. (I think those will be fine, as they are different than edgesRendering). Feel free to test them, Avin, and report findings. :wink:

For now, you have a temp fix/updater, and we’ll listen for experts’ comments about modifying .bake methods (wise/not), and the best way to code the changes.

Nice find, Avin. Interesting… worthy of some thought/attention.

Wingy bumps. :slight_smile: This might be the time to look at THIS issue, because the guys are doing OTHER WORK at the mesh bakery, too. Maybe we can kill 2 bugs/anomalies… with one can of bug spray.

Hey @Drigax … any chance we could piggy-back another mod onto your PR? :wink: (pending @Deltakosh approvals, of course.) @drm … this might pertain to you, too, cuz you said “remove all edges” in that other thread, and that is the secret code-phrase for THIS thread. :smiley:


@Wingnut Agreed. Simply disableEdgesRendering() before the bake and enableEdgesRendering() after the bake workes for me


Got a confirm on the repro:

Thanks for the scene @Wingnut :slight_smile:

I’ll take some time to look at the edges renderer implementation. This definitely needs to be addressed!

Currently in the other thread, we’re resetting our mesh transform, but not updating our child transforms to include the offset. If edges renderer is implemented as a child mesh of the base mesh, then that fix should cover both. Otherwise I may want to look into an alternative. Maybe something event driven that anything interested in mesh geometry can hook into to update whenever that changes?

1 Like

Unfortunately, looks like my fix doesn’t quite address the edges rendering issue, just child meshes. I’ll have to take a closer look at this later today or tomorrow, after I address another issue :slight_smile:


As an update, I didn’t forget about this issue, I’m still preoccupied currently with some urgent deadlines!

Thanks for your patience.

1 Like