forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

need 3d format for psp for playstation game conversion

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Duo



Joined: 21 Oct 2005
Posts: 25

PostPosted: Thu Jun 15, 2006 3:54 am    Post subject: need 3d format for psp for playstation game conversion Reply with quote

I was looking at the source for the 3d camera example:
Code:
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
Back to top
View user's profile Send private message
be2003



Joined: 20 Apr 2006
Posts: 144

PostPosted: Thu Jun 15, 2006 3:23 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Duo



Joined: 21 Oct 2005
Posts: 25

PostPosted: Thu Jun 15, 2006 9:39 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
SSpeare



Joined: 23 May 2006
Posts: 63

PostPosted: Thu Jun 15, 2006 10:35 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Duo



Joined: 21 Oct 2005
Posts: 25

PostPosted: Fri Jun 16, 2006 5:04 am    Post subject: Reply with quote

I don't understand, wiki says uv mapping is different from xyz. Why would this have both?
wiki:
Code:
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.
Back to top
View user's profile Send private message
SSpeare



Joined: 23 May 2006
Posts: 63

PostPosted: Fri Jun 16, 2006 7:16 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group