Jump to content

Christian Clavet

Members
  • Posts

    198
  • Joined

  • Last visited

Posts posted by Christian Clavet

  1. Hi!

    Have you tried to comment out the Window.Center command? I know that Ubuntu might cause an issue with windows management because of Unity. Is your Linux distribution is Ubuntu?

    For the other map, I really don't know with the information you provided... Did you use a custom shader in there? A custom shader will work almost 100% on NVidia and may crash on AMD or Intel hardware... If you are not sure, please investigate that map to be sure it only use the provided "stock" shaders. If not, then there could be the source of the crash.

  2. Hi, Angelwolf!

    Quote

     

    I can no longer texture a single surface. If I click on the 'Select Face' button, then choose my surface, there is no option to change the texture under the 'Scene' tab on the right. If I use the 'Select Object' button, I can texture the entire object.

    Any ideas why this might be happening?

     

    I've tried and it work. Can you recheck and do it the same as I do as:
    1 - Select the brush you need to change with the "select object" icon
    2 - Once the object is selected (red), press the "select face" icon
    3 - Click on the face you want to change, it should become red (only the face you want)
    4 - Drag a material over it from the ASSET tab. The materials are spheres.
     

    Quote

    I'm also having trouble working out exactly how Environment Probes work. From what I'm aware, you click on Create then Environment Probe, then adjust the size of the probe. Then click 'Tools > Build Global Illumination'. I seem to recall probes giving a nice reflection effect, but this doesn't seem to be happening either?

    You seem to use it right. That are the steps I'm used to do. If you want the nice reflection effects, you need also to add (with the reflection probes), the SSR shader (Screen space reflection) on the post process filter list.

    If you look the screenshot, the SSR post process filter is ON and if you look at the truck, there is nice reflections on it. Be careful that the SSR will use the specularity factor on all the environment to do it's trick. Some models you have in your map might have too much reflections. I had to tweak the values on the building you see in the screenshot has it was too shiny and had a grass mesh giving reflections. Just lowered the specularity a bit on the material and it fixed it.ScreenSpaceReflections.thumb.JPG.041415d2f1d569f26e308e25261ee6ac.JPG

    • Upvote 1
  3. Ok. I decided to create a new script based on noise.lua. Called it noisemix.lua.

    Fixed.thumb.JPG.82617985d2daa6f95c247c2bae80835b.JPG

    If you look from the screenshot, it provide an input for switching from the first song to the second. And it finally work! When the NPC goes in chase mode after the player (modified monster.lua to have an output for this), it trigger the switch to the other song. All the songs are loaded at start, and the first one is discarded before the second start.

    Fell free to give any suggestions! 
    Here is the new script:

    Quote

    Script.soundfile=""--path "Track 1" "All Supported Files:ogg,wav;Waveform Audio File Format (*.wav):wav;Ogg Vorbis (*.ogg):ogg|Sound"
    Script.soundfile2=""--path "Track 2" "All Supported Files:ogg,wav;Waveform Audio File Format (*.wav):wav;Ogg Vorbis (*.ogg):ogg|Sound"
    Script.playing=true--bool "Playing"
    Script.enabled=true--bool "Enabled"
    Script.range=50--float "Range"
    Script.volume=100--int "Volume"
    Script.pitch=1.0--float "Pitch"
    Script.loop=true--bool "Loop"
    Script.currenttrack=1

    function Script:Start()
        self.source = Source:Create()
        self.source:SetVolume(self.volume/100)
        self.source:SetPitch(self.pitch)
        self.source:SetLoopMode(self.loop)
        self.source:SetRange(self.range)
        self.source:SetPosition(self.entity:GetPosition(true))
        local sound = Sound:Load(self.soundfile)

        self.source2 = Source:Create()
        self.source2:SetVolume(self.volume/100)
        self.source2:SetPitch(self.pitch)
        self.source2:SetLoopMode(self.loop)
        self.source2:SetRange(self.range)
        self.source2:SetPosition(self.entity:GetPosition(true))
        local sound2 = Sound:Load(self.soundfile2)
        
        
        if sound~=nil then
            self.source:SetSound(sound)
            if self.playing==true and self.enabled==true then
                self.source:Play()
            end
            sound:Release()
            sound=nil
        end

        if sound2~=nil then
            self.source2:SetSound(sound2)
            sound2:Release()
            sound2=nil
        end
    end


    function Script:Switch()--in
        self.currenttrack=2
        if self.source then
            self.source:Pause()
            self.source:Release()
            self.source=nil
        end
        if self.source2 then
            self.source2:Play()
        end
    end

    function Script:Play()--in
        if self.enabled and self.currenttrack==1 then
            self.source:Play()
        end
        self.component:CallOutputs("Play")
    end

    function Script:Enable()--in
        self.enabled=true
    end

    function Script:Disable()--in
        self.enabled=false
        self.component:CallOutputs("Disable")
    end

    function Script:Pause()--in
        if self.currenttrack==1 then
            self.source:Pause()
        end
        self.component:CallOutputs("Pause")
    end

    function Script:Release()
        if self.source and currenttrack==1 then
            self.source:Release()
            self.source=nil
        end
        if self.source2 and currenttrack==2 then
            self.source2:Release()
            self.source2=nil
        end
    end

     

  4. Hi,

    I've tried lots of things to make the background music change during gameplay and I'm still failing to do it properly and now getting out of ideas.

    I'm using the flowgraph editor to start the music when the player take ammunition and this part work correctly. The part that is failing is that when a designated NPC is killed, I want to pause the current music and start a new music. The pause of the current music works, but the new music if failing to start.

    I'm using NOISE.lua and modified it slightly with monster.lua to give them the output to flowgraph.

    I've applied the noise.lua script to 2 pivot. One for each song. Set the script for each song. I was able to make them play both by making them play at start. The second song refuse to start when the NPC is killed, the pause work, not the other song.

    Here is a screenshot of my flowgraph setup:
    Flowgraph.thumb.JPG.f1016cb2331e208b294b3ff525cd66ef.JPG

    The only thing I could think of now, is look at the LUA code for noise.lua and modify it to handle 2 tracks so everthing is handled in the same script. BTW, the flowgraph editor is really powerful!! Too bad we can't group items and zoom-in/zoom-out...


  5. Hi, Jen!

    Quote

    You're better off making your own AI system.

    You mean rewriting your own version of monster.lua or rewriting the whole AI system (Navigation AI C++ side)? Your "AI system" term is confusing me a little here. I'll assume your meaning the LUA script that is used for AI.

    This is the part that activate in the LUA code of monster.lua when the player as been seen (in range). I don't see anything there that could do what I've experienced. For my current needs this script is Ok.

    I don't see any big loop in there if the NPC switch from IDLE to CHASE, and this the current symptom I have. (update loop take more than 7000ms to update then goes back to normal after a few seconds)

    Quote

     

    function Script:UpdatePhysics()
        if self.enabled==false then return end

        local t = Time:GetCurrent()
        self.entity:SetInput(self.entity:GetRotation().y,0)
        
        if self.sound.idle then
            if t-self.lastidlesoundtime>0 then
                self.lastidlesoundtime=t+20000*Math:Random(0.75,1.25)
                self.entity:EmitSound(self.sound.idle,20)
            end
        end
        
        if self.mode=="idle" then
            if t-self.lastupdatetargettime>250 then
                self.lastupdatetargettime=t
                self.target = self:ChooseTarget()
                if self.target then
                    self:SetMode("chase")
                end
            end
        elseif self.mode=="roam" then
            if self.entity:GetDistance(self.target)<1 then
                self:SetMode("idle")
            end
        elseif self.mode=="chase" then
            if self.target.health<=0 then
                self:SetMode("idle")
                return
            end
            if self:TargetInRange() then
                self:SetMode("attack")
            elseif self:DistanceToTarget()<self.attackrange*2 then
                self.followingtarget=false
                self.entity:Stop()
                self:DirectMoveToTarget()
            else
                if self.followingtarget==false then
                    if self.entity:Follow(self.target.entity,self.speed,self.maxaccel) then
                        self:SetMode("idle")
                    end
                end
            end
        elseif self.mode=="attack" then
            if self.attackbegan~=nil then
                if t-self.attackbegan>self.attackdelay then
                    if self.target.entity:GetDistance(self.entity)<1.5 then
                        self.attackbegan=nil
                        self.target:Hurt(self.damage)
                    end
                end
            end
            local pos = self.entity:GetPosition()
            local targetpos = self.target.entity:GetPosition()
            local dx=targetpos.x-pos.x
            local dz=targetpos.z-pos.z
            if self.entity:GetCharacterControllerAngle()>90.0 then
                self.entity:AlignToVector(-dx,0,-dz)
            else
                self.entity:AlignToVector(dx,0,dz) 
            end
        end
    end

     

    What I've seen, is that the update loop (not the render) will take more than 7000ms to refresh once the NPC see the player (goes from idle to chase mode), after that it move and update refresh goes back to normal.

    It could be something to do with recast/detour, that copies the world collision models data or something that initialize lots of data at once then release. (What I'm currently thinking the problem could be, but only Josh could tell.) 

    With only a terrain and nothing else, I was able to make it work correctly by disabling the collisions on the tree models of the vegetation, so it seem directly related with collision models.

  6. Hi, Seen the new GUI system in Leadwerks. And I'm wondering if it could handle accented character like in french or other languages?
    Done a quick check on the menu.lua and changed one item by adding a "é" symbol and it doesnt seem to be able to display it...
    Will it support UTF8?

  7. Hi, I would like to report a problem that I've seen with the NPC that are making the "update" loop much longer when they "awake".

    Description of the problem:
    On a terrain that have trees(vegetation layer) with collision enabled, when the player (std FPS controller) get near a NPC(crawler) the update loop can get as high as 7000ms for a few second and come back as normal. Disabling the collision option on the vegetation layer, seemed to fix it. But I "feel" that it does that for every type of collisions (models / brushes). The more you put on the map, the more time it will take on the update loop.

    Reproductability: 100%
    How to reproduce:
    1. Create map with the FPS template.
    2. Create a terrain.
    3. Place some (3+) Crawlers NPC on the terrain.
    4. Create lots of tree (density of 2.2 or less), and enable the collision option on the layer.
    5. Start the game and move the FPS player near one of the NPC.
    6. Notice the "lag" and stop when the NPC emit the detect sound. Also notice the update loop time increasing a lot!

    My impressions about this:
    I feel like the navigation system is doing some kind of data copy of collision models from all the surrounding with no filtering of geometry when the AI find the play "in range". An investigation would be welcome...

    My current system that was used for the testing:
    CPU Intel I7 3770K, 16Gb ram, 512GB SSD + 1TBHDD, NVIDIA GTX1080 at 3840x2160 desktop resolution.
    Windows 10 Home (version 1703)

  8. Hi, I have not found this option on the terrain tool. That's why I'm asking if that could be implemented in future Leadwerks version.

    Currently the vegetation tool for terrain is really awesome, but for rocks or other objects that are not trees, it would be desirable to have the object line up with the terrain surface.

    Here is a screen showing some rocks on a hill. With a checkbox to align the object with the surface of the terrain, it would look better:
    RockAlignment.thumb.JPG.3843c77706474a9719fe3705509e9cd3.JPG

  9. I have a similar issue with NPCs that are seeing the player and become active, then game "lock" for less than 1 second. If they don't see the player, the FPS maintain. I'll try to see if I put a mesh model with no script if it still will do this.

    EDIT: Done a quick tests with some props in my 1024 sized map and still good. No frame drop when I'm far or near them. This only happen with NPC for me.

    Leadwerks4_4_props.JPG

    EDIT: Hi, most of the problems I had came because I was using an old map (updated at each release). Did you tried to make a new project and new map using Leadwerks 4.4. It might fix the issue you have...

    • Upvote 1
  10. Wow. This is an interesting subject! Everybody should stick to 1024 map size then and wait that future Leadwerks version manage the video memory of the hardware it's running on and do streamed loading of the map. (This doesn't seem to be easy to do)

    Is there a way to report the video memory usage taken from the current map? Since I have a GTX1080 here, I could go overboard and my map would not play anywhere else! For NVIDIA, I have found SMI GPU tool.

  11. Hi, Just enjoying this new release of Leadwerks 4.4 and decided to make a map with vegetation just for fun. Not really tried the terrain tool before today, and I'm really impressed. It really good and precise to use!
    Leadwerks4_4_zombies.thumb.JPG.cb3bb0bdd587f3d6094cef36df38706f.JPG

    I'm using the Zombie pack addon and the fps pack addon. I've placed 5 zombies in a group near of a "bunker" i've made with brushes.

    I've got the game almost stop when the zombie see the player, and found that the game update were going in 7000+ms update time, was not a render problem. In debug mode, the FPS drop to about 0-1 fps.
    ...GameCapture.thumb.JPG.36dd2e1832bd362b14bb7bf235e66d79.JPG

    EDIT: Fixed the issue for the update time, by creating a new project and a new map. Adding back the zombies did not create any issues. So I suspect that is related to all the changes since then. The "mygame" map I was using, was made since Leadwerks 3.1 and was updated by the project manager at each release!
    EDIT2: Found out the REAL issue with it. I started putting tons of vegetation again and enabled COLLISIONS for the tree and this is what make the problem with the NPC. Disabling the collision on the vegetation layer fixed it. So something make the update really-really long if you put collisions on vegetation models and use NPC's....

    With the new map, I was not able to have the game work in debug because it crashed on launch. (I've recompiled the game with MSVC), but the release build work 100% ("esc" key now display me the new GUI menu)

    The debug build seem to crash on newton...

    Quote

    Le thread 0x15c4 s'est arrêté avec le code 0 (0x0).
    Exception non gérée à 0x10064CE5 (newton_d.dll) dans Test2.debug.exe : 0xC00002B5:  Interruptions de virgules flottantes multiples (paramètres : 0x00000000, 0x00009D21).

    Is this because I've recompiled the project with MSVC community 2015?

    I've got a game crash each time the player is being killed by NPC. I tested it with the crawler and the zombies and it's doing the same thing. Each time the player is being killed, the game crash with an exception error. (The screenshot is the last to display when the player is killed and the game crash)

  12. I mostly refer as scale based on a character size. Since you can export a brush from the editor. Create a brush to cover a single character, and export that brush.

     

    I use that box as a reference in your modeling application. Most of the time the character size I assume is 6 feet. This always worked great when I was making models for a game.

  13. I used hammer for a long time, and using CSG was really bad because it caused leaks and error. Fortunately, I did not have any problem in leadwerks.

     

    The only thing I'm missing is a way to move vertices. In Hammer, I did not use CSG but moved vertices from brushes and used primitives as references for the shape I wanted.

     

    If you look there this level details were modeled all with brushes and NO CSG, just brushes modified with the vertex tool:

    (All of the corridor interior in this parody of SG-1). The stargate is also done with brushes. smile.png This is old stuff I made in 2009 using Hammer in a Half Life mod.
  14. Looking at their web site, I don't think so. This tool was made from Unity. They made a plugin to load back the content created in their tools back to unity.

     

    AGFPRO v3.0 includes all of the necessary tools to allow users the ability to import AGF scenes into Unity3d Free and Pro 5.0.

     

    Creating game levels and maps in AGFPRO is easy and fun - now ANYONE can create their own quality game maps without having to program, model or animate!

     

    If you look there, it's clearly written "AGF" scenes. Not Fbx. They surely can import custom models in FBX in their tools, but the export seem to be only in AGF. You should contact the developer to be 100% sure.

  15. Hi, I just bought yesterday the Egyptian temple from the workshop and think it would be nice to give a feedback about it.

     

    Current verdict: Need improvement, really beautiful but not useful. (april 2016)

     

    screenshot9_1024x1024.jpg?v=1452690194

     

    Buying this pack:

    It was relatively easy. I've got it from the community page on steam (browser) and then reserved the amount to buy it and then took it. I find this easier to do that way. Once the buying is done, I simply go in Leadwerks and download it. At first I had some problem getting paid model from the workshop directly from the workshop in leadwerks. The method I use now make it work all the time.

     

    The pack:

    Art Quality:

    The pack contain lots of models, of components of a temple and some temple props. So you can decide to build your own version of a temple. The models are really well done and beautiful with tons of details on them. A note, this is only temple parts, there is no pyramids in the pack, neither as the sphinx.

     

    Leadwerk integration:

    This is were the problems starts. They've done a lots of round corners to pack this for leadwerks and really done it bad.

     

    First, the "demo" map that come with it was done in another path then they simply moved it without changing the path for the assets, as a result, Leadwerk gave me more than 240 errors about missing files.

     

    Second, I'm almost sure it's missing some assets. Even by taking models outside of the demo map, I've still got some error (missing textures) on some models.

     

    Third, No optimization of the model. The demo scene run in debug at around 20fps on my NVIDIA GTX 780. So really nice, but without LOD or optimization of the model, the scene is beautiful but cannot really be used to make something in real time.

     

    Fourth, there is NO source FBX for the models, so no way to retopo these models to make them useful in real time applications. So for me I can see the art but cannot use it.

     

    Finally:

    Clearly they will need to improve on making a proper leadwerks integration. Next time, If I don't have the source FBX, I will not get it. It's also not totally clear on what type of licencing they use for the models.

     

    I think Arteria3D made a good move by promoting their pack on the Leadwerk Workshop, and I just hope they will improve and that other will join.

  16. Hi, I've seen a simple issue that I would like to report, but I don't think that would go as a BUG REPORT per se.

     

    I've seen a little issue with the MERC character, is that simply in the template, the character shadow is set as static and his weapon the same. Changing the shadow setting break the template. A simple tweak would need to be done to the template.

     

    Another issue was that I was finding that he was moving too fast for my taste, and did not have option to change the speed but was quickly adjusted that by adding the options in the LUA script.

     

    This character is really more useful to me than the monster to test stuff. I really like it!

    EDIT: I've simply changed the shadow from the MERC and the M4A1 object to dynamic shadow. That fixed the issue and then I saved back the "merc" in the scene view as a new prefab.

    • Upvote 1
×
×
  • Create New...