Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OoT] Cutscene Implementation Update #208

Merged
merged 47 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
dda75c5
UI update & other changes
Yanis42 Jan 10, 2023
cf80723
cs C code cleanup + other UI tweaks
Yanis42 Jan 10, 2023
44df89f
fixed cs dest custom now showing
Yanis42 Jan 10, 2023
db12ad5
fixes for ocarina action enum & cs_text
Yanis42 Jan 10, 2023
35628f5
remove debug print
Yanis42 Jan 10, 2023
091c724
wip upgrade system
Yanis42 Jan 12, 2023
c9db274
renamed subprops
Yanis42 Jan 12, 2023
76a7d0e
finished upgrade system
Yanis42 Jan 12, 2023
3fa16a0
more renames/upgrade, "fixed" issues with fade out seq and fixed tran…
Yanis42 Jan 13, 2023
07c4f85
fixed export
Yanis42 Jan 13, 2023
a70f877
black
Yanis42 Jan 13, 2023
28bc02f
``OOTCutsceneProperty`` rename & upgrade and other minor changes
Yanis42 Jan 13, 2023
06bdce5
small UI changes, updated oot readme
Yanis42 Jan 13, 2023
bdd66ea
black
Yanis42 Jan 13, 2023
1f78ceb
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Jan 13, 2023
79c45c6
review
Yanis42 Jan 20, 2023
cae86c6
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Jan 20, 2023
70f5cf0
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Jan 23, 2023
f0727cc
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Jun 29, 2023
a19ea92
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Oct 18, 2023
dfe1d86
use xml data for enums
Yanis42 Oct 18, 2023
f8b0712
black
Yanis42 Oct 18, 2023
441e7e8
preview update
Yanis42 Oct 18, 2023
bed8366
importer v1
Yanis42 Oct 18, 2023
359f3e9
black
Yanis42 Oct 18, 2023
4b39a69
importer improvements part 1
Yanis42 Oct 19, 2023
c2b8408
improvements part 2
Yanis42 Oct 19, 2023
0a8714a
enhanced exporter + fixed issues
Yanis42 Oct 19, 2023
6c48377
ui improvements and import cs destination
Yanis42 Oct 20, 2023
849b464
black
Yanis42 Oct 20, 2023
278338f
remove "embedded" code
Yanis42 Oct 20, 2023
c8ad752
fixed extra cutscenes & minor enum issue
Yanis42 Oct 20, 2023
1c8b678
move exporter/importer outside motion folder
Yanis42 Oct 20, 2023
7ab85ee
OOTCSMotion -> CutsceneCmd
Yanis42 Oct 21, 2023
8400cf2
removed "motion" where it's relevant
Yanis42 Oct 21, 2023
4f01575
ui stuff
Yanis42 Oct 21, 2023
f64578e
black
Yanis42 Oct 21, 2023
b2688b9
moved preview settings to a propertygroup
Yanis42 Oct 21, 2023
d74c46d
cs seq search op
Yanis42 Oct 21, 2023
acb4635
bugfix
Yanis42 Oct 21, 2023
3a08eef
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Dec 25, 2023
05408cd
fix order of the cs commands
Yanis42 Dec 26, 2023
8cc2c85
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Dec 26, 2023
7ec07f2
Merge remote-tracking branch 'upstream/main' into cs_update
Yanis42 Dec 29, 2023
b1234f5
review & minor bugfix
Yanis42 Dec 29, 2023
6566257
black
Yanis42 Dec 29, 2023
e7feb88
tuple -> list
Yanis42 Dec 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions fast64_internal/oot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Read the "Getting Started" section for information on scene exporting.
To add an actor you need to create a new empty object in Blender, the shape doesn't matter.
When the empty object is created you can set the ``Actor`` object type in the ``Object Properties`` panel.

To add actors to a scene, create a new Empty and parent it to a Room, otherwise they will not be exported in the room C code. Then in the Object Properties panel select ``Actor`` as the Object Type. Use the ``Select Actor ID`` button to choose an actor, and then set the Actor Parameter value as desired (see the list of Actor Parameters below).
To add actors to a scene, create a new Empty and parent it to a Room, otherwise they will not be exported in the room C code. Then in the Object Properties panel select ``Actor`` as the Object Type. Use the ``Select Actor ID`` button to choose an actor, and then set the Actor Parameter value as desired (see the list of Actor Parameters below).

Finally, every actors you are using needs their assets. In OoT they're called "Objects", if an actor is missing an object the code will not spawn the actor. To do this select the Room that your actor is parented to, select the "Objects" tab in its Object Properties window, and click "Add Item".
Finally, every actors you are using needs their assets. In OoT they're called "Objects", if an actor is missing an object the code will not spawn the actor. To do this select the Room that your actor is parented to, select the "Objects" tab in its Object Properties window, and click "Add Item".

Then "Search Object ID" to find the actor object you need. For example, if adding a Deku Baba actor (EN_DEKUBABA) you need to add the "Dekubaba" object to the Room's object dependencies. Note that the object list must not contain more than 15 items.

