[Effect] mode7

Share your Construct 2 effect files

Post » Fri Mar 04, 2016 10:53 pm

So for the past couple days I've been working with a friend to try and implement the "sprite positioning logic" from the capx earlier in this thread so that it still works when the mode7 transformation is being applied to a layer instead of a sprite; doing this opens up a lot of possibilities for visual effects without the performance overhead of hundreds of sprites with individual mode7 effects, but figuring out how the projection math/logic changes as a result of this has been difficult. Our layout is always the size of our window (i.e. no scrolling) and the angle is always zero, so this helped us to simplify stuff, but even now that we've refactored the sprite positioning logic down to a couple of lines it's still hard to figure out what we need to change make sprites map properly. I haven't been able to figure out things like where the axis of rotation is when we're using a layer instead of a sprite. I've made the most logical substitutions I can think of for the code you provided, like replacing Sprite.Width with LayoutWidth, but I don't have 100% confidence that all these conversions are valid. Any insight you can offer on how the original sprite positioning math works and how it would change in this context would be much appreciated. I can provide a capx of our work so far, but we've moved so far away from the original code while trying to fix it that it might not be much help.
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Sun Mar 06, 2016 8:19 pm

@seven
The original code in that capx is from taking the code in the effect itself and reversing it. The only snag was in the effect the positions are relative to either the screen or object, in the range of 0 to 1. So 0,0 would be the top left and 1,1 would be the bottom right. So as I recall multiplying by the sprite size was to switch between that and pixels.
Beyond that I don't have anything helpful to say. If I was to do it I'd probably need to derive the math again so I understand what's what. But I've no time to do that.
B
88
S
30
G
89
Posts: 5,107
Reputation: 60,325

Post » Tue Mar 08, 2016 12:49 pm

With this awesome mode7 effect by R0J0hound I was able to re-size the notes and the fret board/track and another effect called Opacity Gradient I created a transparent horizon (end of the board) and also notes fade in/out as well, so with all this you can add a background and it looks like the real game..
controls:
~ = restart game
ESC = pause/rewind
1 = green
2 = red
3 = yellow
4 = blue
5 = orange
ARROW KEYS UP/DOWN = strum (hit notes)

Play the unfinished prototype here: https://googledrive.com/host/0B5UPPw4SdTlHMUlORE5qQ1YyTWs

Image
B
4
Posts: 6
Reputation: 218

Post » Sat Jul 23, 2016 9:37 pm

Has anyone implemented mode 7 successfully? I've tried the effect in combination with rex's plugins but the image distorts a lot and i don't seem to get the parameters right. Help!
Image
Image
Image
B
15
S
2
Posts: 48
Reputation: 1,595

Post » Mon Aug 08, 2016 3:02 am

Awesome! thanks!
B
72
S
25
G
5
Posts: 89
Reputation: 7,275

Post » Thu Aug 11, 2016 9:45 pm

I'm trying to figure out how to spawn objects in front of the camera. They all seem to appear in the exact same place if i use the co-ordinates of the camera. Any ideas?
B
73
S
33
G
11
Posts: 933
Reputation: 13,795

Post » Fri Nov 18, 2016 10:39 pm

Just had the bright idea of sorting instances in R0j0's mode7fx_objs capx with the new system z sort.
Image
Wanted to use the scale to sort, but we don't have an expression for it so I used the difference in height since scale should always be uniform to width.

Works nice.
Really need the formula for the camera to fx offset to do much else with it though.
The math is crazy. It's not just backwards, it's backwards, and sideways. lol
Image ImageImage
B
165
S
49
G
147
Posts: 8,041
Reputation: 96,574

Post » Sat Dec 10, 2016 7:52 pm

Hey @R0J0hound or anyone else who's been working with this effect, is there a good way to transition between mode7 angles like what's shown in this video?

https://www.youtube.com/watch?v=2DT0uuFK_Fs

I've been trying to brute-force the math for this for about a week without much luck, but I feel like the solution can't be too terribly complex?
B
12
S
3
Posts: 39
Reputation: 1,001

Post » Sun Dec 11, 2016 12:37 am

The effect parameters could possibly be tweaked to do that but idk. It would probably be done by figuring out the perspective transform of it, then picking apart the math in the effect to see if they can be matched somehow.
In the end I don't think this effect is actually useful for something like in that video or fzero/Mario cart type stuff. It's just too tedious to use.
B
88
S
30
G
89
Posts: 5,107
Reputation: 60,325

Post » Mon Jan 09, 2017 3:36 am

I've been having a lot of fun with this amazing effect!

I've got a question. If I'm using the effect on an entire layer, is there a way to avoid having it repeat infinitely on the edges?
B
86
S
43
G
71
Posts: 601
Reputation: 43,609

PreviousNext

Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests