We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

App slowdown when hiding/showing lights

Home Forums General Questions App slowdown when hiding/showing lights

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #76352
    adamabr
    Customer

    Is there any way to avoid the app slowdown when a light is shown/hidden for the first time?

    I understand that the light has to be recalculated. But could this be done when loading the whole application?

    It seems like the light calculation only has to happen once, subsequent hiding and showing works quickly.

    Thoughts?

    Thanks,
    Adam

    #76357
    xeon
    Customer

    Lights are expensive when it comes to performance. They impact redraws, triangle counts, shadow maps… and overall costly. They require lots of calculations when turned on and off. To avoid this…you may want to bake your shadows and and lights and just control lights on and off with texture changes rather than physical lights far more performant.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #76358
    adamabr
    Customer

    That is true, however it does make a big difference in my scene. The only performance problem so far is when it is switched for the first time. I’d rather take a longer loading scene and have that be smooth later.

    Wonder if we have any control over this?

    I am not afraid to delve into code and mess around.

    #76359
    kdv
    Participant

    Before showing your scene for the first time, right after the app is loaded, turn all lights on, in a second or two turn them off and only after that hide the preloader screen.

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #76491
    masj
    Participant

    I ran into this recently (yes, it hits performance hard toggling the visible true<->false).
    What worked for me was setting the intensity from 0 to n or vice versa. Didn’t notice any slowdown :-)

    #76551
    adamabr
    Customer

    Thanks for the input!

    That sounds like a great idea masj! I’ll have to try that!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.