Jump to content

DevLog Leadwerks Engine.


Yue
 Share

Recommended Posts

 

I have dismembered the whole base, and the problem is corrected the shadows of focus light, now, the problem that the walls disappear I will have if I solve it by creating a new base but taking into account several factors of design and testing.  The thing is that @Josh a few years ago mentioned that it was because of my nvidia gtx 1050 gpu, now that I have a gtx 1070 of eight gigas, it happens the same. 

Possible solutions, create the base in another level, and in the terrain just leave a door to enter it and make the respective level change. Where on the ground will be able to store the rover in a garage. 

 

 

 

Link to comment
Share on other sites

Brush

 

If I remove the sky and terrain, the walls of the facility do not disappear when I rotate the camera. In such a case a solution would be that when I am inside the station I can remove the sky and the terrain, I suppose that with the sky I can remove the material, but I don't know if I can hide the terrain. 

 

 

Link to comment
Share on other sites

 

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.

 

 

 

Link to comment
Share on other sites

#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.

 

 

Link to comment
Share on other sites

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.

 

 

 

 

Link to comment
Share on other sites

9 hours ago, Yue said:

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.

How many CSG objects are there in total?  I tried your demo again and saw that other CSG objects out side of the base took time to appear as well. (orange platform)  When the walls vanish they show not only the skybox but the other objects behind it too.  I tend to think it's just lots of CSG objects.  You might be better off making your base one large object in some modelling software.  But there might be something else at play, I'm not sure.

Error.thumb.png.ea0d57e1b5c8fdbe8f7c5968afd12297.png

Link to comment
Share on other sites

 

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.

 

 

 

Link to comment
Share on other sites

43 minutes ago, SpiderPig said:

Yeah I don't think its the GPU.  I've got a GTX 980 TI.  Maybe it is the skybox.  If you remove it I can test on my PC to verify if that's the issue if you like.

https://www.mediafire.com/file/r97h1kbj9daz83p/AstrocucoX.rar/file

Look at this simple test, in such a case if I have a box, or a terrain I have that strange effect. You remove the sky with the m key.

 

 

 

Link to comment
Share on other sites

Just tried it out, with the skybox removed it still happens on the far wall of the base.  It's just a lot harder to tell because the colour difference between the black background and the dark gray wall is very small.  If you remove the skybox and make the cameras clear color red or something else bright you will will be able to see it better.  I don't think it has anything to do with the terrain or skybox.  I think it's something to do with the CSG objects.

I can see in your video it is still occurring too.  A few work arounds might be - slowing the cameras rotation speed so that it's less noticeable; or, make a large enclosure for the base that has the same colour as the walls and enable it when the players is inside, so that when it happens it only reveals a similar colour behind the walls rather then the bright skybox / terrain.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...