SkepticalFox Posted March 7, 2017 Author Share Posted March 7, 2017 @Pavel3333, уже многое стало логичным с этими лампами) @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 7, 2017 Share Posted March 7, 2017 Ну да) Я отъехал на день в Дмитров, поздравить всех представителей Прекрасного пола, нутыпонел. Тут компа нет, как вернусь - продолжу работу. @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted March 7, 2017 Share Posted March 7, 2017 Ну да) Я отъехал на день в Дмитров, поздравить всех представителей Прекрасного пола, нутыпонел. Тут компа нет, как вернусь - продолжу работу. Если я правильно понял, то вернешься ты явно не скоро, если даже будешь по одной каждые 5 сек поздравлять. @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 7, 2017 Share Posted March 7, 2017 Костя, умеешь ты шутить :D @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted March 7, 2017 Author Share Posted March 7, 2017 (edited) . Edited January 20, 2018 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 7, 2017 Share Posted March 7, 2017 BWLC ksy meta: id: bwlc endian: le file-extension: chunk seq: - id: lamp_entries type: lamp_section repeat: expr repeat-expr: 5 types: lamp_section: seq: - id: sec_size type: u4 - id: sec_num type: u4 - id: lamp_data type: switch-on: sec_size cases: 80: type80b 64: type64b 48: type48b 8: type8b repeat: expr repeat-expr: sec_num type48b: seq: - id: pos type: f4 repeat: expr repeat-expr: 3 - id: inner_radius type: f4 - id: outer_radius type: f4 - id: colour type: f4 repeat: expr repeat-expr: 3 - id: unknown_1_always_equal_one type: f4 - id: unknown_2 type: u4 - id: multiplier type: f4 - id: cast_shadows type: u4 type64b: seq: - id: pos type: f4 repeat: expr repeat-expr: 3 - id: direction type: f4 repeat: expr repeat-expr: 3 - id: inner_radius type: f4 - id: outer_radius type: f4 - id: unknown_1_maybe_cone_angle type: f4 - id: colour type: f4 repeat: expr repeat-expr: 3 - id: unknown_2_always_equal_one type: f4 - id: unknown_3_maybe_priority type: u4 - id: multiplier type: f4 - id: unknown_4_maybe_cast_shadows type: u4 type80b: seq: - id: pos type: f4 repeat: expr repeat-expr: 3 - id: direction type: f4 repeat: expr repeat-expr: 3 - id: inner_radius type: f4 - id: outer_radius type: f4 - id: unknown_1_maybe_cone_angle type: f4 - id: colour type: f4 repeat: expr repeat-expr: 3 type: f4 - id: unknown_2_always_equal_one type: f4 - id: unknown_3 type: u4 - id: multiplier type: f4 - id: unknown_4_maybe_cast_shadows type: u4 - id: unknown_5 type: f4 - id: frame_start_id type: u4 - id: frame_num type: u4 - id: duration type: f4 type8b: seq: - id: frame_from type: f4 - id: frame_to type: f4 omniLight - 48 байт: 3x float - position float - innerRadius float - outerRadius 3x float - colour (0.0 - 1.0) float - ? (always equal 1.0) 4b - ? float - multiplier uint32 - priority + castShadows + drawType ??? spotLight - 64 байт: 3x float - position 3x float - direction float - innerRadius float - outerRadius float - coneAngle ??? 3x float - colour float - ? (always equal 1.0) uint32 - priority ??? float - multiplier uint32 - castShadows ??? unknownLight (maybe ambientLight/directionLight?) - 64 байт: TODO ... pulseSpotLight: 80 байт: 3x float - position 3x float - direction float - innerRadius float - outerRadius float - coneAngle ??? 3x float - colour float - ? (always equal 1.0) 4b - ? float - multiplier uint32 - castShadows ??? 4b - ? (60 be e3 3f) uint32 - frame_start_id uint32 - frame_num float - duration 8 байт:float - frame_from float - frame_to А visiblity mask? Это uint, long или long uint? @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted March 7, 2017 Author Share Posted March 7, 2017 (edited) . Edited January 20, 2018 by SkepticalFox 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 7, 2017 Share Posted March 7, 2017 (edited) Хм, а пути к текстурам как записываются? ОЙ, я не туда посмотрел. Надо написать классы всех типов света. А потом при считывании заголовков создать их экземпляры в заданных количествах и заполнять. А потом при помощи xml записывать в чанки. Edited March 7, 2017 by Pavel3333 @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 8, 2017 Share Posted March 8, 2017 (edited) 'Результаты реверса. Будет дополняться' 0-4 байты - pos.x [float]4-8 байты - pos.y [float]8-12 байты - pos.z [float]12-16 байты - innerRadius [float]16-20 байты - outerRadius [float]20-24 байты - colour.R [коэффициент к 255]24-28 байты - colour.G [коэффициент к 255]28-32 байты - colour.B [коэффициент к 255]32-36 байты - visiblityMask [float-коэффициент]36-40 байты - выделяется под тип света, priority, castShadows и drawType40-44 байты - multiplier [float]44-48 байты - выделяется под тип света, priority, castShadows и drawType Нуждается в доработке Нуждается в доработке это 0xffffffff - uint32, но её в чистом виде в этих блоках нет.Там все с помощью логических операций управляется... Наверное... Она представлена в виде коэффициентов.А в SpotLight - так вообще int. См. выше....Странно, спотлайты имеют разную структуру... Edited March 8, 2017 by Pavel3333 @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted March 8, 2017 Author Share Posted March 8, 2017 (edited) . Edited January 20, 2018 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 8, 2017 Share Posted March 8, 2017 Ты о чем именно? Нахожу позицию из нераспакованного файла, в hex-editor'е нахожу соотв. float. Ну так вот, если брать две разных секции spotlight, то они оказываются в запакованном файлике разными по структуре. Позиции на разных местах, colour, direction, нутыпонел. @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted March 8, 2017 Author Share Posted March 8, 2017 (edited) . Edited January 20, 2018 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 8, 2017 Share Posted March 8, 2017 (edited) А вот это очень непродуктивно. Я же пишу, что нужно визуально представлять данные (примерно как на моем скрине свыше). Так сразу все становится виднее. Ок, попробую в kaitai поработать. Посмотрел в kaitai. Ужаснулся. Заголовки оказвается не только в самом начале бывают)) Ты прям глаза открыл. Надо переделать структуру выше. Edited March 8, 2017 by Pavel3333 @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted March 8, 2017 Share Posted March 8, 2017 Заголовки оказвается не только в самом начале бывают Это же упаковка файлов. Конечно там есть заголовки в теле файла. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 9, 2017 Share Posted March 9, 2017 На вот, держи, тестовая сценка с тремя источниками света. space.zip Вот смотри. Во-первых, каждый начальный кадр в результате умножен на два. А во-вторых. Вся инфа о PulseLight помимо кадров хранится в... 64-битной секции SpotLight! Но нужно посмотреть, где она будет расположена, если спотлайтов больше двух. В-третьих, единица (unknown1alwaysEqual1) - это коэффициент при visiblityMask. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted March 9, 2017 Author Share Posted March 9, 2017 (edited) . Edited January 20, 2018 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 9, 2017 Share Posted March 9, 2017 А это немного бредово. А там других вариантов нет. Сейчас проверю. Поставлю значение в два раза меньше. А это немного бредово. Мои сомнения не подтвердились. Даже при visMask=0 единица продолжает быть единицей. Она перестает быть единицей с PulseLight... Да и вообще там с числами что-то не то! @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted March 9, 2017 Author Share Posted March 9, 2017 (edited) . Edited January 20, 2018 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted March 9, 2017 Share Posted March 9, 2017 Все логично. Я, когда описывал структуру для kaitai, не знал про PulseLight. Теперь мы знаем, что это и можем смело считать unknownLight разгаданным! Теперь я создам пару Spotlight'ов и второй PulseLight. И посмотрим, где будут находиться взаимосвязанные секции PulseLight'ов.. @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted March 9, 2017 Author Share Posted March 9, 2017 @Pavel3333, обновил структуру для pulseLight... @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.