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.

Switch to IBL mode on mobile GPU

Home Forums Puzzles Switch to IBL mode on mobile GPU

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42583

    Hello,

    I am making a configurator, that performs well on laptops and high-end phones. On lower end phones the configurator runs at >10fps, which is too low. Textures are 1k and I use two point lights with no shadows.

    My question:
    I use PMREM for the IBL mode, but would like the app to switch to light probe IBL mode if mobile GPU is detected. I have seen how this performs much better, but lacks quality. Is it possible to switch IBL mode in puzzles?

    Thanks a lot!
    – Daniel

    #42585
    xeon
    Customer

    So it sounds like the general issue is low FPS and you are looking for ways to improve that on lower-end devices.

    I don’t personally know if any ways to switch from PMREM to light probe via puzzles. You might be able to make a modified version of verge3d and create functions in ThreeJS that would allow this but there might be easier approaches to getting a faster frame rate on low-end devices.

    For fast frame rates, you need very optimized files: low triangle count, low number of draw calls, optimized textures, no lights.

    I would start with resetting my 3D scene in high res with all the lights effects desired. I would then divide the objects into those that animate and those that are static. If you have objects that animate and cast shadows…group those together and handle those objects separately. For all other objects…create a texture atlas, one large texture that bakes all your items into a simple texture AO, Shadows. You will render and bake these using Cycles. So lighting will be a bit different but the quality will be really high. If you can get away with just a single map do so. In the case with the furniture textures..if you can create one map that has all the colors you will avoid lots of draw calls. Texture atlas are the way to go for sure. Consolidate as much as you can. For all your coaches and materials I would think 1 diffuse, 1 normal would be all you need and it would color all the various coach color combos.

    Once baking is done…and you have your atlas maps…you need to reduce your scene from highres to low res. Optimize your triangle count and dump any duplicates in your scene and clone those objects in v3d.

    Triangle count is going to be critical. Most couches we do have an upward limit of 10k triangles. So we incorporate cloning in V3D. We try to model only 1/2 1/3 or 1/4 of the sofa and then clone replicate to complete the model. Some designs aren’t symmetrical and on those you are stuck with modeling the entire thing. The other thing is to delete hidden surfaces of geometry (bottoms of cushions, etc.)

    Remove unnecessary lights and use HDR lighting. Since your scene will have baked shadows…you don’t need the light sources so you can delete those unless your scene as mentioned earlier has objects that are moving and casting shadows. Use cloning of the lights to create multiples if required but limit them or delete them if possible.

    You might be surprised and find this solution produced very high-quality results that work on just about anything.

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

    #42590
    zark
    Customer

    :cry:

    #42600

    Thank you so much @xeon for the detailed description of how to optimize the app! I went through and deleted a ton of non-visible faces. – I only have three objects in the scene at a time, so I don’t think that is the problem.

    I am not a dev, so I think jumping into ThreeJS would be a bit too much for me. Would be so cool to have more options to “hybrid” optimize the app for mobile, when a mobile GPU is detected. For instance, turn off shadows, disable lights, change IBL mode, and so on.
    – But there is probably a good reason why this is not possible to do already.

    #42633

    Hi,

    Is it possible to switch IBL mode in puzzles?

    There’s a way to do that, although it’s a bit hackish. If you don’t use light probe objects in your scene this should be enough (light probes also need manual switching as well as the environment):
    ibl_mode.png

    – the key puzzles are System->feature_available and Advanced->exec_script

    The code inside the “exec script” puzzle:

    
    app._envIBLMode = v3d.IBLEnvironmentProbeCubemap;
    app.updateEnvironment(app.scene.worldMaterial);
    
    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead developer at Soft8Soft.

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