![]() |
|
![]() |
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 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 |
My LBA models | Flip_One | Fan Art | 99 | 2010-11-03 10:50 |
Creative texturing | punkflare | Off topic | 7 | 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 | 42 | 2002-06-24 02:59 |