rswiki-book/OB3.mediawiki

37 lines
1.0 KiB
Plaintext
Raw Normal View History

2012-11-23 14:26:03 -05:00
[[Category RSC]]
Work in progress.
This page refers to .ob3, a custom format for 3D models created by Jagex. It is used by the RuneScape Classic engine.
2012-11-25 13:36:07 -05:00
<pre>
2012-11-25 13:38:45 -05:00
[Unsigned Short] vertex_count
[Unsigned Short] face_count
for (int i = 0; i < vertex_count; i++)
[Signed Short] vert_x
for (int i = 0; i < vertex_count; i++)
[Signed Short] vert_z
for (int i = 0; i < vertex_count; i++)
[Signed Short] vert_y
for (int i = 0; i < face_count; i++)
[Unsigned Byte] face_vert_count
for (int i = 0; i < face_count; i++)
[Signed Short] face_back
for (int i = 0; i < face_count; i++)
[Signed Short] face_front
for (int i = 0; i < face_count; i++)
[Unsigned Byte] Boolean. Gourad shading?
for (int i = 0; i < face_count; i++) {
for (int j = 0; j < face_vert_count[i]; j++) {
if (vertex_count < 256)
[Unsigned Byte] Unknown
else
[Unsigned Short] Unknown
}
2012-11-25 13:36:07 -05:00
}</pre>
2012-11-23 14:26:03 -05:00
== '''Face sides''' ==
A '''negative''' face_back or face_front value indicates a '''solid colour''', whereas a '''positive''' value indicates a '''texture'''.