Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - influt

Pages: [1]
1
Support / serializing object3d with textures
« on: October 15, 2009, 06:35:40 pm »
Hello.

I am working on a game and there are several levels and player models. To my mind, the whole size of these resources is quite big for the game. So what I am trying to do is to make game client to load resources (models / textures / sounds) from the server only when they are needed. I can serialize models and levels when building a release, but the problem I am facing with is that a PolygonManager stores texture ids, not the names. Look at the following example:

I have to download one level, 3 common models and textures for all of them. A serialized object's PolygonManager knows the id of the texture for each polygon. The TextureManager has to have textures accessible by these ids. And here is the problem: when serializing, textures are read from the local disk and have their assigned ids. But these ids are different from those that are assigned when reading serialized textures (after they are downloaded) into the TextureManager. As the result, we have a model, where each polygon has a texture that was not meant to be there!
This can be solved if we will serialize the dump of the TextureManager, and then load it on a client. But that means we will have to download all textures, not just those that we need for a level.
Personally, I dont like this solution. I think that it would be great to have a model as a serialized object with all textures needed for this model in one package. Having one package for a model would be very convenient to download..
So i came to a conclusion that if jPCT had a possibility to store not just ids of textures in a PolygonManager, but texture names, that would allow me to achieve the desired effect .

Maybe I just cant see a neater solution? Maybe you can point me how can this be achieved better?

Thanks.

2
Support / a textured object passes through another
« on: November 14, 2008, 03:11:34 pm »
Hello.

Excuse me, if the same question has been already asked, but i haven't found it here.
I've got two objects: one is semi-transparent, another one is not. When standing near to those objects, everything looks ok:


but when stepping back, the one that has to be behind, passes through the nearer one:


changing glZBufferDepth in Config didn't make any effect. So how can i avoid this?
Thank you.

3
Support / sampling mode
« on: November 04, 2008, 12:51:58 pm »
Hello.

I am using a canvas renderer. Can I set sampling mode other than SAMPLINGMODE_NORMAL and how?
I've tried both setting mode to SAMPLINGMODE_GL_AA_2X and SAMPLINGMODE_GL_AA_4X, but that didn't make any effect. Although i saw that aptalkarga uses canvas renderer, too, and a user can switch between sampling modes there.

any help will be appreciated.

Pages: [1]