Grozz Posted January 26, 2017 Share Posted January 26, 2017 I just want to make shadows in MTA, like in this video: (at 2:33) There is a dynamic light shader with shadows, but it has so many bugs. Link to comment
Captain Cody Posted January 26, 2017 Share Posted January 26, 2017 (edited) What resource is the second one? with some work those so called "bugs" could likely be fixed. Also one thing I can think of, of how to do something like this would be something like a reverse green screen effect, in other words Pretty much you render the object with a different color view point behind it, using a matrix from the camera to the object, after that you use some sort of shader to drop the green background, and then you tint it black; then render that on the surrounding objects with the right set up. This is likely a very bad example; because it'd require each object to have a view point, and massive lag would occur, and it wouldn't be pretty. Just something I thought of off the top of my head, something similar but way less laggy could probably be done through a fx file and all you'd need to do is supply cords, but I haven't any experience with fx. Edited January 26, 2017 by CodyJ(L) Link to comment
Ren_712 Posted January 27, 2017 Share Posted January 27, 2017 I've made the second resource about 2 years ago. Way before MRT in shaders option was introduced. The whole purpose was to check if things were possible. That one required 1 frame to get scene depth (haven't used a proper orthographic projection matrix yet) and another to draw the outcome. The resolution is low proportionally to screen resolution and shadow range. Right now there are more possibilities. I'll try to release something decent in the near future. Link to comment
Ren_712 Posted January 27, 2017 Share Posted January 27, 2017 (edited) The issue that will remain is object culling. It might be seen in cam2rt resource (mirror effect) when objects off screen disappear when certain distance is met (sa:render has this issue as well). MTA:Eir was supposed to have custom cameras, this could solve most of the problems. Edited January 27, 2017 by Ren_712 Link to comment
Einheit-101 Posted January 28, 2017 Share Posted January 28, 2017 The object culling would cause shadows to suddenly appear/disappear as soon as objects are rendered / no more rendered by GTA, however maybe there is a way to prevent the shadows from just disappearing and fade them softly out as soon as the parent object is no longer on Screen... This mod has some .fx files and an .asi file to bring the enhanced Android/IOS shadows to the PC version. So it would be theoretically possible to implement this natively in MTA. Link to comment
Captain Cody Posted January 28, 2017 Share Posted January 28, 2017 All of the main calulations and stuff take place in the compiled ASI file. Link to comment
Einheit-101 Posted January 28, 2017 Share Posted January 28, 2017 Yes, the implementation would be similar to the Limit Adjuster, it cannot be done with Lua. Link to comment
Captain Cody Posted January 28, 2017 Share Posted January 28, 2017 Well it is possible with lua, just not as pretty. Doesn't render ware have Dynamic shadows by default? Because if so I would if it'd be possible to some how unlock the dynamic lighting and the dynamic shadows aspect of render-ware in MTA. 1 Link to comment
Ren_712 Posted January 28, 2017 Share Posted January 28, 2017 (edited) the gtasa shadows are a whole different thing. What i meant (and what is seen in the first video posted by Grozz) is shadowmapping. You even see 1 frame lag - fixable if you take changes in cameraPosition into the account. So the limit adjuster has nothing to do with it. https://en.wikipedia.org/wiki/Shadow_mapping It is fairly possible to implement that. Even shadow blurring. Edited January 28, 2017 by Ren_712 Link to comment
Captain Cody Posted January 28, 2017 Share Posted January 28, 2017 (edited) SA has shadow cols; which is how it generates its shadows by default but they are often in accurate; and present a lot of issues if used on bigger objects (Rockstar were being absolutely -well, stupid as hell with their implementation of these, or in other words, shadow cols are a smart way of doing it, but they weren't thinking right when they actually added them.) (Also Ren, if you could implement these properly without alot lag that'd be awesome) Edited January 28, 2017 by CodyJ(L) Link to comment
Einheit-101 Posted January 30, 2017 Share Posted January 30, 2017 On 28.1.2017 at 20:42, Ren_712 said: ...So the limit adjuster has nothing to do with it.... I know, i just wanted to say that the implementation would be similar to the limit adjuster: The MTA team would have to implement mods like SA Shadow extender or SA:Render natively. BTW Shadow cols seem to bug sometimes, however it could be a 3ds max export issue for me... Currently the best way for me is to ignore shadows at all. Link to comment
Captain Cody Posted January 30, 2017 Share Posted January 30, 2017 It's not an issue for you, shadow cols in SA are junk if you read what I said above. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now