Jump to content

Project image


Captain Cody

Recommended Posts

Posted (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

Dirt-3-Mac.jpg

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 by CodyJ(L)
Posted (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 by CodyJ(L)
Posted (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 by Ren_712
Posted

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.

Posted

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.

Posted (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 by CodyJ(L)
Posted
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. 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...