Jump to content

Yue

Members
  • Posts

    2,291
  • Joined

  • Last visited

Posts posted by Yue

  1.  

    I think from trying so hard to do something with Leadwerks and many tools, I'm on the right track. The new thing I'm learning is Optimize, terrain, sunlight, fog, skybox and vehicle update don't exist when inside the base.

     

    981386543_BaseA.thumb.jpg.6d8a74b84766cb09496c6d7142773d3a.jpg

    • Like 3
  2. By entering structures I can remove the terrain, fog and sky box along with the outlying lights and other elements. This solves the problem of disappearing walls, and I can create subway structures, where the player can climb down a ladder into the interior of the planet

     

     

    • Like 3
  3.  

     

     

    The first vehicle was based on these unsupported commands, a good result on a visual level, and above all the productivity in creating a vehicle was encouraging. But, I have many problems of Render Time, and unexpected shutdowns of the game.

    Now I'm creating my own vehicle system based on Hinge joints, without suspension, more rigid, like a horse's fetlock but the performance is nice. Possibly I will improve it with time.

     

    Rover.png

     

  4. 5 hours ago, Josh said:

    based on this screenshot, I think everything is in good shape. All those numbers are reasonable. You can see the rendering time on the CPU is only 2 milliseconds, so it is likely you are GPU-limited. this means the shaders just process as fast as the GPU allows and there are no other bottlenecks.

    Josh, a question, do you think the models attached to the character's back, in his backpack, affect performance? The system is as follows: all those meshes are attached, they're just not visible. The same goes for the models in his hand, they're all there, but not visible. The game is that when he picks up an object, it becomes visible in his backpack, and then if he moves it to his hand, the object in his hand becomes visible while the one in the backpack becomes invisible 

     

    ChatGPT translate.

  5.  

    By optimizing the vehicle system, I have a very good rate of frames per second.  Everything points to the fact that the code should be fully optimized.  This is an art as porcupine spider said.

    FPS.png

  6.  

    In the process of optimization, which is rather a process of rewriting the game as a whole. The problem seems to be the lightning to collect the items, as well as wanting to attach different objects to the player's backpack.

    In the game with the player controller, the performance drops, but it is still bearable. A scene without the character controller goes for 300 frames per second, and in the level 180 frames per second.

    I'm moving on to the vehicle implementation and this is sure to drop even more.

    My gtx 1070 is not as good as I thought.

     

     

     

    FPS.png

  7.  

    Optimizing this, it's really scary, but I have better performance. I've dismembered everything, and checked every script, to see where the performance is messed up.

    In this scene I have a very good amount of frames per second. The mistake was not to start with the stats and I'm paying dearly for it.

    Quality of shadows and terrain to the maximum.

     

    FPS.png

    • Like 2
  8. If I remove the occlusion system from the camera the error is not displayed. However, everything is rendered even if it is not in the camera. What I am trying to do is to create a base with small rooms and setting a respective angle to avoid the problem. If the wall is not too far away from the camera the effect is not seen.

     

    Base.png

    • Like 1
  9.  

    It is using a skybox that produces that effect, even if it is just a simple outline, a cube, with 6 walls. The problem is that the sky box and my eight gigabyte gtx 1070 graphic produces this unpleasant effect and the same if I have a terrain, even if it is 512 x 512 In such a case the solution is to create a small base on the surface, and then in another level without skybox or terrain, create the base underground.  That level would not have the base would not have that skybox, and you would not see that problem. I know that in a more powerful computer the defect would be visible, but for me it is a problem when I want to show the progress of the game in a video. 

    In such a case my gpu would not be the problem, I think it is my second generation processor an I7 from several years ago. But what is really strange for me is that if I play GTA V, that doesn't happen.

     

  10. 5 hours ago, SpiderPig said:

    That looks like the occlusion system to me.  I've never used CSG to model a level before.  I take it there are a lot of entities in your scene?

     

    No, I don't have anything in the scene, only the last image, the error only happens when I have fog, or a terrain, or the sky.

    And inside a brush structure, when I rotate the camera, the wall suddenly appears and the skybox appears in the background.

     

     

  11. #version 400
    
    // Uniforms	
    uniform samplerCube texture0; // Cube map
    uniform vec3 cameraposition;
    uniform vec2 camerarange;
    
    // Inputs
    in vec4 ex_vertexposition;
    in float ex_selectionstate;
    in vec3 ex_VertexCameraPosition;
    
    out vec4 fragData0;
    out vec4 fragData1;
    out vec4 fragData2;
    out vec4 fragData3;
    
    void main(void)
    {
        vec3 cubecoord = normalize(ex_vertexposition.xyz - cameraposition);
        vec4 outcolor = texture(texture0, cubecoord);
    
        // Calcula la distancia desde la cámara al fragmento
        float distanceToCamera = length(ex_vertexposition.xyz - ex_VertexCameraPosition);
    
        // Compara la distancia con el rango de la cámara para determinar si está detrás de otros objetos
        bool isBehind = distanceToCamera > camerarange.x && distanceToCamera < camerarange.y;
    
        if (isBehind) {
            // Si el fragmento está detrás de otros objetos, dibuja el skybox
            fragData0 = outcolor * (1.0 - ex_selectionstate) + ex_selectionstate * (outcolor * 0.5 + vec4(0.5, 0.0, 0.0, 0.0));
        } else {
            // Si el fragmento está delante de otros objetos, no dibujes nada
            discard;
        }
    
        fragData1 = vec4(0.0);
        fragData2 = vec4(0.0, 0.0, 0.0, 0.0);
        fragData3 = vec4(ex_VertexCameraPosition, 1.0);
    }

    Looking at the skybox sahder, but everything seems to be ok, chatgpt tells me it is the occlusion system.

  12.  

    Likewise, disable the fog when inside an installation, the question is why this happens, it is not my graphics card that I had before, the gtx 1050 of two gigabytes, much less the one I have now gtx 1070 of eight gigabytes. 

    But the good thing about understanding all this is that I can do something about it, and not be suffering for not understanding what is happening.

     

×
×
  • Create New...