EnviralDesign / GeoPix

GeoPix is a free and open source real-time lighting control and previz software. It's built in TouchDesigner, with a workflow and UI/UX inspired by 3d animation software.
http://www.geopix.io/
MIT License
312 stars 23 forks source link

Custom Fixture Editor becomes unusably slow for complex lights #62

Open Zedarius5 opened 1 year ago

Zedarius5 commented 1 year ago

Description I have a light bar that I'm recreating in the custom fixture editor. The editor is becoming unusably slow as I continue to add complexity. Currently it takes about 3-4 minutes to make any change.

To Reproduce I have 61 channels of data, and about ~40 pieces of geometry in the editor. It got linearly (possibly exponentially) slower as I continued to add more things. I used the duplicate feature quite a bit while building it.

I have uploaded my .json file as a .txt, since JSON uploads aren't permitted in this form. Happy to provide additional information.

Computer Specs

_JMAZ_5050.txt

mylesdebastion commented 1 year ago

How many triangles are your geometry meshes? Touchdesigner 3D render engine isn’t super optimized so you’re not going to get great performance with large object / triangle counts.

Geopix excels at complex pixel mapping, creative light patterns, real time interactivity and a simple show performance control UI.

If accurate and detailed pre-viz is your goal, Unreal Engine might be your better option since with Nanite & Lumen you will get real time ray tracing and support for high fidelity meshes without any optimization triangle count needed.

I have used Geopix and UE together quite successfully but building my pixel mapping and light patterns in GP and sending DMX Artnet into UE for the final pre-viz render. It sounds like this might be the better strategy if you want your light bars accurately depicted.

On Fri, Jul 14, 2023 at 8:22 PM Danny Olefsky @.***> wrote:

Description I have a light bar that I'm recreating in the custom fixture editor. The editor is becoming unusably slow as I continue to add complexity. Currently it takes about 3-4 minutes to make any change.

To Reproduce I have 61 channels of data, and about ~40 pieces of geometry in the editor. It got linearly (possibly exponentially) slower as I continued to add more things. I used the duplicate feature quite a bit while building it.

I have uploaded my .json file as a .txt, since JSON uploads aren't permitted in this form. Happy to provide additional information.

Computer Specs

  • Windows 11 Pro 64-bit (build 22621)
  • i7-8700k CPU
  • NVidia 3090

_JMAZ_5050.txt https://github.com/EnviralDesign/GeoPix/files/12060162/_JMAZ_5050.txt

— Reply to this email directly, view it on GitHub https://github.com/EnviralDesign/GeoPix/issues/62, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHVGUHDBZUI5D3APDERUWTXQIEHZANCNFSM6AAAAAA2LARKP4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Zedarius5 commented 1 year ago

Hey - accurate pre-viz isn't the goal. I'm just getting into lighting, have 3 of these light bars, and want to prototype driving them with video textures without having to have them set up in my small room.

I've been building the meshes inside the custom fixture editor, using cubes and spheres. How do I check my triangle count?

In the file I uploaded, I have:

That doesn't (to me?) seem like a lot of geometry. Swapping the spheres for cubes didn't alter the responsiveness much. Would intersecting geometry be a problem at all? Many of the objects are intersecting.

Here's an image of what I've got so far - I'm recreating the JMAZ PIXL FX Bar 5050 image

image

Zedarius5 commented 1 year ago

Please correct me if I'm wrong, but wouldn't high-poly geometry cause low framerate? My framerate is fine once everything finishes "thinking," but doing something like translating one of my spheres in any plane, creating a new geometry, or even deleting one, takes literally 3-4 minutes to compute before I'm able to interact with the fixture editor again.

mylesdebastion commented 1 year ago

You’re going to have a rough time scaling up building your light fixtures that way. You should mock-up your geometry in Blender and import just a few meshes for your single light fixture. It will be far more performant that way since TD will get bogged down processing too many 3D objects (plus associated textures, positions, transforms etc).

On Sat, Jul 15, 2023 at 5:20 PM Danny Olefsky @.***> wrote:

Please correct me if I'm wrong, but wouldn't high-poly geometry cause low framerate? My framerate is fine once everything finishes "thinking," but doing something like translating one of my spheres in any plane, creating a new geometry, or even deleting one, takes literally 3-4 minutes to compute before I'm able to interact with the fixture editor again.

— Reply to this email directly, view it on GitHub https://github.com/EnviralDesign/GeoPix/issues/62#issuecomment-1636926862, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHVGUDC3ROB6KQZ5PYPTN3XQMXWNANCNFSM6AAAAAA2LARKP4 . You are receiving this because you commented.Message ID: @.***>

Zedarius5 commented 1 year ago

Appreciate the help! The light bar has something like 32 separately addressable lights. Doesn’t that mean I’ll need 32 different models in order to control them each in geopix? Should I make each of those separately, already pre-translated to the correct spot, and then import the .obj files into 32 different pieces of geometry in the custom fixture editor?

Or is geopix just not designed for fixtures that have many lights in them?

EnviralDesign commented 1 year ago

hey @Zedarius5 love what you're trying to build in the custom fixture editor, is this something that you've already hit a wall building in GP with regular fixtures?

Myles is right about lowering the complexity of the fixture to get better performance, but the reason for why you're seeing 3-4 min stall times is actually not the geometry complexity in this case, but the time TouchDesigner takes to recompile the custom glsl shader. Custom fixtures are gpu accelerated, this is possible because each fixture has a custom shader attached to it. With so many moving parts, transforms, and geometries, the shader gets very large and it takes a long time to recompile. I'll see if the latest branch of td has made this recompile faster, but in the meantime focus on reducing the number of transforms and individual geometries, basically shrink the number of items in the fixture outliner as much as possible.

you won't really be able to do that for the rows of pixels, as there is no strip or grid construct within the custom fixture editor.

Another better choice is to re build this with traditional fixtures in GP, which are optimized for low complexity and high repetition. This entails a slightly different workflow, but I will create a short video tutorial and add it to the wiki (and ping you here) later today when I get that recorded.

I think this type of fixture is a good edge case that is probably common enough to warrant a walk through.

EnviralDesign commented 1 year ago

alright, tutorial is up, however it may take up to an hour before the HQ version is playable on YT: https://github.com/EnviralDesign/GeoPix/wiki/Creating-compound-fixtures-in-GeoPix

Zedarius5 commented 1 year ago

Incredible, thank you so much. I’ll check this out tonight!