Results 1 to 5 of 5
  1. #1

    Turn ON/OFF shadows and shaders in runtime?

    In BGE i have doubt we can turn on/off shadows and shaders only main scene? or need made to all scenes of game?
    in main scene i have baked shadows and AO in render mode.

    i wish make this in settings for weak machine or weak pc

    thanks
    Last edited by linuxfree; 16-Apr-18 at 20:56.
    FPS-ZI zombie infected pre-alpha v.1.04 - download install and play and please send me feedback frames per second you get hardware used.Thanks
    Download Here



  2. #2
    Member BluePrintRandom's Avatar
    Join Date
    Jul 2008
    Location
    NoCal Usa
    Posts
    18,788
    check out in the rasterizer setting in api
    edit:
    bge.render.setGLSLMaterialSetting(setting, enable)¶
    Enables or disables a GLSL material setting.

    Parameters:
    setting (string (lights, shaders, shadows, ramps, nodes, extra_textures)) –
    enable (boolean) –



    example

    bge.render.setting("shadows",False)


    https://docs.blender.org/api/blender...aterialSetting
    Last edited by BluePrintRandom; 16-Apr-18 at 23:31.
    Break it and remake it - Wrectified
    If you cut off a head, the hydra grows back two.
    "headless upbge"



  3. #3
    Originally Posted by BluePrintRandom View Post
    check out in the rasterizer setting in api
    edit:
    bge.render.setGLSLMaterialSetting(setting, enable)¶
    Enables or disables a GLSL material setting.

    Parameters:
    setting (string (lights, shaders, shadows, ramps, nodes, extra_textures)) –
    enable (boolean) –



    example

    bge.render.setting("shadows",False)


    https://docs.blender.org/api/blender...aterialSetting
    ok but i wish made a diferent style for set in game.Will available in pause scene then in this scene will have a check box to enable/disable. the settings will change to all scenes then how main scene is suspended with Pause scene active will put a cube in plane t show real example of settings.
    FPS-ZI zombie infected pre-alpha v.1.04 - download install and play and please send me feedback frames per second you get hardware used.Thanks
    Download Here



  4. #4
    in my experience, GLSL settings are a bit wonky, and can only be set at init. i havent been able to get a dynamic switch to work.

    i have successfully created a robust system to set graphic parameters. it IS possible and i will share when i release the rest of my code. (hopefully soon)

    tip: when opening a new blend, you need to reset all the options you change to TRUE when the new blend starts, then disable the ones you want.
    System "IVAN" (rev 2.0) - Win7 64bit - Blender 2.74:
    Intel i7-3770 4.10 Ghz | EVGA GTX 970 | GSkill Ares 16GB 1600 Mhz | ASUS P8Z77-V LK
    Where my Code Lives - https://github.com/DaedalusMDW



  5. #5
    Member
    Join Date
    Nov 2013
    Location
    Denmark
    Posts
    207
    i needed something like this to, here is a blend that shows how i solved the problem.

    (change the object color on ground plane to adjust the shadows)

    http://15b.dk/blendfiles/shadow-test.blend



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •