![]() |
|
![]() |
Welcome to the Magicball Network. You are currently viewing our site as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
Fan Creations - General The place for the creative LBA fans. |
![]() |
|
Thread Tools |
#1
|
||||
|
||||
How to: coloring/texturing LBA2 models
Hi folks,
I'm working on my own LBA1/2-Implementation (https://github.com/solarix95/lbaworld), but right at the moment: I'm stuck. ![]() I simply don't get the coloring/texturing done for lba2 models. I try to understand lba2remake, but JS is (without typeinformation) still hard to read for me. It's difficult to follow the color/texture/uv-information from body.hqr/ress.hqr to the shader. LBA1 is easy, because I can compile, run and debug twin-e and can compare values of single variables with my own implementation. So, xesf, adrien and all other hackers out there: how did you start with your own lba2 renderer? Is there a twin-e-like reference implementation for lba2? Does anyone have the source code of the "LBA Model Viewer" by yaz0r? The viewer supports lba2 models and looks like C++/Qt... Thanks for any advice/hint/help! solarix [Edit] attached printscreen of my own modelviewer. I'm able to load normals, vertices, bones, polygones, but not the colors/textures. |
#2
|
||||
|
||||
Hi there, Solarix.
You are doing great things with your knowledge. You look like you're getting very close to fully implementing the models. I still have yet to load in existing LBA 2 models myself. I've actually been working on a Maxscript to port fully custom models from Autodesk 3DS Max directly into the LBA2 model format. My next step is to create animated models within Unity. Remember that you need to allow the right amount of space - depending on if you want to draw a triangle or a quadrilateral. Also, the colors and material both use their own bytes. I've actually been using Yaz0r's LBA Model viewer to make sure my data works properly - I don't know of any existing source code. If It helps, I used this link to get the polygon data properly. http://lbafileinfo.kazekr.net/index....=LBA2:3D_model Let me know if that helps. I don't check here as often as I used to. If I may ask a question, how did you get the bones working? I cannot get the vertices' offsets properly. They're supposed to come from the origin on the bone they're attached to.
__________________
I am a Quetch. However, I am a Mr. Quetch. Last edited by MrQuetch; 2018-11-21 at 01:31. |
#3
|
||||
|
||||
Hi MrQuetch,
thanks for your anwser! Quote:
![]() ![]() The geometry of the LBA2-models looks complete to me... Just the colors/texturing still don't work. Grrr... ![]() Quote:
Quote:
Quote:
Let's start at bone 0: parent bone is "-1". So you can't translate bone 0 attached vertices. Bone "1" has (e.g.) parent ID "0". So read the vertex-Index of bone 0, take that vertex from the vertex-list and that's your x/y/z-offset for Bone 1 attached vertices. All offsets are relative, not absolute. If you have a branch with bone 0 -> bone 1 -> bone 2, then the vertices of bone 2 are translated by adding the offset of bone 1 and offset of bone 0. My implementation (LbaBody::translateVertices()) uses recursion. I start at bone 0 and commit the "current offset" to the next bone in the branch recursively. You can ignore the "rotation"-stuff. That's for animation and not needed for basic bone-translation. Hope this helps! solarix |
![]() |
Thread Tools | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
LBA1 PS Models on LBA2 PC | MrQuetch | LBA Modifications - General | 4 | 2012-05-14 05:20 |
My LBA models | Flip_One | Fan Art | 99 | 2010-11-03 10:50 |
Creative texturing | punkflare | Off topic | 9 | 2003-01-30 14:29 |
My models | punkflare | The Relentless Movie project | 6 | 2002-12-25 18:13 |
axx's 3d models | Axx | The Relentless Movie project | 43 | 2002-06-24 02:59 |