• Content count

  • Joined

  • Last visited

Community Reputation

123 Neutral

About Der_Therion

  • Rank
  1. Hello @ All, i am working on a SpaceSim with Android (later porting to IOS) , 3 Weeks ago i ported the Engine from Open GL ES 1.0 to 2.0. (Android Level 10. (2.3) Everything works fine while testing on all devices i can get .... till i tested on a Motorola Atrix / Mobile and Tablet. It seems that the Tegra Chip eating up my Textures...researching in google shows me only that this chipset got a different compressions... but i dont know what to do with this information. Some of the Textures looks like stranges lines , an some are working perfekt (the "Schrift.png" is a 512x512png is working perfekt (its my GUI and Fonts)) the planet textures are disturbed (Only on this Device) the effect mostly hit the mimapped larger textures (all are power of 2 and largest is 1024x512) The geometry of the objects seems all to be working good, depth buffers,position of objekts... Maybe an error in my GL ES 2.0 texture loading Code: Can anybody help me? Greetings Theri [source]GLES20.glGenTextures(max_textures_loading, textures, 0); public void loadtextur(int textur_id,Context context) { int resource=R.drawable.icon; if (textur_id==0) resource=R.drawable.schrift; if (textur_id==2) resource=R.drawable.planet_1; if (textur_id==2) resource=R.drawable.raster; if (textur_id==3) resource=R.drawable.verlauf; if (textur_id==5) resource=R.drawable.sun; if (textur_id==6) resource=R.drawable.shadow; if (textur_id==7) resource=R.drawable.sterne_1; if (textur_id==8) resource=R.drawable.sterne_2; if (textur_id==9) resource=R.drawable.sterne_3; if (textur_id==10) resource=R.drawable.sterne_4; if (textur_id==11) resource=R.drawable.sterne_5; if (textur_id==12) resource=R.drawable.sterne_6; if (textur_id==13) resource=R.drawable.nebel_1; if (textur_id==14) resource=R.drawable.nebel_2; if (textur_id==15) resource=R.drawable.nebel_3; if (textur_id==16) resource=R.drawable.nebel_4; if (textur_id==17) resource=R.drawable.nebel_5; if (textur_id==18) resource=R.drawable.nebel_6; if (textur_id==19) resource=R.drawable.hintergrund; if (textur_id==20) resource=R.drawable.wolken; if (textur_id==21) resource=R.drawable.planet_1; if (textur_id==23) resource=R.drawable.planet_3; if (textur_id==24) resource=R.drawable.planet_4; //NEU BitmapFactory.Options bitmapOptions = new BitmapFactory.Options(); bitmapOptions.inScaled = false; bitmap = BitmapFactory.decodeResource(context.getResources(), resource, bitmapOptions); bitmap = Bitmap.createBitmap(bitmap, 0, 0,bitmap.getWidth(), bitmap.getHeight()); boolean mipmap_ok=true; if (textur_id==0) mipmap_ok=false; GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textures[textur_id]); // Only a try/test // GLES20.glPixelStorei(GLES20.GL_PACK_ALIGNMENT, 4); //GLES20.glPixelStorei(GLES20.GL_PACK_ALIGNMENT, 1); // MipMap Linear als Standart GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR_MIPMAP_NEAREST); //_MIPMAP_NEAREST if (mipmap_ok==false) { GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); } // Wrap Repeat als Standart GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_REPEAT); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_REPEAT); GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, bitmap, 0); if (mipmap_ok==true) { GLES20.glHint(GLES20.GL_GENERATE_MIPMAP_HINT, GLES20.GL_NICEST); GLES20.glGenerateMipmap(GLES20.GL_TEXTURE_2D); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GL11.GL_GENERATE_MIPMAP, GL11.GL_TRUE); } // Erzeuge MipMaps // GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GL11.GL_GENERATE_MIPMAP, GL11.GL_TRUE); bitmap.recycle(); if (textures[textur_id] == 0) { throw new RuntimeException("Error loading texture."); } } [/source]
  2. SpaceGame Background Stars via Skybox/Dome?

    i try the textures tomorrow (need some sleep) but at the first look of the texture i see something intressting... the pointsprites in mein demo always facing the camera... in the cubemap textures they do not...
  3. SpaceGame Background Stars via Skybox/Dome?

    here a small picture of the problem and what i do.. i render the same scene to 6 fbo textures (changing camera angel) and the camera got an view range of 90 degrees the stars are pointsprites (with a little alpha color..the more of them overlapping the more the "blue" color becomes visible) the pointspite work a following... the matrix is rotated around the camera so that the pointsprites always facing the camera when rendered into the fbo in this picture you see the connection of 3 fbo see that the rendering of the stars fit...but i see the edge of the box...hard to describe [img][/img]
  4. Hello @all, i am work on some ideas for an 3d space this point its about the stars background. (its not a problem to create a starfield jpg with gimp2), more the problem is.. the background is dynamicly created when entering the system/orbit of an planet.. but how to handle the background in 3d.. at moment i create 6 face in FBO Textures with view angle of 90 (rendered each with same scenario,but different view angels) and put them in a skybox and i always still see the edges of the there any other method i can use? do you have a hint/link for an good page about rendering planets/athomsperic effects etc? (at the end the planets surfaces/clouds is created get a giant amount a different planets) anybody remember StarGilder2 in the 1988 much thanks
  5. Hello @ All, i got an working 3 Vector rotation system (X;Y;Z) for an space sim game, but now i want to set the rotation in opengl for the objects(and later the camera) orientate the object to the z orientation vector is very easy with this formula: //vx,vy,vz holds the Z vector float wi_r1=get_winkel(vx,vz); //get angle of vx,vz) float wi_r2=get_winkel( get_entf_2d(vx,vz),vy ); //get angle of distance (vx,vz)/vy gl.glRotatef(wi_r1, 0, 1, 0); gl.glRotatef(wi_r2+90, 1, 0, 0); this is working absolutly perfect but my problem is the roll gl.glRotatef(roll, 0, 0, 1); how do i calculate an float value from the Vx/Vy/Vz vectors the setup for the opengl [b][u][size="6"]**UPDATE**[/size][/u][/b] the [u]glulookat[/u] function set up my camera 100% correct (even with roll by giving the up vector) now i only need the same thing to the painted objects [size="4"]//[b]camera[/b][/size] gl.glMatrixMode(GL2.GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective( pvi, asp, near,far ); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glLoadIdentity(); gl.glTranslatef(0,0,camera_distance); glu.gluLookAt(vector[0],vector[1],vector[2], // origin the Z Vector 0,0,0, //targeting the zero origin vector[6],vector[7],vector[8]); //up vector (Y) ... and here i need the same like the glulookat do... gl.glPushMatrix(); texture[9].bind(); // rotate to vetctors gl.glCallList(2005); gl.glPopMatrix(); much greetings [img][/img]
  6. Hello @all, i try to use my own custom mipmaps for an textur atlas in JOGL2 for (i hope) avoiding the texture bleeding thing. my problem is that i dont know how to load in JOGL2 for example a --> ground_level1.png into ground_texture(mip-level1) ->> ground_level2.png into mip-level2....... the auto-mipmap produces the bleeding border around ... but there is no tutorial for jogl2 for doing that mipmap stuff. thanks for all help theri
  7. 3d to 2d problem

    is there any tutorial about that?
  8. 3d to 2d problem

    Hello i write an 3d engine for Flash and so i have to do all the 3d stuff for myself i am on a litte problem with the mathematics screen_x=((vx*400)/vz)+screen_x_center; screen_y=((vy*400)/vz)+screen_y_center; this works perfect, but when my triangles calculated with this reach the vector vz<=0 then i got crazy artefacts how i had to change the math to get correct triangles the quads/triangles on the sky are also wrong (they belong to the floor and are normally behind me/viewcam ) what can i do? greetings (and sorry for my bad english)