GP2X-WIZ | 3D, no display | Resolved - examples included.

Previous topic - Next topic

KermEd

Hopefully some one can assist me,

I purchased this program hoping to hobble together a simple 3D app for fun on my GP2X-Wiz.

Of course, I couldn't verify first if the 3D would work - because its restricted in the trial mode and disabled.  So I gave in and purchased.

Now I can run 3D stuff fine from GLBASIC on Windows.  But when I port any 3D code to the GP2X-Wiz it doesn't show anything.  What happens is - you launch the software and the second it switches to 3D mode it does not display anything.  Switching back to 2D mode - everything displays fine.  Apparently there was an issue before that was 'resolved' in an update.  But this does not appear to be the case anymore.

http://www.glbasic.com/forum/index.php?action=profile;u=1078

This includes the Sample(s) included in the help file:

Am I missing something or does it really not work at all?

Version 1.2.1
Firmware: 2.6.24 Rev 327
GLBasic:  7.203

Code (glbasic) Select


// Pyramid demo
// ------------

// Create a Pyramid
X_OBJSTART 5
  X_OBJADDVERTEX -5, -10, -5, 0,0,RGB(0,0,255)
  X_OBJADDVERTEX  5, -10, -5, 0,0,RGB(0,0,255)
  X_OBJADDVERTEX  0,   0,  0, 0,0,RGB(255,255,255) // Peak
  X_OBJADDVERTEX  5, -10,  5, 0,0,RGB(0,0,255)
  X_OBJADDVERTEX -5, -10,  5, 0,0,RGB(0,0,255)
// ..new Group
  X_OBJNEWGROUP
// ...or Bottom
//  X_OBJADDVERTEX  5, -10, -5, 0,0,RGB(0,0,255)
//  X_OBJADDVERTEX -5, -10, -5, 0,0,RGB(0,0,255)

  X_OBJADDVERTEX -5, -10, -5, 0,0,RGB(0,0,255)
  X_OBJADDVERTEX  0,  0,   0, 0,0,RGB(255,255,255)
  X_OBJADDVERTEX -5, -10,  5, 0,0,RGB(0,0,255)
X_OBJEND

//  X_SAVEOBJ "Pyramid.ddd", 5
//  X_LOADOBJ "Pyramid.ddd", 5

SYSTEMPOINTER TRUE


WHILE TRUE
  MOUSESTATE mx, my, b1 ,b2
  phi=mx*360 / 640

  X_MAKE3D 1,1000,45 // Viewport 3D
  X_CAMERA 0, 150, -300,   0 ,0 ,0
  X_DRAWAXES 50, 50, 0

  X_AMBIENT_LT 0, RGB(255,255,0)

  X_MOVEMENT (mx*-1)+230, 100, 0
  X_SCALING 3, 3, 3
  X_ROTATION phi, 0, 1, 0
  X_DRAWOBJ 5, 0

  SHOWSCREEN
WEND
END



I thought I had read that it uses a software renderer.  Wouldn't this mean the Wiz is fine the problem is with GLBASIC?  2D applications work fine, and I tried multiple 3D code snippets - all with the same result.  I've included the compiled version.

Does anyone have code that works for a basic 3d object?

[attachment deleted by admin]

Ian Price

