Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

185
Visualizações
ARCore – Rendering objects 200m far from camera

I'm working on Android AR project using ARCore and Sceneform. I need to place the objects from 30 meters to 200 meters far from user's camera and faced with the frustum culling issue in ArCore, described HERE.

I'm trying to set projection matrix to increase the far parameter using this method

public void getProjectionMatrix (float[] dest, 
                                 int offset, 
                                 float near, 
                                 float far);

But I can't find possibility to set the rendering projection matrix.

Here is my code:

arFragment.arSceneView.apply {
    scene.addOnUpdateListener {
        // Some code to return from this callback if arFrame is not initialised yet
        if (!objectsAdded) {
            placeObject(Pose.makeTranslation(0f, 100f, 100f), this)
            objectsAdded = true
            scene.camera.projectionMatrix = Matrix(computeProjectionMatrix(frame.camera))
            // P.S. frame.camera is ArCore's camera, scene.camera is Sceneform's one.
            // So, I'm not sure that using them in such way is consistent  
        }
    }
}

setProjectionMatrix method contains annotation VisibleForTesting. So, I'm not sure if I should use it and there is a guarantee that it will work.

Please, advice if I can do it in some other way? If no, what the best way to do far placed objects visible for user?

Thank you in advance.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Using Sceneform, you can set the far clip plane like this: arFragment.getArSceneView().getScene().getCamera().setFarClipPlane(…);

over 4 years ago · Santiago Trujillo Relatório

0

After thorough investigation I discovered that at the moment (March 2019) there's no way to setup ARCamera's far clipping plane and near clipping plane.

Let's wait for a while when Google allows it for ARCore developers.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda