Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Feedback Suggestions and improvements v
1 2 3 4 5 … 36 Next »
Possible suggestion as to workaround shearing's lighting issues
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Possible suggestion as to workaround shearing's lighting issues
20-01-2023, 07:12 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Possible suggestion as to workaround shearing's lighting issues
The normals are only part of how VertexLitGeneric materials calculate lighting. There's also tangent data which is likely being modified by the shearing too. Inverting this back to the original wouldn't produce the right results, the surfaces have changed so their normals should point in the new direction and their tangents should also be updated.

However, there's no easy way to alter the visual mesh of arbitrary entities in a way that properly respects lighting. Just drawing a mesh instead of the entity will likely still mess up lighting. There's an entity hook for it specifically to allow custom meshes to be lit properly, but that's only called for scripted entities, some of which will already be using it internally. Ideally there'd be an Entity:SetMesh() method to override any entity's model with a mesh, but that doesn't exist.

There might be a few others things I could try, but it gets into the realms of major hacks pretty quickly. Maybe at some point I can try to see if I can correct the lighting on a dummy entity with shearing first, then if that works maybe it would be worth the hacks needed to override entity rendering.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Possible suggestion as to workaround shearing's lighting issues - by The17thDoctor - 20-01-2023, 02:48 PM
RE: Possible suggestion as to workaround shearing's lighting issues - by Person8880 - 20-01-2023, 07:12 PM
RE: Possible suggestion as to workaround shearing's lighting issues - by The17thDoctor - 20-01-2023, 09:56 PM
RE: Possible suggestion as to workaround shearing's lighting issues - by mariofludd - 21-01-2023, 09:40 AM
RE: Possible suggestion as to workaround shearing's lighting issues - by The17thDoctor - 21-01-2023, 02:29 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.