Expand Down Expand Up @@ -95,7 +95,7 @@ To import an animation, select the armature the animation belongs to then click
To export an animation, select an armature and click "Export", which will export the active animation of the armature.

### Flipbook Textures
Many actors in OOT will animate textures through code using a flipbook method, like with Link's eyes/mouth. A flipbook material will use a texture reference pointing to an address formatted as 0x0?000000. You can find the flipbook texture frames in the material properties tab underneath the dynamic material section.
Many actors in OOT will animate textures through code using a flipbook method, like with Link's eyes/mouth. A flipbook material will use a texture reference pointing to an address formatted as 0x0?000000. You can find the flipbook texture frames in the material properties tab underneath the dynamic material section.
![](/images/oot_flipbook.png)
On import, Fast64 will try to read the provided actors code for flipbook textures. On export, Fast64 will try to modify texture arrays used for flipbook textures.

Expand All @@ -120,7 +120,7 @@ For Link, the eyes/mouth materials use flipbook textures. For Link animations yo
11. Common Issues:
- Corrupted mesh: Make sure the root, upper control, and lower control bones are the only bones set to non-deform.
- Incorrect waist DL: Go to src/code/z_player_lib.c and modify sPlayerWaistDLs to include your own waist DL.

Note on Link's bone-weighting requirements in depth:
Heavy modifications of Links model can cause his matrices array to shift from what many display lists in the game expect. Changing the amount of display lists Link's skeleton has can cause some references to matrices in segment 0xD to break, and those display lists must be updated to reflect your changes.

Expand Down Expand Up @@ -174,6 +174,13 @@ To be able to actually watch your cutscene you need to have a way to trigger it,
- ``gHyruleFieldIntroCs`` is the name of the array with the cutscene commands, as defined in ``assets/scenes/overworld/spot00_scene.c``, ``CutsceneData gHyruleFieldIntroCs[]``
4. Compile the game again and use the entrance you chose for ``sEntranceCutsceneTable`` and your cutscene should play.

Alternatively, you can use the map select to watch your cutscene, though note that this won't make it watchable during normal gameplay:

1. Open ``src/overlays/gamestates/ovl_select/z_select.c``
2. Either edit or add an entry inside ``SceneSelectEntry sScenes[]``, for instance: ``{ "My Scene", MapSelect_LoadGame, ENTR_MYSCENE_0 },`` (note that the entrance used is the first of the block you need to have for the scene)
3. Compile the game, you may or may not need to run ``make clean`` first if you edited the entrance table
4. Get on the map select then scroll until you see your new entry (in the previous example is will be called "My Scene") then press R to change the header, on the vanilla map select the first cutscene header will be called ``デモ00``, on HackerOoT it will be ``Cutscene 0`` then press A to start the cutscene.

Note that you can have the actual address of your cutscene if you use ``sym_info.py`` from decomp. Example with ``gHyruleFieldIntroCs``:
- Command: ``./sym_info.py gHyruleFieldIntroCs``
- Result: ``Symbol gHyruleFieldIntroCs (RAM: 0x02013AA0, ROM: 0x27E9AA0, build/assets/scenes/overworld/spot00/spot00_scene.o)``
Expand All @@ -185,3 +192,5 @@ If the camera preview in Blender isn't following where you have the bones or if
1. Make sure your scene empty object, room empty object, and cutscene empty object are all at the Blender origin. You can usually do this with a combination of Object > Clear > Origin and Alt+G. Maybe Object > Apply > All Transforms if that doesn't work. If your room empty object is 1 meter below your scene empty object, as fast64 does by default, that offset will be applied to everything in game and then the zcamedit stuff will not be at the correct relative position.

2. If you moved / rotated / etc. one of the camera shots / armatures in object mode, this transformation will be ignored. You can fix this by selecting the shot / armature in object mode and clicking Object > Apply > All Transforms. That will convert the transform to actual changed positions for each bone.

If the game crashes check the transitions if you use the transition command (check both the ones from the entrance table and your cutscene script), also it will crash if you try to use the map select without having a 5th entrance (or more depending on the number of cutscenes you have) in the group for your scene.
6 changes: 3 additions & 3 deletions fast64_internal/oot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,26 @@ class OOT_Properties(bpy.types.PropertyGroup):

def oot_panel_register():
oot_operator_panel_register()
cutscene_panels_register()
scene_panels_register()
f3d_panels_register()
collision_panels_register()
oot_obj_panel_register()
scene_panels_register()
spline_panels_register()
anim_panels_register()
skeleton_panels_register()
cutscene_panels_register()


def oot_panel_unregister():
oot_operator_panel_unregister()
cutscene_panels_unregister()
collision_panels_unregister()
oot_obj_panel_unregister()
scene_panels_unregister()
spline_panels_unregister()
f3d_panels_unregister()
anim_panels_unregister()
skeleton_panels_unregister()
cutscene_panels_unregister()


def oot_register(registerPanels):
Expand Down
Loading