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

Pages: [1]
1
Support / Rendering on a part of the screen
« on: August 14, 2013, 05:57:00 pm »
Hey!
Is there a way of rendering only on a part of the screen?
I have a blitted game menu and i would like to show a preview of the current selected item (in 3D) on it.

2
Hey!
I'm currently stuck at a weird problem.
This works and show exactly what i wan't:
Code: [Select]
else
{
fb.blit(this.background, 0, 0, 0, 0, 512, 256, width, height, -1, false);
}
But when i call this in another class it doesn't:
Code: [Select]
else
{
csssm.update(fb,this.background);
}
csssm.update():
Code: [Select]
public void update(FrameBuffer fb,Texture texture)
{
fb.blit(texture, 0, 0, 0, 0, 512, 256, width, height, -1, false);
}
There is just a blank image then...

3
Support / How to lock translations?
« on: July 30, 2013, 05:52:44 pm »
Hey!
At first, i wan't to translate the model to a point in the game.
Then i translate it again (with the camera Position), but  i clear the translations every frame.
When i clear the translations, the translation i made at the beginning is also cleared.
Can i lock the translation or translate it in a way that the translation doesn't get cleared when i call clearTranslations?

4
Support / How would you calculate centrifugal force?
« on: July 25, 2013, 11:05:02 pm »
Hey!
I have a spaceship flying around a planet with gravitation.
The spaceship should be able to find a stable orbit using the centrifugal force.
The gravitation is no problem, but i'm not sure about the centrifugal force.
Would it be better using a physics engine (e.g. JBullet) or trying doing that manually?
If manually, could you give me some advices how i should start?

5
Support / Camera moving towards an object
« on: July 19, 2013, 11:23:33 pm »
Hey!
I try to move my camera to an object with this line:
Code: [Select]
world.getCamera().moveCamera(planet.getCenter(), speed);Shouldn't the camera stop moving in the center?
The Camera actually moves through the center and on the other side out.
I watched the distance between the camera and the center of the object, and the center is on the right place.

6
Support / Linear Accelerometer has inaccurate values
« on: July 18, 2013, 09:35:08 pm »
Hey!
I have a object infront of my camera that is controlled by the linear accelerometer.
Unfortunaly, the object trembles always, even if i hold my phone completely still and this really hurts my eyes.
Does anyone know how to remove this trembling?
I tried rounding the values given by the sensor, but then it trembles when switching between for example 0.09 and 0.1...

7
Support / Alpha channel on texture does not work
« on: July 16, 2013, 07:08:10 pm »
Hey!
I'm trying to load a 100% transparent .png image, but in the game it's black, not transparent.
Here is what i'm using to load the texture:
Code: [Select]
tm.addTexture("earth_clouds", new Texture(this.context.getResources().openRawResource(R.raw.earth_cloudss),true));

8
Support / How to set up Parallax mapping
« on: July 15, 2013, 05:42:03 pm »
Hey!
I found the demo of Parallax mapping on youtube and also this topic in the forum: http://www.jpct.net/forum2/index.php/topic,2153.msg15839.htm
I do already have all the needed textures, but i don't know how to set up the shaders.
I found the wiki Page about shaders and tried setting it up with the GLSLShader class, but i don't know what setStaticUniform does or how i can use setRenderHook(shader) on android.
Is there a tutorial or a sample code out there?

9
Support / Out of Memory Exception while loading Textures
« on: July 13, 2013, 09:20:36 pm »
Hey!
I'm trying to set up a SkyBox, but when i try to load the textures (tm.addTexture("left",new Texture(this.context.getResources().getDrawable(R.drawable.left)));) the program crashes with an out of memory exception after 4 textures (of 6).
One texture has a size between 150 and 300 KB, all textures have 1.32 MB.
I don't know why i get a out of memory at already 1.32 MB, but does anybody know a workaround?

10
Support / How to bring a Texture on the Model?
« on: July 09, 2013, 04:53:10 pm »
Hey!
I'm new to jpct and i don't get how to allocate a texure to a Object3D.
I'm working with blender, and want to use the texture mapping blender applies to the model.
This is where i'm currently stuck:

Code: [Select]
TextureManager tm = TextureManager.getInstance();
tm.addTexture("sand",new Texture(BitmapHelper.rescale(BitmapHelper.convert(this.context.getResources().getDrawable(R.drawable.img1348666104)), 64, 64)));
InputStream dsStream = manager.open("untitled.3ds");
cube = Loader.load3DS(dsStream, 1);

world.addObjects(cube);
As expected it only shows a grey object, not my beautiful sand ;)

Pages: [1]