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

Pages: 1 [2] 3 4 ... 8
16
Support / weird animation
« on: March 20, 2013, 05:39:57 am »
murphy is with me nowadays ???

please have a look at the videos below. the first one is how ball animation should look. the second is how it looks in the game.

http://aptalkarga.com/tmp/ball_correct.3gp
http://aptalkarga.com/tmp/ball_wtf.3gp

it was working ok till a recent release (not sure which one) now it isnt. i've tried to setup a test case based on hello world example, and the videos are actually taken from that app. I've noticed if I call Object3D.build() on ball, animation runs correct. but that doesnt help in actual game ??? I've copied all the Config.xx settings to hello world example but couldnt reproduce the probem there.

it runs ok on desktop version.

below is the serialized ball file. there is nothing fancy, just two key frames. it's loaded via Loader.loadSerializedObject(..)
http://aptalkarga.com/tmp/ball_anim.ser

the weirdness looks like some vertices are shared among polygons but I cant see the reason.

any ideas?

17
Support / resizing FrameBuffer and shadows
« on: March 12, 2013, 09:05:44 pm »
I faced another weird situation. if I resize FrameBuffer when shadows are on, size change isn't reflected. FrameBuffer.getWidth/Height returns the correct values but buffer is rendered as initial size.

this is what I get by resizing 800x600 to 1024x768


reverse is also true. this is what I get by a resizing a higher resolution to 800x600


If I disable shadows and resize screen again, everything seems ok. but after enabling shadows and resizing I end up with initial size.

I've updated my driver twice and even made a bios  update.

and this is the sequence of rendering:

Code: [Select]
skyBox render / draw
clearZBuffer
world render/draw
shadowHelper.updateShadowMap
shadowHelper.drawScene
buffer update/display

really weird ???

18
Support / A few questions about shadows
« on: March 11, 2013, 01:33:00 am »
playing with shadows is fun :)

please see the image below, the ball's shadow is casted to tile below it and to tile below that tile. how can I prevent it?


19
Support / VideoModes that don't fit into screen
« on: March 10, 2013, 08:35:38 pm »
FrameBuffer.getVideoModes may return a mode that does not fit into current screen. for example my screen is 1920x1080 but 1600x1200 is returned in list. or even if I set my screen resolution to something lower, 1600x1200 and 1920x1080 are still in list. I guess, there is nothing wrong with this, since my video card supports that modes.

after setting video mode, I end up with a FrameBuffer that just doesn't fit into screen.

Display.getWidth()/getHeight() returns the invalid value just after calling Display.setDisplayMode(..) but later on returns the corrected values.

so, how to handle this?
* filter modes that does not fit (based on what? awt toolkit?)
* in render loop, check Display.width/height matches FrameBuffer.width/height and correct if required

20
Support / weird rendering artifact
« on: March 07, 2013, 11:44:20 pm »
i've faced a weird rendering artifact which I couldnt still find a reason. please see the video below:

aptalkarga.com/tmp/skymaze_weird.avi

this only and only happens, when resolution is changed (FrameBuffer is recreated) during initial intro rotation and rotation is resumed afterwards. while capturing video somehow it ended prematurely but in real case always ends when rotation stops. does not happen if rotation is restarted or display changed after rotation. ends immediately if rotation is stopped manually.

seems like a multi threading issue but I see no reason for that. all gui code is rendered in GL thread.

really weird, any ideas?

21
Support / unloading texture
« on: February 16, 2013, 05:21:38 am »
two things:

1. Desktop and AE behaves differently when unloading a texture.
Code: [Select]
TextureManager tm = TextureManager.getInstance();

tm.addTexture("box", new Texture("box.jpg"));
tm.unloadTexture(buffer, tm.getTexture("box"));
tm.addTexture("box", new Texture("box.jpg"));

this code creates an error on desktop, saying texture 'box' has been declared twice. it runs okey on AE

2. on Desktop, after removing/unloading and re-adding, we end up with a white texture
Code: [Select]
TextureManager tm = TextureManager.getInstance();

tm.addTexture("box", new Texture("box.jpg"));
tm.removeAndUnload("box", buffer);
tm.addTexture("box", new Texture("box.jpg"));



22
Support / near plane setting changes blit location
« on: February 15, 2013, 09:29:28 pm »
for example the setting below causes blit locations expanded: a blit at 0,0 is displayed at -x,-y

Code: [Select]
Config.nearPlane = 0.9f;
Config.glIgnoreNearPlane = false;

indeed this was fixed before but somehow broken again. see this post

i'm using jpct 2.6 and lwjgl 2.8.5

23
Support / ArrayIndexOutOfBoundsException in Object3D.init
« on: July 20, 2012, 06:38:06 pm »
I'm creating an Object3D by supplying coordinates array:

Code: [Select]
new Object3D(coordinates[142509], uvs[95006], indices[480], TextureManager.TEXTURE_NOTFOUND);
numbers indicate the actual length of arrays. this code throws an java.lang.ArrayIndexOutOfBoundsException: 731. I dont know where that 731 comes from ::)

here is a test case:

Code: [Select]
public class MeshTest {

public static void main(String[] args) throws Exception {
String file = "C:/tmp/bones_tmp/test_mesh.ser";

            FileInputStream fis = new FileInputStream(file);
ObjectInputStream in = new ObjectInputStream(fis);

float[] coordinates = (float[]) in.readObject();
float[] uvs = (float[]) in.readObject();
int[] indices = (int[]) in.readObject();

fis.close();

new Object3D(coordinates, uvs, indices, TextureManager.TEXTURE_NOTFOUND);

}

}

and test data: http://aptalkarga.com/tmp/test_mesh.ser

24
Support / blitting and GL color
« on: April 08, 2012, 06:09:27 pm »
I'm drawing some lines to screen via GL calls for debugging purposes. I set the color with the call

Code: [Select]
GL10.glColor4f(..);
this normally works fine. but if I do this after blitting text, with the call

Code: [Select]
FrameBuffer.blit(.. RGBColor addColor)
my glColor4f call does not work any more. instead all lines are drawn in the last color passed to FrameBuffer.blit.

any ideas what may cause this?

25
Bugs / creating Object3D with no indices
« on: December 28, 2011, 12:25:39 pm »
this call
Code: [Select]
new Object3D(new float[12], null, null, -1);
throws a
Code: [Select]
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
at com.threed.jpct.Object3D.<init>(Unknown Source)

I guess this is a bug

26
Bones / MOVED: Translating an Object3D to the touch point
« on: November 23, 2011, 04:43:09 pm »

27
Support / FrameBuffer.getPixels()
« on: September 21, 2011, 09:23:48 pm »
Does FrameBuffer.getPixels() create a new pixel array all the time? If so, is it possible to add a variant which accepts an int array?

28
Support / hw acceleration on emulator
« on: May 18, 2011, 02:46:25 am »
seems as finally google started working on it and will be available soon ;D

for more information have a look at below video around 43rd minute:
http://androidappdocs.appspot.com/videos

29
Feedback / imageshack images
« on: February 27, 2011, 10:35:25 am »
i can't see most of the images hosted at imageshack.us, instead i see an image saying domain is not registered:



does anybody know what's going on?

30
Support / unload and replace a texture
« on: January 17, 2011, 04:21:45 am »
-in terms of memory usage- what's the best way of replacing a texture?

i sometimes got an OutOfMemoryError after replacing skybox textures, typically at prewarm stage. if i do removeAndUnload first instead of replacing i end up with white empty textures. i may be doing something wrong with removeAndUnload thing.

Pages: 1 [2] 3 4 ... 8