www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Uncle Ray on September 23, 2014, 06:16:48 am

Title: Is there a way to set several textures into one object3D?
Post by: Uncle Ray on September 23, 2014, 06:16:48 am
SOLVED THX EGO



In my project, there is 5 or 6 textures with one object3D.
here is my solution:
one:combined several jpgs into a big one,i think the new big one's resolution would be very large,may be fall down the jpct's fps?

the other one:split the big model(for example,A.md2)into several smaller model(a1.md2,a2,md2,a3.md2.....);
so every new small Object3D just set the only one texture

question:
which way is the best fps?
And more,is there a better way to set several texture into a one model?
Thx,ego.
Title: Re: Is there a way to set several textures into one object3D?
Post by: EgonOlsen on September 23, 2014, 08:07:21 am
The way with putting them all into one texture is usually faster, because it reduces the number of draw calls, which are expensive. It has some drawbacks like being less flexible if you want to change a texture at runtime and possible texture bleeding because of the bilinear filtering that might take pixels from an adjacent texture. But if these things aren't an issue, it faster in most cases.