Getting "Can't add 'null' to the World" in jPCT-AE

Started by SuperCreeper, December 09, 2013, 11:23:06 AM

Previous topic - Next topic

SuperCreeper

Hello! I've created the world using jBrush v0.3 and exported all files to the /assets/ folder in HelloWorld project.
I'm tried to load my world with this code:

            AssetManager am = getAssets();
            objects = Scene.loadLevelAE("testscene.txt", objects, world, am);

I placed that code in onSurfaceChanged method below the world.addObject(cube).
Here's my LogCat and piece of code:
My /assets/ folder contains now:
floor.3ds
mcgrass.png
table_lowpoly.3ds
planks02.jpg
testscene.txt

How I can fix it?
P.S. Excuse for my English, please.

Wolf17

Hello! Welcome!
Maybe you forgot to include the texture which is applied to the floor model!? :-\
Make sure to include all the assets that you can visually see in your jbrush editor. :)

SuperCreeper

Quote from: Wolf17 on December 09, 2013, 11:55:51 AM
Make sure to include all the assets that you can visually see in your jbrush editor. :)
I included all the assets.
If you need, here's what testscene.txt contains:
fp-floor.3ds on-floor tp-mcgrass.png rx-0.0 ry-0.0 rz-0.0 tx-0.0 ty-10.0 tz-0.0 oc-0 cx-0 cz-0.0 cc-true sl-false ot--1 bm-null pa-null os-1.0 st-0 sh-1
fp-table_lowpoly.3ds on-table_lowpoly tp-planks02.jpg rx-0.05 ry--0.7500001 rz-0.0 tx-0.0 ty-0.0 tz--10.0 oc-0 cx-0 cz-0.0 cc-true sl-false ot--1 bm-null pa-null os-5.5 st-0 sh-1


Wolf17

Oh ! sorry!  yes you did that!
Have you tried to recreate and reload the scene?
....Once I reach home ,I'll make an apk out of your source to see what is wrong !

SuperCreeper

Yes, I've tried to re-create and re-load my scene. But I still having these errors.

Wolf17

If Possible, may you please attach your zip here through attachment options ! It is getting corrupted when I download from the link you provided!(Strange!)

SuperCreeper

I can't attach file to the post, because file size > 64kb. So, try to download from other file hosting: https://www.dropbox.com/s/g11eyo1caqvh13e/HelloWorld-AE.zip

Wolf17

Yes I got it!  ;D
The mcgrass.png  texture you are using is of dimension 420*420 and it is not supported . Try to convert it to either 512x512 or 256x256 . You have to use power of two texture image i.e 2,4,8,32,64,128,256.512,1024.....so on.

SuperCreeper

I've resized the texture. Now it's 256x256. But I still having this problem :(

Wolf17

Maybe you should try recreating the scene in jbrush and reloading the scene..... but this time without the floor model and the texture i.e try only that table thing ! Check if that loads fine on your device!

SuperCreeper

Aw, yeah! I solved the problem! I've read some docs about AIDE, so each time I changing the files in /assets/, I must tap the "Refresh Build" button instead of "Run".
Anyway: Wolf17, thank you very much for your help!

Wolf17