GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2012-Mar-24

Title: Android 3D
Post by: MrTAToad on 2012-Mar-24
As you probably all know, I've been getting my 3D programs going on an Android.  At the start, my BallZ game was running, but very slow.

So, in order to solve this I re-created the balls needed and reduced the vertice and surface count, so instead of 500 or so vertices, its now down to 196.  I think 14 segments for spheres in AC3D gives a good balance between looking like a sphere and running quickly.

So, after this change BallZ runs very smoothly...
Title: Re: Android 3D
Post by: mentalthink on 2012-Mar-24
hi MrTatoad if you need an Special Sphere whit very low polys... in 3D you can make, the traditional make it whit squares or... in 3DSmax have an special Sphere called geoSphere, this it´s make by triangulation, and well, the Spheres can have about 100 polys... if I don´t rebember bad... another trick it´s use Smooth, whit 3ds  max and Glbasic runs... this it´s only in shade mode, don´t affect to the number of polys...
Title: Re: Android 3D
Post by: kanonet on 2012-Mar-25
Did you think about using a half sphere and just "rotating" the texture? should look the same and save same polygons...
Title: Re: Android 3D
Post by: MrTAToad on 2012-Mar-25
Quote from: mentalthink on 2012-Mar-24
hi MrTatoad if you need an Special Sphere whit very low polys... in 3D you can make, the traditional make it whit squares or... in 3DSmax have an special Sphere called geoSphere, this it´s make by triangulation, and well, the Spheres can have about 100 polys... if I don´t rebember bad... another trick it´s use Smooth, whit 3ds  max and Glbasic runs... this it´s only in shade mode, don´t affect to the number of polys...
With AC3D, the lower the segments, the square the object unfortunately, although it probably can be sorted somehow...

QuoteDid you think about using a half sphere and just "rotating" the texture? should look the same and save same polygons...
Might as well go for the full shape in one go and save half the time :)
Title: Re: Android 3D
Post by: kanonet on 2012-Mar-25
Btw texture ordering saves you time (at least on the pc, dont know about android): If i remember right, you have green, red and white spheres. If you first set green texture, than draw all green spheres (without setting green texture again each time!), than set red texture, than draw all reds... etc you may safe some time, cuz setting texture each time is time consuming and not necessary.
And if you dont set a x_Spot_lt, just a X_ambient_lt (or nothing of both) its faster too. Btw you still can set a shadow casting light, even if you didnt set a x_spot_lt before.
Title: Re: Android 3D
Post by: MrTAToad on 2012-Mar-25
I must admit I always set everything for each object, mainly because I just pass a structure to a 3D display routine and let it process everything.
Title: Re: Android 3D
Post by: fuzzy70 on 2012-Mar-25
If you want to play around or try geospheres DeleD http://www.delgine.com/index.php?filename=product_deled (http://www.delgine.com/index.php?filename=product_deled) is a free modeller that can create them & easily export as a Wavefront obj into AC3D if you are more comfortable with using that.

Here is a geosphere & a standard type imported into AC3D so you can see, as well have attached the AC3D file here.

Lee

(http://i41.tinypic.com/x1nc3m.png)

[attachment deleted by admin]