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.


Messages - dubbox

Pages: [1] 2
1
Support / Re: How to get Object3D's Position when loaded from .3ds
« on: January 02, 2015, 01:03:13 am »
Thats a nice workaround so i just dont add thrse objects to the world object and they wont be rendered but i can use their positions :)

2
Support / Re: How to get Object3D's Position when loaded from .3ds
« on: January 01, 2015, 09:28:37 pm »
Thank you very much now it works just fine :))

Do you know if empties do work with jpct? Empties are just objects without meshes just a position

3
Support / Re: How to get Object3D's Position when loaded from .3ds
« on: January 01, 2015, 07:57:51 pm »
Its all in one file bute in that file are multiple objects so when i use the loader class i get an Object3d array of the size 36 so i have to seperate each object to an extra file?

4
Support / Re: How to get Object3D's Position when loaded from .3ds
« on: January 01, 2015, 07:36:06 pm »
The thing is i have build an building in blender and want to implement listeners to open doors when you are near to them so i have to Check for the position of the door

i can read the position in blender and set the camera to it then i am really at the position like i am in blender but i cannot access this position by calling any method in jpct it would be nicer to read it in jpct

5
Support / How to get Object3D's Position when loaded from .3ds
« on: January 01, 2015, 05:53:19 pm »
I am confused all the get Methods which return a SimpleVector for the Object3D are not the ones i am looking for nearly all are 0,0,0,0

I just want to get the Position or Translation (the getTranslation Method does not work for me its 0,0,0,0) of an Object created in Blender and saved as .3ds file

In Blender for example a created cube is at 4,5,1 so how can i get this position after loading it into jpct-ae?

The getName() Method works nicely so i just want to get the Name and the position so i get something like :
"Cube001 at (4,5,1)"

6
Support / Re: Blitting shows in Emulator but not on Smartphone HELP
« on: October 07, 2014, 09:14:04 pm »
i am uploading it to dropbox rigth now

so i tested the button clicks are applied you can see that cause i move the cam when clicked on a button rigth so if you click where the buttons should be you will cause the camera to move and it happens so the blitting seems to bug :
i am glad you help would be lost without you

7
Support / Re: Blitting shows in Emulator but not on Smartphone HELP
« on: October 07, 2014, 08:59:38 pm »
Ill test it with an logoutput when pressing the buttons location ill get the location the same way like the of the buttons if that wont help ill send you my project Folder but can i do that oer private medsage or do i need your mail cause of size restrictions ?

8
Support / Re: Blitting shows in Emulator but not on Smartphone HELP
« on: October 07, 2014, 07:47:17 pm »
Could it possibly be that its cause i dobt use the display.size method cause i wanted it to work for older api levels too so i used display.getwidth and height to get the screen size and so zhe buttons are posted somewhere outside the screen ??

9
Support / Re: Blitting shows in Emulator but not on Smartphone HELP
« on: October 07, 2014, 07:44:33 pm »
Shall i send you the .apk or the project folder and how shall i give it to you ?

10
Support / Re: Blitting shows in Emulator but not on Smartphone HELP
« on: October 07, 2014, 07:16:03 pm »
I am using a Samsung Galaxy S lll and a ARM Mali-400-MP-GPU i think maybe it is an export issue because i think the gpu should not be the problem or ?

and is there another way i coukd implement these buttons so it will work properly ?

11
Support / Blitting shows in Emulator but not on Smartphone HELP
« on: October 07, 2014, 06:22:57 pm »
Hello since im new to Texturing i am gonna need to ask you another question and hope you can help again

i am quiet confused because i worked out how to blit tetures to use them as gui elements and so i implemented 2 buttons with 4 textures 2 per each (one pressed one normal)

everything works fine the emulator shows all the buttons and the clicking effects working nicely

but now i loaded the .apk to my smartphone and i cant see any of the buttons i added i thought blitting is for android
i checked twice if i had exported the rigth way etc i dont know what i am doing false everything runs on smartphone without errors but no buttons are visible


here i add the textures to the texturemanager in the onsurfacecreated method
Code: [Select]
bhn = new Texture(getAssets().open("Buttons/bhn.png"));
bhp = new Texture(getAssets().open("Buttons/bhp.png"));

bfn = new Texture(getAssets().open("Buttons/bfn.png"));
bfp = new Texture(getAssets().open("Buttons/bfp.png"));
} catch (IOException e) {
e.printStackTrace();
}
if(!tm.containsTexture("bhn"))
tm.addTexture("bhn", bhn);
if(!tm.containsTexture("bhp"))
tm.addTexture("bhp", bhp);

if(!tm.containsTexture("bfn"))
tm.addTexture("bfn", bfn);
if(!tm.containsTexture("bfp"))
tm.addTexture("bfp", bfp);
}

and here i blit them in the ondrawframe method

Code: [Select]
fb.clear(back);
world.renderScene(fb);
world.draw(fb);

//Blitting
fb.blit(tm.getTexture(bh), 0, 0, bhnX, bhnY
,128 ,128 , buttonWidth, buttonHeight, 100, false, null);
fb.blit(tm.getTexture(bf), 0, 0, bfnX, bfnY
,128 ,128 , buttonWidth, buttonHeight, 100, false, null);
fb.display();

i am kind of helpless rigth here because i am new to jpct ae and all that stuff and there is no error output i could watch
i hope you guys can think of a cause for my problem or maybe you had the same so please share your opinions with me

thank you all for your help

12
Support / Re: Question on Multitexturing
« on: October 07, 2014, 01:48:09 pm »
Thank you Egon you are the man :D

simple problems and you give directly simple solutions :)

13
Support / Question on Multitexturing
« on: October 05, 2014, 05:12:51 pm »

SOLVED

Hello it is me again :D

Thanks to the help of Egon i applied textures to my .3ds object and load it successfully into android

now i got another question i have read all the posts about multitexturing but i still have a question about it

In some posts its said that .3ds doest not support multi texturing but there is also said that you can apply multiple textures by using the TExtureManager with the rigth names

so what do i have to do?

Do i have to load my model splitted up by texture like one .3ds file for the roof with the roof texture
 another .3ds for the wall with the wall texture

and then merge them together

or

do i have to apply all the textures on one .3ds model and use the texture names for the texture manager??

i tried it using the texturemanager but i am not getting it to work the textures are not showed at all

so what is the best way and maybe some explination code would help
thank you

this is my code right now

Code: [Select]
try {
Texture teppich=new Texture(assetManager.open("teppichHems.jpg"));
Texture decke=new Texture(assetManager.open("StyroporDecke.jpg"));
Texture wand=new Texture(assetManager.open("WandBlech.jpg"));

TextureManager.getInstance().addTexture("Texture.001", teppich);
TextureManager.getInstance().addTexture("Texture", decke);
TextureManager.getInstance().addTexture("Texture.002", wand);
} catch (IOException e) {
e.printStackTrace();
}


    try {
model = Loader.load3DS( assetManager.open("thirdfloorAndroid.3ds"), 1);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

14
sorry for not giving you feedback i was busy

it was just an emulator bug on my smartphone everything is fine so its all good

thank you for your fast help egon

15
thanks egon !!!

but now there is another problem

i created the model using blender and everything looks rigth the texture is applied via uv-map and is saved correctly
but when i add the tex onto the model in java and move the camera it gets the effect like a fisheye sorry dont know how to explain it but the tex near to the camera looks like the camera would be a fisheye how can i avoid this?

thanks for your great help and work Egon  :)

Pages: [1] 2