Skip to content

ModelOverride Offset - #1083

Open
RuffledPlume wants to merge 5 commits into
117HD:masterfrom
RuffledPlume:Model-Override-Offset-2
Open

ModelOverride Offset#1083
RuffledPlume wants to merge 5 commits into
117HD:masterfrom
RuffledPlume:Model-Override-Offset-2

Conversation

@RuffledPlume

Copy link
Copy Markdown
Contributor

JSON Added for the Model Overrides:

      "modelOffsetRelative": {
        "type": "boolean",
        "description": "Applies model offset relative to the models orientation."
      },
      "modelOffset": {
        "type": "array",
        "description": "xyz offset",
        "items": {
          "type": "integer"
        }
      },

@RuffledPlume
RuffledPlume force-pushed the Model-Override-Offset-2 branch from 53ab9c5 to f739d25 Compare May 16, 2026 22:14
@aHooder

aHooder commented May 17, 2026

Copy link
Copy Markdown
Member

I think respecting model orientation should be on by default, but it doesn't hurt that it's configurable.

The preOrientation stuff is tricky though. You can go check the tables in the Canifis bar I think, if you want to test how that works. I believe in this case, we'll want to subtract preOrientation from the orientation, or perhaps disregard it entirely, not sure. If I remember correctly, preOrientation is rotation applied to the model before it reaches us, as in it's already applied to the vertex data. That's why we pass in preOrientation to UV calculations, so they can invert the rotation before computing UVs from a reliable base orientation for the model.

@RuffledPlume
RuffledPlume force-pushed the Model-Override-Offset-2 branch from 859063e to 820ca10 Compare June 28, 2026 02:56
@aHooder

aHooder commented Jul 29, 2026

Copy link
Copy Markdown
Member

I feel like we should go through and validate the XZ orientation stuff a bit more thoroughly before merging that part of it, but I don't want to get bogged down with that currently, so this is sort of on hold. If we want to, we could make this only work along Y for the time being, so it can still be used for to fix the actual issues we need it for. The existing XZ offset in LightManager is also not entirely correct, so it would be good to unify it with whatever we end up with, which is hopefully correct in more cases.

@Jin-Jiyunsun

Jin-Jiyunsun commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

I feel like we should go through and validate the XZ orientation stuff a bit more thoroughly before merging that part of it, but I don't want to get bogged down with that currently, so this is sort of on hold. If we want to, we could make this only work along Y for the time being, so it can still be used for to fix the actual issues we need it for. The existing XZ offset in LightManager is also not entirely correct, so it would be good to unify it with whatever we end up with, which is hopefully correct in more cases.

Would be fine by me doing only Y, I have personally yet to come across anything that would benefit from offsetting X or Z, as usually moving stuff like that will just make more holes or gaps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants