Recommended Posts

Hello,

Do we have anything off the shelf like three.js cameraHelper which shows a wire outline of a camera itself?

I can't find anything but shouldn't be difficult to put something together if nothing currently exists.

Thank you.

Share this post


Link to post
Share on other sites

Better, but still not right: http://www.babylonjs-playground.com/#AZLEWZ#3 the purple rectangle (camera.minZ) should not be visible in right hand viewport.

better still: http://www.babylonjs-playground.com/#AZLEWZ#4

http://www.babylonjs-playground.com/#AZLEWZ#6

http://www.babylonjs-playground.com/#AZLEWZ#7

Share this post


Link to post
Share on other sites

This looks good, do you feel able to create it as the boundingBoxRenderer and other helpers in typescript ? 

We could then easily integrate it in the framework, it is a really cool addition.

Share this post


Link to post
Share on other sites

That's a great idea @babbleon! - I really cannot count know how many times I've had z-fighting issues where something is out of frustum near plane, so that near plane is really helpful (ie: move near/far plane or z-position/fov).  This is linked from the page that I used to learn all the math, but would be a cool documentation PG with GUI sliders to demonstrate the utility of the camera helper:
https://webglfundamentals.org/webgl/frustum-diagram.html main page(https://webglfundamentals.org/webgl/lessons/webgl-3d-perspective.html)

Share this post


Link to post
Share on other sites

Here is the code of the bounding box renderer: https://github.com/BabylonJS/Babylon.js/blob/master/src/Rendering/babylon.boundingBoxRenderer.ts

I was wondering if we should create a CameraFrustrumRenderer and a LightFrustrumRenderer looks like it would be consistent and pretty helpfull, we could also add them to the inspector like we do for the mesh and @Luaacro could do good use of it in the editor.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.