About Store Forum Documentation Contact



Post Reply 
[Android] Setting near clip plane affects far clip plane
Author Message
cat555 Offline
Member

Post: #1
[Android] Setting near clip plane affects far clip plane
Hi, i'm doing some tests with clip planes, and i can see that by lowering near clip plane, affects also the far clip plane.

For example, i'm setting clip planes like this:
Code:
D.viewFrom(0.02);
D.viewRange(1500.0);

What i can see in Android (i'm using a Nexus 7), is that the far clipping is done much closer than 1500 (about ~500 maybe). In the case of Desktop (linux), everything is Ok.

If i use near clip plane default value (0.05), the far clipping plane looks Ok. I know that 0.05 is already a small value, but my world scale is 1/100, which means that the default value for me is about 5m. And i need to lower it till at least 1m, so i need to set it to 0.01.

There is anything i can do to make it work in Android, or is this somekind of limitation for the mobile platforms?
01-24-2014 04:11 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: [Android] Setting near clip plane affects far clip plane
Probably you have Tegra3 device, which means 16-bit depth buffer, which is very bad for what you want (high 'range' with small 'from')

You can confirm this by testing
Renderer.lowDepthPrecision()
01-25-2014 07:12 AM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #3
RE: [Android] Setting near clip plane affects far clip plane
Hi, i haven't had the opportunity to test it, but yes, i have Tegra 3 with 16-bit depth buffer :/

I'm not fully aware of the technical details of this limitation, so do you think/know if there is any workaround that can be used to minimize the effects of this limitation?

Thanks
01-26-2014 12:31 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: [Android] Setting near clip plane affects far clip plane
Increase the D.viewFrom and
Decrease the D.viewRange
exactly opposite of what you want wink
01-26-2014 01:04 AM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #5
RE: [Android] Setting near clip plane affects far clip plane
grin yes of course... that's what i will have to do if not find any solution... but i've seen this post (also about flightsim and z-fighting problems, just like me) where you have a participation on a possible solution/workaround for this smile

http://www.esenthel.com/community/showth...ght=flight

It's a little bit old post (from 2009), so don't know if the actual engine will allow to do the same.

May i ask you to assess the solution you proposed at that time (using two viewports, one used for rendering background scene (terrain, etc...), with a larger near plane, but also large range, and the other viewport used to render closer scenes, with near plane small a also a small range... for example to render the plane cockpit), and check if the actual engine can handle such technique?

Thanks!
(This post was last modified: 01-26-2014 01:34 AM by cat555.)
01-26-2014 01:25 AM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #6
RE: [Android] Setting near clip plane affects far clip plane
Hi Esenthel, you have this on the roadmap:

- combine render with background for mobile platforms (render 3d meshes on top of current viewport without clearing it)

Is this related with this issue?
01-28-2014 12:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: [Android] Setting near clip plane affects far clip plane
Hi,

The first suggestion was about rendering background meshes, then clearing the depth buffer, then rendering foreground meshes.
Currently this can't be done because the meshes are added to rendering queue, and then drawn by the engine altogether.

The second item, from the roadmap, it's the ability to draw 3d graphics without erasing previous contents of the viewport.
Yes I think this would allow doing the suggestion that I wrote in this post at the start.
01-28-2014 10:31 PM
Find all posts by this user Quote this message in a reply
cat555 Offline
Member

Post: #8
RE: [Android] Setting near clip plane affects far clip plane
Hi,

Ok, thanks for the information!

Regards,
01-28-2014 11:06 PM
Find all posts by this user Quote this message in a reply
Post Reply