Character visibility problem

  • #10, by afrlmeMonday, 25. June 2018, 22:46 7 years ago
    You are using custom shaders for the shadows? Can you post the script/screenshots please?

    Imperator

    7286 Posts


  • #11, by davide-civelliTuesday, 26. June 2018, 09:46 7 years ago
    You are using custom shaders for the shadows? Can you post the script/screenshots please?

    We use a shader to control a character called SHADOW that follow the main character just to simulate his own shadow. Here is the code:

    local pos 
     
    function setCharacterShadow() 
     if Characters["shadow"].Scene:getName() ~= game.CurrentCharacter.Scene:getName() then Characters["shadow"].Scene = game.CurrentCharacter.Scene end 
     if game.CurrentScene:getName() == game.CurrentCharacter.Scene:getName() and game.CurrentScene:getName() == Characters["shadow"].Scene:getName() then 
      pos = game.CurrentCharacter.Position 
      Characters["shadow"].Position = { x = pos.x, y = (pos.y - 10) } 
     end 
    end 
     
    registerEventHandler("mainLoop", "setCharacterShadow")


    And then Call Script "Shadow" to activate it


    We try to make a clear new game with the same character that isn't visible in our adventure ( without shadow) and everything is ok...


    Newbie

    19 Posts

  • #12, by NigecTuesday, 26. June 2018, 10:06 7 years ago
    Try running the game as an admin and see if it works then

    I had issues with D3D with the last Windows 10 update, I had to re install the NVidia drivers, for me VS and games would only run as an admin
    The message log was complaining it had issues starting the shaders

    Key Killer

    640 Posts

  • #13, by afrlmeTuesday, 26. June 2018, 10:25 7 years ago
    That's a script, not a shader. I don't particularly see anything wrong with your script, though maybe you might want to query if the current scene is the same scene as the characters current scene first? Also you don't have to use the mainLoop function to update the shadow characters position - I'm assuming the shadow character only contains a single animation? If that's the case then you could edit the animation frame & update the position via that - set delay time for the animation to 16ms & it will update the position once every system loop if the shadow character is on the current scene.

    Quick question: why didn't you add the shadow directly into the characters animation images or generate with the 3D graphics program you used?

    Imperator

    7286 Posts

  • #14, by davide-civelliTuesday, 26. June 2018, 12:23 7 years ago
    Try running the game as an admin and see if it works then

    I had issues with D3D with the last Windows 10 update, I had to re install the NVidia drivers, for me VS and games would only run as an admin
    The message log was complaining it had issues starting the shaders
    I updated the Nvidia Drivers but nothing change. And nothing change too if I run as administrator Visionaire Studio or the compiled  .exe  file of the game.

    Newbie

    19 Posts

  • #15, by davide-civelliTuesday, 26. June 2018, 12:27 7 years ago
    Quick question: why didn't you add the shadow directly into the characters animation images or generate with the 3D graphics program you used?
    Yes, for sure in a few days if we couldn't find a solution I re-renderize all the character animations with shadow ON, directly in 3d software. We preferred to add later the shadow just to control better the way it appear, nothing else! (some location have strong shadow, other very light).


    Newbie

    19 Posts

  • #16, by afrlmeTuesday, 26. June 2018, 12:41 7 years ago
    Maybe it's to do with the way it exported your images from the 3D program. Could you try using XnConvert to convert the animations to webp & replace the png versions in the editor with the webp versions.

    XnConvert link & instructions for recommended settings can be found here.

    Imperator

    7286 Posts

  • #17, by davide-civelliTuesday, 26. June 2018, 18:47 7 years ago
    Maybe it's to do with the way it exported your images from the 3D program. Could you try using XnConvert to convert the animations to webp & replace the png versions in the editor with the webp versions.

    XnConvert link & instructions for recommended settings can be found here.
    Ok, thank you for this tip, AFRLme. We give it a try!

    Newbie

    19 Posts