Device is lost. Texture dont show. Possible cause?

Someone can help you.

Device is lost. Texture dont show. Possible cause?

PostPosted by vivienneanthony » 08 Dec 2016, 18:31

Hi,

Do anyone have a idea what would cause a mesh to disappear? I can't figure out if it's the camera or mesh itself. Everything seems normal but as soon as it hits a point it vanishes. I have no zone setup either.


It seems the device is lost, affecting the vertex buffer. I will have details later.



Direct Link
https://youtu.be/Do0pOChpZm4

The code I'm using is
Code: Select all
   // If camera exist
    if (m_pCamera)
    {
        // Updaw character yaw and povement
        Quaternion Rot(1.0f, 0.0f, 0.0f, 0.0f);

        // Get mouse position
        IntVector2 MousePosition = m_pInput->GetMousePosition();

        // Calculate look based on screen view
        float mWindowBasePitched = (float)(MousePosition.x_ - (g_pApp->GetGraphics()->GetWidth() / 2));
        float mWindowBaseYaw = (float)(MousePosition.y_ - (g_pApp->GetGraphics()->GetHeight() / 2));

        float newPitch = Clamp((float)mWindowBasePitched, -90.0f, 90.0f);
        float newYaw = Clamp((float)mWindowBaseYaw, -90.0f, 90.0f);

        // If key is hard reseet
        if(m_pInput->GetKeyDown(KEY_LALT) || m_pInput->GetKeyDown(KEY_RALT))
        {
            newPitch = 0;
            newYaw = 0;
        }

        // Create a new quaternion
        Quaternion CameraClamped(newYaw, newPitch, 0.0f);

        Node * pViewCameraNode = m_pCamera->GetNode();

        Quaternion RootRot = pViewCameraNode->GetRotation();

        // Rotate Camera
        if (m_pInput->GetKeyDown(KEY_LCTRL) || m_pInput->GetKeyDown(KEY_RCTRL))
    {
        if (pViewCameraNode)
            {
                // Removed line to figure out better rotation
                // Quaternion NewRot = RootRot.Slerp(Rot*CameraClamped, timeStep*.99);
                Quaternion NewRot =  Rot*CameraClamped;

                pViewCameraNode->SetRotation(NewRot);
            }
        }
    }


Vivienne
Last edited by vivienneanthony on 18 Dec 2016, 16:24, edited 2 times in total.
Office Youtube Page -https://www.youtube.com/user/cgprojectsfx
Official Blog -http://cgprojectsfx.wordpress.com/
Official Deviant -http://cgprojectsfx.deviantart.com

Existence Source
https://sourceforge.net/projects/proteusgameengine/files/Existence/
User avatar
vivienneanthony
Have many posts
Have many posts
 
Posts: 546
Joined: 12 May 2014, 13:21
Location: United States

Re: Character Model disappears? Code seems right.

PostPosted by Dave82 » 08 Dec 2016, 20:50

It could be a BoundingBox wrong culling issue.Does the same thing happens if you set
Code: Select all
yourAnimatedModel->SetUpdateInvisible(true);
Infested : An old school puzzle solving survival horror game :
topic1430.html

Infested Facebook page
https://www.facebook.com/infestedgame
User avatar
Dave82
Active user
Active user
 
Posts: 136
Joined: 11 May 2015, 18:08

Re: Character Model disappears? Code seems right.

PostPosted by vivienneanthony » 08 Dec 2016, 21:09

Dave82 wrote:It could be a BoundingBox wrong culling issue.Does the same thing happens if you set
Code: Select all
yourAnimatedModel->SetUpdateInvisible(true);


It's not the problem. I tried that function and it become invisible then I tried it with false, same problem.

Just in case I tried a static model, and it's the same problem.
Office Youtube Page -https://www.youtube.com/user/cgprojectsfx
Official Blog -http://cgprojectsfx.wordpress.com/
Official Deviant -http://cgprojectsfx.deviantart.com

Existence Source
https://sourceforge.net/projects/proteusgameengine/files/Existence/
User avatar
vivienneanthony
Have many posts
Have many posts
 
Posts: 546
Joined: 12 May 2014, 13:21
Location: United States

Re: Character Model disappears? Code seems right.

PostPosted by vivienneanthony » 08 Dec 2016, 21:23

Dave82 wrote:It could be a BoundingBox wrong culling issue.Does the same thing happens if you set
Code: Select all
yourAnimatedModel->SetUpdateInvisible(true);




Image

http://imgur.com/a/oHfpE

You can see the bounding areas here.
Office Youtube Page -https://www.youtube.com/user/cgprojectsfx
Official Blog -http://cgprojectsfx.wordpress.com/
Official Deviant -http://cgprojectsfx.deviantart.com

Existence Source
https://sourceforge.net/projects/proteusgameengine/files/Existence/
User avatar
vivienneanthony
Have many posts
Have many posts
 
Posts: 546
Joined: 12 May 2014, 13:21
Location: United States

Re: Character Model disappears? Code seems right.

PostPosted by vivienneanthony » 18 Dec 2016, 16:21

Hey All,

I tried isolating the problem. I am noticing the graphics system saying device id lost. Affecting the vertex buffer.

All help is appreciated, the mesh and colliding box is correct including physics. What could cause device lost on linux builx ising opengl. I added the pbr code just before it was merged 1.5. So i am not sure if its code on my end, urho3d, shader.

Vivienne
Office Youtube Page -https://www.youtube.com/user/cgprojectsfx
Official Blog -http://cgprojectsfx.wordpress.com/
Official Deviant -http://cgprojectsfx.deviantart.com

Existence Source
https://sourceforge.net/projects/proteusgameengine/files/Existence/
User avatar
vivienneanthony
Have many posts
Have many posts
 
Posts: 546
Joined: 12 May 2014, 13:21
Location: United States


Return to Support

Who is online

Users browsing this forum: No registered users and 0 guests