Jump to content
  • Advertisement

8.zwerg

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

134 Neutral

About 8.zwerg

  • Rank
    Member
  1. 8.zwerg

    FBX poses

    The models I want to Import dont have any kind of animation.   I dont have a problem with that, becaused Im even used to that^^ But Im in need to expect that other users wont care about that, so thats why Im trying to apply the transformation.
  2. Hi community, Im writing a custom FBX importer for my programm (since the SDK by Autodesk is not usable for Pascal). Everything works quite fine instead of applying the Poses. For my programm, I need to get the global coordinates of each Vertex, so what I do is:  - Multiplying the pose's rotation matrix with each Vertex and add translocation   Unfortunately, as soon as I change the pose (eg in Blender) from (0,0,0) to anything else, the objects have a different position. So I expect an error in my multiplication (Im getting valid floats in Pose matrix and Vertex), but I dont see any error here. a1 a2 a3 tx b1 b2 b3 ty c1 c2 c3 tz 0 0 0 1 newX:=a1*OldX+a2*OldY+a3*OldZ+tx; newY:=b1*OldX+b2*OldY+b3*OldZ+ty; newZ:=c1*OldX+c2*OldY+c3*OldZ+tz; By the way: Am I in need of using the poses even if Im not using animation? What exactly is the difference between "Blind Poses" and the Objects "Properties" for scale,rot and pos?
  3. This thing is getting over me -.- I replaced GL_PROJECTION_MATRIX with GL_MODELVIEW_MATRIX but nothing happens. The Quad is still not aligned to the view.
  4. Lol, what an obvious mistake :/ Im sure that was the problem, I'll test it later on. Thank you very much
  5. Thanks for your response.   However, you replied exactly what I have already "achieved". Means that I have already set up my Right/Up Vector (see my code), but the Quad is not rotating with the camera.   Any solutions for that problem?
  6. Well, Im aware that glBegin is not the most modern way to work with, but I was learning it in this way, and it still works fine for me. Im just a hobby programmer without any specific knowledge ;) Can you give me a tip how to get the angles of the "camera"? Like said, Im no professional so I need a bit more information. Thanks in advance
  7. Hey guys,   I try to set up Billboards in my programm, but it does not work at all. My "testplane" can be seen, but its not rotating according to the view.   See this image (from side view) for detail.     So this is what I got.. As you can see, I want to use the Billboards as Tree leaves.   The code for the white plane is the following: glDisable(GL_TEXTURE_2D); glDisable(GL_LIGHTING); glUseProgram(0); glGetFloatv(GL_PROJECTION_MATRIX, @Matrix); Right:= Vectorize(Matrix[0,0], Matrix[0,1], Matrix[0,2]); Up:= Vectorize(Matrix[1,0], Matrix[1,1], Matrix[1,2]); glPushMatrix; glColor3f(1,1,1); glBegin(GL_QUADS); glVertex3f(3 +Right.X+Up.X, 0+Right.Y+Up.Y, 3 +Right.Z+Up.Z); glVertex3f(-3-Right.X+Up.X, 0-Right.Y+Up.Y, 3 -Right.Z+Up.Z); glVertex3f(-3-Right.X-Up.X, 0-Right.Y-Up.Y, -3-Right.Z-Up.Z); glVertex3f(3 +Right.X-Up.X, 0+Right.Y-Up.Y, -3+Right.Z-Up.Z); glEnd; glPopMatrix; glEnable(GL_TEXTURE_2D); glEnable(GL_LIGHTING); Can you tell me my mistake?
  8. 8.zwerg

    Interpretating compessed Data

    Sorry, mistake by myself. You are right, there have to be 15 values   The file is a binary file where the Material settings are stored. Each record contains 60 bytes, where 16 are already in use (e.g. 3xTexture indices, Materialmode, and else). So it is left with 44 bytes. That makes a maximum of 11 Floats. Like said, in the meantime I recognized that there is one more Integer at the beginning, so the maximum of each Material is 10 Floats. I already readed some other binary File types from that developer, they store e.g. their angels usually in 3x3 matrices, so I was expecting it will be something like that again. The textures are all POT, although non-squares like 64x256 are also possible. I also suspect that SizeX and SizeY are seperated because in the Materialsettings of other Files (which are readable like a *.obj MTL File) they seperate them, same as the MoveX,MoveY.   Anyhow, I attached an Excel file with some of the records, if somebody feels like having a look he's free ;) Click here!   I hope I provided some more information you need.
  9. 8.zwerg

    Interpretating compessed Data

    But how is it in that case possible, that I need to have more values than I have available?   Meantime, I found out that there are exact 10 Floats, but still I have to get 12 Values. So it is left with 2 floats, but I can guarantee that there is no other place which the missing floats can be stored.   So are there any common methods of saving space by storing these values in a special format?
  10. Hello community, I try to write a tool for editing a scenery of a game. But I fail when I try to interpret data from that file.   In fact, in a maximum of 11 Floats(probaly rather somewhere around 9 Floats) there have to be stored Texture Size X and Y, Texture rotation and Texture scalation X and Y for 3 Textures each. Uncompressed, this would be 2*1*2*3 = 12 Floats, but this one is, like written above, not possible. At first, I was expecting a sparse matrix, but I does not seems like this is the solution for that. Does anybody here have any idea how I can get the needed values?   Maybe it is helpful to know that the game itself was written in C++, using DirecX and D3D. As for me, I am using Pascal, so I case you feel like posting some code, please comment it basically.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!