About scene lightmaps and scene optimisation.

Started by Wolf17, June 25, 2013, 11:03:37 AM

Previous topic - Next topic

Wolf17

      I wanted to know, can I have 2 sets of uvs for a 3d model for multitexturing (one for normal texture other for lightmap). If this is not possible is there any other suggestion.
Also I wanted to know how much polygon count ,object count ,animation are too much for a 1ghz phone.

EgonOlsen

Yes, you can do that. The only problem with it, that none of the 3d formats that are supported (3ds, obj, asc, md2...) support multiple texture layers. When i did this for example for Quake-levels, i splitted the model into two when exporting, so that one contains the normal texturing and one the lightmapping. I then loaded both and merged them into a new one like so: http://www.jpct.net/forum2/index.php/topic,1790.msg13191.html#msg13191.

About performance: It depends...a general rule is to favour polygon above object count, i.e. if you can combine single meshes into a larger one, it's worth to do so in most cases. Which device are we talking about? 1Ghz is bit vague.

Wolf17

   Wow, that means i can do lighmaps..that quake level looks awesome .
but do I have to  necessarily use desktop jpct for the serialisation?
I have jbrush which serialises level too ... can i use it somehow ?
and about the device 1ghz,512 mb/1gb ram ,adreno205 +  gpus

Wolf17

  I downloaded jpct pc , set it up , serialised the 2 merged objects. Now how to use that in android jpct.


Wolf17

  I made it ! But There is a Problem . I am getting only 16 fps with the shadowed model . Without that I get 35 to 40 fps. I don't know why the fps has fallen so drastically.

EgonOlsen

That might be caused by an increased number of draw calls. The engine batches geometry based on textures to minimize draw calls. If you apply a second layer, you might reduce the possible size of these batches (example: A mesh with 10 textures can be rendered in 10 draw calls, a mesh with 10 textures and 10 lightmaps on top might have to be splitted to 10*10=100 drawcalls). This isn't an issue if your lightmap is baked into one texture (which is the normal case). If that applies to you, it might be caused by the fact that the Adreno 205 stinks. Which OpenGL mode are you using?

Wolf17

      Oh ! I have not tried it on adreno 205 yet . I   installed it on my older device (600 mhz,512mb ram,adreno 200) thinking that if it runs in slower one, then bigger end is not a big deal.
I m using opengl es 2.0. Do you have any suggestions/fixes ? My scene really looks nice with shadows.

EgonOlsen

Depends on how your lightmaps are structured. Is it one large texture or a bunch of single ones? Apart from that, Adreno 200 with a 600Mhz cpu is really extreme low end. I wouldn't wonder if using multitexturing will bring it to its knees especially when using OpenGL 2.0.

Wolf17

   They are small individual textures. I tried it on my 1ghz phone adreno 205. and it runs nice  :D ! But still it gets  little choppy for very short time when I start my app at first . But  I am still satisfied with that!
Still if any solution to optimise it will be great.
Thank You Egon !

EgonOlsen

Quote from: Wolf17 on June 27, 2013, 08:54:55 AM
   They are small individual textures.
As mentioned, this will greatly increase the number of draw calls. If possible, combine the lightmap textures into one (or several) larger ones like quake does it.

Wolf17

   One More question . It is easy to rename an .apk file as .zip  and access the assets and resource contents. Is there a way to hide them?

Thomas.

It is not possible, you can only make it more difficult (random names, encrypted files,...). If you send me APK file I can send you java sources. This is big issue, because developer can not do anything with warez...

Wolf17

Quote from: Thomas. on June 29, 2013, 05:40:59 PM
It is not possible, you can only make it more difficult (random names, encrypted files,...).
Oh! I See! By the way , which java sources ?
Thanks for help!


Thomas.

You can get java sources of any application. It is good to know when you want to sell your app.