ScanMountGoat / ssbh_editor

View, edit, and validate models for Smash Ultimate
MIT License
34 stars 5 forks source link

CustomFloat16 (z offset) inverted hull outline rendering inaccurate #183

Closed BeyondSmash closed 6 months ago

BeyondSmash commented 9 months ago

https://github.com/ScanMountGoat/ssbh_editor/assets/110957189/a2a45418-9ede-4386-b716-d109aa4bb90a

Incredibleplays and I discovered a new technique to represent a distinct cel-shade effect.

The issue you see in the video is the CF16 flipped normals mesh scales with the camera view, while in-game it is fixed to scale. It is difficult and tedious to constantly test preferred value settings of CF16 by having to go in-game for reference.

Here's a quick example of what I'm doing: SSBH: https://youtu.be/aNYEGlv20zY How it looks in-game image

What I'm trying to replicate (timestamped @ 2:57): https://youtu.be/h2Su3cBa6QI?t=177

Another picture of how inaccurate it looks in SSBH image

The other use of this is making outline meshes only surround the character. Example: image

Here's the current smash converted files for the model in case you want to tinker with it: https://drive.google.com/file/d/120xR6j2snNzjRllPHVX7WP48edgV9wIN/view?usp=sharing

ScanMountGoat commented 9 months ago

Thanks for providing the files. In the future, you can just upload a zip file directly by dragging and dropping it onto the comment. I have a number of other projects in progress, so I don't know when I'll get around to fixing this. This doesn't look like a technique that is used by in game models.

I've linked the relevant code for CustomFloat16. This will probably require loading that mod in Ryujinx with RenderDoc and comparing with the RenderDoc output of ssbh_wgpu_viewer. I can provide more guidance later if someone decides to look into this. https://github.com/ScanMountGoat/ssbh_wgpu/blob/7d953f0e10f3445b364e8e6e8329a2c14ff8f0e9/ssbh_wgpu/src/shader/model.wgsl#L678

BeyondSmash commented 9 months ago

Thanks for providing the files. In the future, you can just upload a zip file directly by dragging and dropping it onto the comment. I have a number of other projects in progress, so I don't know when I'll get around to fixing this. This doesn't look like a technique that is used by in game models.

I've linked the relevant code for CustomFloat16. This will probably require loading that mod in Ryujinx with RenderDoc and comparing with the RenderDoc output of ssbh_wgpu_viewer. In can provide more guidance later if someone decides to look into this. https://github.com/ScanMountGoat/ssbh_wgpu/blob/7d953f0e10f3445b364e8e6e8329a2c14ff8f0e9/ssbh_wgpu/src/shader/model.wgsl#L678

Gotcha. I think I didn't drag it because when I dragged a video it was capped at 10MB so I couldn't upload it. I didn't realize my files download was 4MB.

Thanks for looking into it.

ScanMountGoat commented 6 months ago

This will be fixed for the next release (0.10.2). image