Captain Cody Posted February 3, 2017 Share Posted February 3, 2017 (edited) How would I go about projecting a picture, and have it display on every object (That the picture is projected on) with right positioning and what not . I'm trying to accomplished vehicle lighting similar to this Instead of using extremely laggy pixel per lighting the lights here are actually a picture that is projected on the objects. SA uses a similar system, but way less advanced than what I'm trying to do. (And if I'm not mistaken Gta 4 and 5 both use it for vehicle lights) (Sorry about having no base script or anything; I know Lua, but not too much FX) Edited February 3, 2017 by CodyJ(L) Link to comment
Einheit-101 Posted February 3, 2017 Share Posted February 3, 2017 I would like to see something like this too. shader_dynamic_lighting kills any CPU out there. Link to comment
Captain Cody Posted February 3, 2017 Author Share Posted February 3, 2017 If a functional light shader can be made out of this we could potentially make coronas emit proper lighting, add flashlights, etc and have them emit light on everything. Link to comment
Einheit-101 Posted February 3, 2017 Share Posted February 3, 2017 How does shader_discoball work? Isn't that a projection? Link to comment
Captain Cody Posted February 3, 2017 Author Share Posted February 3, 2017 (edited) Edit -- Found it, and yes from the looks of things it is. One issue though "Also have in mind that the map objects should not be rotated " Edited February 3, 2017 by CodyJ(L) Link to comment
Einheit-101 Posted February 4, 2017 Share Posted February 4, 2017 Pretty sure there is a way to update the projection with the element rotation each frame but dont ask me how lol Link to comment
Captain Cody Posted February 4, 2017 Author Share Posted February 4, 2017 I'd wait until Ren or someone responds. I don't have proper experience with FX. Link to comment
Ren_712 Posted February 5, 2017 Share Posted February 5, 2017 (edited) CodyJ(L) The discoball effect is not appropriate here. Look into my projected_paint shader. There are different projection matrices (you'll need view and the perspective matrix) ,Will find explanation and example in said script. Edited February 5, 2017 by Ren_712 Link to comment
Captain Cody Posted February 5, 2017 Author Share Posted February 5, 2017 Could we get an example of how to achieve something such as the lighting image projection? I haven't one clue about FX. I can kind of see what you're talking about, but at the same time I haven't a single clue. Link to comment
Einheit-101 Posted February 5, 2017 Share Posted February 5, 2017 The mayor issue with projected paint is the fact, that it draws a texture only to one side (for example car roof) and when reaching the sides (vehicle door) the projected texture gets stretched, this may not be an issue however when using a light texture that gets projected into the front direction of a car... Doesn't solve the issue that there will not be any lighting, which is what he wants to do, but it should be relatively “easy“ to brighten all pixels that are affected by the effect using the alpha channel of the used texture to calculate light strength. Link to comment
Captain Cody Posted February 5, 2017 Author Share Posted February 5, 2017 (edited) 28 minutes ago, Einheit-101 said: The mayor issue with projected paint is the fact, that it draws a texture only to one side (for example car roof) and when reaching the sides (vehicle door) the projected texture gets stretched, this may not be an issue however when using a light texture that gets projected into the front direction of a car... Doesn't solve the issue that there will not be any lighting, which is what he wants to do, but it should be relatively “easy“ to brighten all pixels that are affected by the effect using the alpha channel of the used texture to calculate light strength. Well soon as you figure out that non sense hit me up aye. Edited February 5, 2017 by CodyJ(L) Link to comment
Ren_712 Posted February 5, 2017 Share Posted February 5, 2017 >> The mayor issue with projected paint is the fact, that it draws a texture only to one side (for example car roof) Duh http://www.rastertek.com/dx11tut43.html I'll send Einheit-101 and CodyJ(L) an example. It uses different projection matrix (you will need perspective matrix function from projected_paint) Link to comment
Syntrax# Posted February 5, 2017 Share Posted February 5, 2017 1 hour ago, Ren_712 said: >> The mayor issue with projected paint is the fact, that it draws a texture only to one side (for example car roof) Duh http://www.rastertek.com/dx11tut43.html I'll send Einheit-101 and CodyJ(L) an example. It uses different projection matrix (you will need perspective matrix function from projected_paint) @Ren_712 is there any chance you can send an example this way cause fx is really something i want to learn and this can comd in handy with my new upcoming rpg server. 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