Author Topic: Problem 3d on Android  (Read 12040 times)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Problem 3d on Android
« on: 2011-Oct-18 »
Hi in Android I have a very strange effect in 3D.

I explain but it´s a little confuse, when you draw somethings geomtries, in example making a for, and repeat sometimes a geometry, you have an extrange effect like if any geometry is over the previous geometry, in some cases parts of the geometries turns transparents when rotating the objects.

NOT it´s a trouble of X_Cullmode I try all modes -1,0 and 1 and the effects occurs, but drawing the normal what you select whit X_Cullmode.

PS: If it´s too much confuse I try to make a capture in Android and Palm Pre...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10762
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Problem 3d on Android
« Reply #1 on: 2011-Oct-18 »
We noticed that too. It's terrible. As if the z-buffer was inverse.

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: Problem 3d on Android
« Reply #2 on: 2011-Oct-18 »
Ok Gernnot don´t care, my game don´t go to the market in a long time... only was for advice.
Thanks

MrTAToad

  • Guest
Re: Problem 3d on Android
« Reply #3 on: 2011-Oct-19 »
It is weird - the only thing I can suggest is change your rendering order...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10762
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Problem 3d on Android
« Reply #4 on: 2011-Oct-19 »
maybe there's no Z-buffer in use AT ALL!?

Can someone quickly test a plane and an intersecting triangle?

Offline Minion

  • Mr. Polyvector
  • ***
  • Posts: 229
    • View Profile
Re: Problem 3d on Android
« Reply #5 on: 2011-Nov-27 »
Sorry to highjack this thread, but I too have a problem with Android and 3D and it seemed a bit silly starting up a new thread when this one will sufice. Basically, everything runs fine on the PC (Colour wise), but on my phone the image is coming back all blue ;(

The first pic is how it should look, the 2nd is how it looks on my phone (ive manually edited it to look like that, cant get a decent snap shot of the actual phone screen, sorry). It looks like there is no red or green component.

[attachment deleted by admin]

MrTAToad

  • Guest
Re: Problem 3d on Android
« Reply #6 on: 2011-Nov-27 »
Are you using ambient lighting or a spot light ?

Offline Minion

  • Mr. Polyvector
  • ***
  • Posts: 229
    • View Profile
Re: Problem 3d on Android
« Reply #7 on: 2011-Nov-27 »
Thankyou MrTAToad. Its my first venture into 3D (In GLB) and had assumed that some form of lighting was required, so had an ambient light of 0xffffff. Had I tried without that it works fine. Thank you. Now... this ambient light problem with Android ..... ;)

MrTAToad

  • Guest
Re: Problem 3d on Android
« Reply #8 on: 2011-Nov-27 »
That ambient light value should be fine (and should be white) - I presume you use RGB(255,255,255)

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: Problem 3d on Android
« Reply #9 on: 2014-May-30 »
This seems to be still a an issue as X_ENABLE_Z has no effect in Android. When setting X_ENABLE_Z as false in WIN32 is what it looks like on the Android. For just one object only and it is fine with the camera internally, but external display the X_OBJADDVERTEX group order.

Can this be set? Otherwise I'll break down objects and z-ordering so without having the camera on the inside/backside. For example, a wall with four sides as one object should be four object walls pushmatrixed as a room.


Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: Problem 3d on Android
« Reply #10 on: 2014-May-30 »
My recomendation Minion(Wellcome) it's use the Kanonet Library of OpenGL or mine... Kanonet it's better done but mine have a bit more of contorl over the lights...
GLbasic by default it' a bit poor in 3D... but you can do cool things using AO, and global ilumination from a 3D suite.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4349
    • View Profile
    • FUED
Re: Problem 3d on Android
« Reply #11 on: 2014-May-30 »
Hi Mental, the thread is old, it is more about Matchy´s latest question, which unfortunantly I have no clue about.

Would your or kanonet´s lib work on android?

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3372
  • Integrated Brain
    • View Profile
Re: Problem 3d on Android
« Reply #12 on: 2014-May-30 »
JAJAJ!!!  =D =D I read the question of Minion and I thinked was this...

About the Libraries, I think the Kanonet have to work... mine yes works in anyplace... I only take the OpenGlES 1.1 and make more commands... I test in devices like PalmPre and runs fine... I'm not sure 100% all commands runs fine , but you can do more interesting things than using the default with GLBasic.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1545
    • View Profile
Re: Problem 3d on Android
« Reply #13 on: 2014-May-31 »
Could it be simply a inline opengl command for enabling the (object face) zorder?
I have used Kanonet's libESL but the OpenGL commands relate to light. mentalthink, where is your library?
 :whistle:
Experimentally, from the camera origin I radially draw objects in zorder fine. So now I would have to reallocate how an object would be drawn with software face culling. Let's say, a cube is created with the front, back, left, right, top and then bottom. To view this from another angle, either a fixed or runtime object would be used.
« Last Edit: 2014-May-31 by matchy »

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1142
    • View Profile
    • My GLBasic code archiv
Re: Problem 3d on Android
« Reply #14 on: 2014-May-31 »
I dont really understand what you want to do/is not working.

I think mental was talking about my light fixes, even though its no lib, more a demonstration how to do it.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64