3D on Wiz is not working properly at all :(
I came. I saw. I played.

KermEd

#2
Okay good, so its not just me.

I'll have to rethink my goals - I wish I knew this before I purchased :)  I went with glbasic because Kitty mentioned on several threads that 3D is fairly decent and fine.  No wonder they disabled it in the demo.  /endrant.

But at least you are seeing the same or similar results as me.  I suspect they broke the code in glbasic at some point and didn't test it in the last few builds.  They had this broken before - and fixed it once a while back according to that forum post I found.

Oh well, I should have been more suspicious earlier I guess :P

Kitty Hello

OK, found that bug. It's fixed in the next update. Sorry.

KermEd

No need to apologize Kitty - those things happen.  I was just frustrated because I need to compile for a game competition that ends next week and I wanted to be one of the few applicants to use 3d.  But I'm going to redo the game in 2D and hopefully it's usable.

mentalthink

Yes , this is a trouble about 3 or 4 updates, before de 3D on the wiz work, a little slowly but works, I wait to the next update because I want make something in 3D for the WIz.

Best regards.

Iván J.

MrTAToad


KermEd

Quote from: MrTAToad on 2010-Mar-20
Try the latest update!

I updated from inside the software.  It updated to:   7.301.  I didn't see any changes in the change-log that might indicate it would fix the problem but we tried it anyway.

I tried two new builds from the samples (including the one above) that work on Windows.  Both show only a black-screen on the GP2X-Wiz.

I tried removing the lighting too and shrinking the camera range in case it was a factor.  But the build still does the exact same thing - it looks like the:

Code (glbasic) Select
X_MAKE3D 1,1000,45

Sets the screen wrong or something.  It just stays black.

MrTAToad

There was : 3D was defect when using colours in the X_OBJADDVERTEX, but perhaps that wasn't the original problem...

mentalthink

HI MrTatoad, thanks for the reply, when I updtaed to the last the 3D turn on to works fine!!!.

Make sometime what I donÃ,´t touch GLbasic.

About the trouble of friend KermEd, perhaps, is : You updated to the last firmware of your GP2X wiz, perhaps this is you toruble,.

I maded a simple proble whit exmple of relfection donut, and itÃ,´s work at first tima and well.

Best Regards,.

Mentalthink

KermEd

Thank you everyone for the support.

@mentalthink > can you post a compiled .app?  If that works - my glbasic maybe didn't update properly.  If it doesn't work - I know its the firmware.  If its the firmware I will need to skip 3D because the testers at the coding competition are using the same firmware as me.

But at least I can test it.

I used the code to build pyramid.ddd on Windows.  And then used the following code (with the .ddd) on my GP2X Wiz.

Code (glbasic) Select
SETCURRENTDIR("Media") // seperate media and binaries?

X_LOADOBJ "Pyramid.ddd", 5

SYSTEMPOINTER TRUE

WHILE TRUE
  MOUSESTATE mx, my, b1 ,b2
  phi=mx*360 / 640

  X_MAKE3D 1,500,45 // Viewport 3D
  X_CAMERA 0, 150, -300,   0 ,0 ,0
  X_DRAWAXES 50, 50, 0

  X_MOVEMENT (mx*-1)+230, 100, 0
  X_SCALING 3, 3, 3
  X_ROTATION phi, 0, 1, 0
  X_DRAWOBJ 5, 0

  SHOWSCREEN
WEND
END



If I try your compiled app though and it works - I will re-install and see if it helps :)

mentalthink

HI KermEd, I tried you code and donÃ,´t work, the trouble can be about the resolution screen.
Try the .rar what i post here, stay the code and the .gpe for your wiz, you only view a cube rotating, you can see the cube turns on steps, is because the cube have a lot of poligons, it have a mesh smooth modifier of 3ds max.Only is a test about number of poligons support the wiz, I think is more but I donÃ,´t think can move well.

Another thing, I donÃ,´t know if you use for 3D modeling tool ,MAx,if is the case in MAX change your units in milimeters, because is more easy set up the resolutiona acording whit the wiz, an example if you make a cube, make it whit 100 mm in all his axis, after when you compile for wiz, what you see in windows probably will see it in your wiz.

Best reagrds Ivan J.

[attachment deleted by admin]

Ian Price

Yep - that cube test works for me when previous 3D attempts failed.

Cheers :)
I came. I saw. I played.

KermEd

@mentalthink

It works beautifully - thank you.  I'm going to try recompiling it on my glbasic and see what hte result is.  The code I posted (above) only works if you created the pyramid.ddd file from the glbasic help file.  But there might be something else going on with it. 

This helps, big time thanks.  I'll let you know how the compile works out.

mentalthink

HI, thanks to both for your replies.

Another little trick what I forbidden to comment, is, is case if you use 3ds max for modeling, but I think is the same in Cinema maya or another, if you make in example a plane and put a texture, probably you look the texture distorsioned, the trick is add resolution to mesh, and this problems no occurs.

And another thing, this IÃ,´m not be sre is, if you transalte to format .ddd from .obj, the FPS go more speedest than make a .ddd from .3ds, I donÃ,´t know the reason but in probad what I maded a time, whit OBJ>>ddd the wiz go very but very fast. The trouble, donÃ,´t work well when you make an unrap, for lightmap or complete map, but I think is for the chanel of UWV mapping.

I will be us ntice about this point, because I think is very interesant can be texture whit lighmaps.

Best Regards.
Mentalthink.