need 3d format for psp for playstation game conversion

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Duo
Posts: 25
Joined: Fri Oct 21, 2005 5:15 am

need 3d format for psp for playstation game conversion

Post by Duo »

I was looking at the source for the 3d camera example:

Code: Select all

cube = {
  {0, 0, white, -1, -1,  1},  -- 0
  {2, 0, white, -1,  1,  1},  -- 4
  {2, 2, white,  1,  1,  1},  -- 5

  {0, 0, white, -1, -1,  1},  -- 0
  {2, 2, white,  1,  1,  1},  -- 5
  {0, 2, white,  1, -1,  1},  -- 1

  {0, 0, white, -1, -1, -1},  -- 3
  {2, 0, white,  1, -1, -1},  -- 2
  {2, 2, white,  1,  1, -1},  -- 6

  {0, 0, white, -1, -1, -1},  -- 3
  {2, 2, white,  1,  1, -1},  -- 6
  {0, 2, white, -1,  1, -1},  -- 7

  {0, 0, white,  1, -1, -1},  -- 0
  {2, 0, white,  1, -1,  1},  -- 3
  {2, 2, white,  1,  1,  1},  -- 7

  {0, 0, white,  1, -1, -1},  -- 0
  {2, 2, white,  1,  1,  1},  -- 7
  {0, 2, white,  1,  1, -1},  -- 4

  {0, 0, white, -1, -1, -1},  -- 0
  {2, 0, white, -1,  1, -1},  -- 3
  {2, 2, white, -1,  1,  1},  -- 7

  {0, 0, white, -1, -1, -1},  -- 0
  {2, 2, white, -1,  1,  1},  -- 7
  {0, 2, white, -1, -1,  1},  -- 4

  {0, 0, white, -1,  1, -1},  -- 0
  {2, 0, white,  1,  1, -1},  -- 1
  {2, 2, white,  1,  1,  1},  -- 2

  {0, 0, white, -1,  1, -1},  -- 0
  {2, 2, white,  1,  1,  1},  -- 2
  {0, 2, white, -1,  1,  1},  -- 3

  {0, 0, white, -1, -1, -1},  -- 4
  {2, 0, white, -1, -1,  1},  -- 7
  {2, 2, white,  1, -1,  1},  -- 6

  {0, 0, white, -1, -1, -1},  -- 4
  {2, 2, white,  1, -1,  1},  -- 6
  {0, 2, white,  1, -1, -1},  -- 5
}
That is for the box in lua. How is this code generated? Some kind of matrix? I guess it goes: something, something, color, x, y, z. Is there a tutorial somewhere?

My friend made a converter that loads ff7 3d models into common 3d computer models. I asked him if he could make one for megaman legends, and output the models in the format above. Or are there more easy to use 3d graphics model formats for psp that can be used in lua, or if not in lua then c++, which I can work with also.
Last edited by Duo on Thu Jun 15, 2006 10:06 pm, edited 1 time in total.
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

in (0,0,pink,1,2,3) that is one point in a triangle. triangles have 3 points to them, blah, blah, blah. the zero are for the the texture(that is still unclear to me) anyway the zeros are coordinates on the triangle at which the texture should be printed. the pink is its color, duh and the last bit are the point's coordinates(take geometry if u are lost). the only tutorial is luaplayers wiki functions list, it sucks.i know the quake 2 format can be used with c++ and is supported by most converters. u are in over your head, it takes months to learn the basics of 3d mapping, start with simple engines with your computer even some of the best psp devs are struggling to get this crap down.

if u have never worked with models before dont expect to pick it up overnight.
- be2003
blog
Duo
Posts: 25
Joined: Fri Oct 21, 2005 5:15 am

Post by Duo »

I'm not that dumb, I can figure it out quick if there is an explanation. I got an A in calculus, can use autocad, and am going to the USMMA engineering school.

Haha, anyway, yeah the first two 0,0 is what I don't understand. Also, I don't really need to understand everything about modeling. My friend is going to be the one doing all the work. I just want an output in this form, or something else the psp can use. http://mirex.mypage.sk/index.php?selected=1. This is what he did, and he just needs some format.

He's working on a loader/converter for different playstation game models, and I suggested he made a format that could be used for making new homebrew games. This would make programming 3d games for psp REALLY easy as people could just take stuff from other games.

That's what the plan is, all I need is a 3d format for psp.
SSpeare
Posts: 63
Joined: Tue May 23, 2006 11:45 pm
Contact:

Post by SSpeare »

The first two parameters look like the U,V values for a texture map. The format appears to be:

{U, V, color, X, Y, Z}

and that's it.
Duo
Posts: 25
Joined: Fri Oct 21, 2005 5:15 am

Post by Duo »

I don't understand, wiki says uv mapping is different from xyz. Why would this have both?
wiki:

Code: Select all

UV Mapping is a 3D modelling process of making a 2D map representing a 3D model. This map is associated with an image. In contrast to "X", "Y" and "Z", which are the coordinates for the original 3D object in the moddeling space, "U" and "V" are the coordinates of this transformed map of the surface. Then the image is backtransformed ("wrapped") onto the surface of the 3D object. For example, it is used to give an animated character a realistic looking face, but various other applications are possible.
SSpeare
Posts: 63
Joined: Tue May 23, 2006 11:45 pm
Contact:

Post by SSpeare »

If you don't know what UV mapping is......


The U,V coordinates specify how to map the texture onto the vertex. The U,V is a lookup into the texture so the renderer knows how to apply the texture to the vertex and the faces of the polygon.

There is U,V data in every texture-mapped model. It's an essential part of the model.

If your friend knows what he is doing, he will know exactly what UVs are and what to do with them.
Post Reply