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 - MrFluff

Pages: [1]
1
Support / Problem with texturing
« on: August 08, 2011, 11:52:44 am »

When I import a model from a 3DS file the texture looks fine. Unfortunately I use some elaborate animations on the object so building an animated object from 3DS files isn't an option.

I included a screenshot from my app which displays the not-animated 3DS model to the most left, and 3 instances of the animated MD2 model. There are some display problems when making a screenshot on the android device with the DDMS tool when models are animated so that's why the animated models look like parts of multiple models but I guess its easy to see that the textures of the animated models look kind of placed wrong.

When I import the MD2 models I actually have 3 files: the soldier, the shield, the sword.
So I thought this might case the wrong texture mapping.
But then again I merged all these objects in my 3d dev tool and imported only a single animated MD2 file (the model in the middle which is displayed a little bit below the other models) which didn't help in any way.

How can I use the animations from the MD2 files but use the texture mapping from the 3DS file? Or what is the difference in texture placement anyway?

Thanks in advance :)

[attachment deleted by admin]

2
Support / Strange blit behavior with black pixels
« on: June 09, 2011, 02:05:49 pm »

I am facing a strange blit behavior when drawing textures on the screen:

When drawing an image that contains (nearly) black pixels, they get drawn transparent. This is what someone might expect when reading the docs about
FrameBuffer.blit(Texture src,
                 int srcX,
                 int srcY,
                 int destX,
                 int destY,
                 int width,
                 int height,
                 boolean transparent)

using TRANSPARENT_BLITTING.

Unfortunately, the drawing does not work correctly, and even if it would work with OPAQUE_BLITTING (which had the same behavior) I cannot use it as these images interfere with other transparent textures that are attached to 3d models (when a plane with a glow texture intersects my drawing image, no pixels of the 3d scene are drawn and the camera image in the background is fully visible on these intersecting pixels).

I thought that using the method
FrameBuffer.blit(Texture src,
                 int srcX,
                 int srcY,
                 int destX,
                 int destY,
                 int sourceWidth,
                 int sourceHeight,
                 int destWidth,
                 int destHeight,
                 int transValue,
                 boolean additive,
                 RGBColor addColor)


might help but I failed in getting another outcome than the one shown in the image.

Is there any possibility in preventing this filtering of (nearly) black pixels?

[attachment deleted by admin]

3
Hi there, whats the best way of displaying the same animated model (NOT using the same animation name and animation time) multiple times in a scene.

When using static models i can just use the cloneObject() method or use new Object3d(obj), but using animated models the animation is copied as well and all models are animated synchronously.
Right now I actually use Loader.loadMD2 each time to get a new model into the scene.

Thx for the help :)

Pages: [1]