-
Notifications
You must be signed in to change notification settings - Fork 152
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
Added 5 Unity classes + Fix X-mirroring of models #103
base: master
Are you sure you want to change the base?
Added 5 Unity classes + Fix X-mirroring of models #103
Conversation
Added SphereCollider, CapsuleCollider and MeshCollider.
Added SphereCollider, CapsuleCollider and MeshCollider.
- Added MeshRenderer - Added RendererBase and ParticleRendererBase to reduce code while achieving the same result.
Added the one value MeshFilter has.
Hey! By any chance, would you know how to add support for the new (Unity 5.5+) shaders? |
I would recommend looking at the YAML-dump of such a shader. |
Thanks for the advice. Unfortunately, that doesn't help because the shader code itself is stored under |
I see. The compression you're looking at is most likely done using the .net deflate class. |
I had a headache trying to figure out what was wrong with my code. Turns out it wasn't my code but this code. Might have to do with the specific Unity version?
@@ -147,7 +147,7 @@ def __init__(self, mesh): | |||
@staticmethod | |||
def face_str(indices, coords, normals): | |||
ret = ["f "] | |||
for i in indices[::-1]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was done to convert from left-handed coordinates to right-handed coordinates, FWIW. So without this the face normals would all be inside out in tools that expect right-handed models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, um, TBH I thought pull requests would only add the commits from before they were made.
Either way, you are correct, however removing the -
on line 31 inverts the models once, so the face normals are as they should.
I know it's a bit counter-intuitive but if you test it, it should be fine.
I added 5 classes that I came along on my travels:
MeshFilter, MeshRenderer, MeshCollider, SphereCollider and CapsuleCollider.
I also cleaned up renderer.py a bit.