Forum

How to set askew frustum camera matrix?

09 June 2016 12:16
Hi folks,

How it is possible to set the camera projection matrix to an oblique / custom frustum?
In the mat4-module is the helper function for constructing a frustum matrix, but I can not find a way to apply it to the camera projection matrix.

I would like to have control over the image render borders - a function like
m_camera.set_frustum_planes(camobj, planes)
would be much appreciated.
In the camera module exists already a method for obtaining the camera frustum planes, but not for setting them.

Or, for now which other possibilities exist?
Please help with some hints,

Daniel

@ Emotional3D
09 June 2016 13:22

How it is possible to set the camera projection matrix to an oblique / custom frustum?
Hello!
Unfortunately, for now there is no API method to change camera frustum planes.
Could you please specify a little bit your task?
Maybe set_fow or translate_view methods from the camera API module can be useful for you
Blend4Web Team - developer
Twitter
LinkedIn
09 June 2016 13:33
With a custom camera frustum it would be possible for us to generate e.g. very high-res images by tiling the original camera-frustum into a grid and render each tile separately.
@ Emotional3D
09 June 2016 13:49
, beside other usages like 'image-cropping' for exact control over the final image and its resolution.
@ Emotional3D
09 June 2016 15:23

With a custom camera frustum it would be possible for us to generate e.g. very high-res images by tiling the original camera-frustum into a grid and render each tile separately.
As far as I can see set_fov method may help, but you should make sure that canvas aspect ratio is equal to a tile's aspect ratio
Blend4Web Team - developer
Twitter
LinkedIn
09 June 2016 15:38
Thank you Konstantin, for trying to help.
@ Emotional3D
29 June 2016 11:19
Hi Konstantin,

as you have mentioned in Post #10028:
for now there is no API method to change camera frustum planes. 

and in Post #10049:
The projection matrix isn't accessible in our engine

there is, unfortunately, no way "tile-based high-resolution-image-rendering" and "advanced image-cropping with control over resolution" will be possible with the Blend4Web-Engine.

Setting camera fov (and or camera-position) won't get the right perspective for a tile in a way that they could get assembled to a whole without perspective kinks in the resulting image.

We have to search for another solution, then.

Cheers, Daniel.





@ Emotional3D
29 June 2016 11:43
Hi Daniel, I've just sent you a message on this topic, please check your email.
The Founder | Twitter | Facebook | Linkedin
16 February 2018 10:31
Hi Konstantin , I hope you are fine. I am looking a devoloper for my project. The project about jewelery configrator. I already created my models.
 
Please register or log in to leave a reply.