[Fixd]Issues with Wings3d .obj files not rendering correctly

Anything libgdx related goes here!

Re: Issues with Wings3d .obj files not rendering correctly

Postby mzechner » Thu Dec 23, 2010 2:35 am

waiting :)

@eclipse: no idea what's going wrong on your side. I tested the trunk buildability as follows:

- clean new Eclipse "installation"
- Installation of latest ADT pointing to an installation of the latest Android SDK
- clean new SVN trunk checkout
- import of the directory i checked out the trunk to
- Project -> Clean -> all projects

No issues :/

edit: 3:45, going to bed now.
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: Issues with Wings3d .obj files not rendering correctly

Postby tamas305 » Thu Dec 23, 2010 2:50 am

Okay, this is bad. It works fine in the emulator. I'm still seeing the white ship on my galaxy s. :/

Any ideas?
tamas305
 
Posts: 108
Joined: Sat Nov 06, 2010 1:51 pm

Re: Issues with Wings3d .obj files not rendering correctly

Postby mzechner » Thu Dec 23, 2010 3:18 am

Try the shiptexture.png in the assets/data folder of the gdx-tests-android project. Replace yours with that one. Android has some nice problems with loading some PNGs.

edit: meh, tired brain. as it runs on the emulator it's probably not Bitmap related. Try it anyways. I can't reproduce the issue on neither my Droid, the Nexus One or the Hero.

If nothing helps send me your project via e-mail unless it contains super secret rocket science. Consider this a one time christmas present :)
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: Issues with Wings3d .obj files not rendering correctly

Postby tamas305 » Thu Dec 23, 2010 3:24 am

Haha sounds good. It's nothing too special...most of the work that I have done is the super special meshes (like the one in this example :D ).

Thanks for the help again!
-Tamas
tamas305
 
Posts: 108
Joined: Sat Nov 06, 2010 1:51 pm

Re: Issues with Wings3d .obj files not rendering correctly

Postby mzechner » Thu Dec 23, 2010 6:24 am

Was able to reproduce it on my Droid. It seems that the image itself is the culprit. I've came across this issue a couple of times already. Android seems to have problems with some PNGs. Robert from Battery Powered Games ran into the same issue a couple of times already. We both couldn't find out yet what the issue is. It seems to be related to mip mapping as well. Why that is completely illudes me. We still use GLUtils to upload the texture data, also in the mip mapped case. We'll change that in the future as GLUtils is riddled with bugs it seems.

Take your image and save it as a jpeg with 100% quality. That made it work here (with your project). Alternatively specify TextureFilter.Linear instead of TextureFilter.MipMap when you load the texture. That will work with the original PNG as well.
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: [Fixd]Issues with Wings3d .obj files not rendering corre

Postby tamas305 » Thu Dec 23, 2010 7:33 pm

Thanks! That did it (Linear method). A quick question that is somewhat related. How did you make your player ship have linked polygons (you click one one it selects it's identical copy on the other side) and how did you export this ship from wings? It has two mirror images and one texture that applies to both halves. When I export it, I end up with only half of the ship. :shock:
tamas305
 
Posts: 108
Joined: Sat Nov 06, 2010 1:51 pm

Re: [Fixd]Issues with Wings3d .obj files not rendering corre

Postby mzechner » Fri Dec 24, 2010 8:22 am

Oh, that's a fancy Wings3D feature called virtual mirror. I usually start of with a cube, box model one half of the object, insert an edge loop in the middle (e.g. the z/y plane) and remove the other unfinished half. You end up with a polygon in the z/y plane that you then can select. Once selected go to Tools -> Virtual Mirror and select Create. From now on everything you do on the one side will be reflected on the other side. Great for symmetrical objects.

If you want to export it just select your complete model, go to Tools -> Virtual Mirror and select Freeze. I think the Wings3D documentation has a good section on that feature as well, better than i can explain it at least :)
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Previous

Return to Libgdx

Who is online

Users browsing this forum: No registered users and 1 guest