Jump to content

The Getaway - High Speed II 64 color Edition


Recommended Posts

  • Content Provider
On 10/12/2021 at 11:54 AM, slippifishi said:

Really don't know what causes it; I usually always have live preview enabled and I still make heavy use of manually switching between replace and colour mask modes, so my gut feeling it's a combination of some or all of these actions, but that is pure speculation only.

 

To avoid this issue in older releases make sure that you have activated a recording and not a scene in the moment you export to real pinball or save your project.

 

ARRRGH !! And the new version crashes with a NullPointer when you do this.

New version this evening ....

Link to comment
Share on other sites

  • Content Provider

I just checked that functionality by hitting CTRL+C with D-Mask activated in one scene and hitting CTRL+V with D-Mask activated in another scene, and it worked for me.  

Are you doing it differently ?

Link to comment
Share on other sites

  • Content Provider
22 minutes ago, sprudeldudel said:

The source frame has a color 2 in it (i.e. any frame in scene "vm_s19_Masks"), so it corresponds to the mask "color" in the D-mask of an LCM scene.

 

What you are trying to do is converting color 2 into a mask, that is something different.

I don´t think that was the way it was intended to be. 

 

What I do is copying one Mask to another Mask using the clipboard and that should work.

Link to comment
Share on other sites

  • Content Provider

I could reproduce it and will fix it in the next build. For now modify the mask first by hitting delete or invert and then paste from the clipboard.

The mask should be saved by checking and unchecking the D-Mask checkbox.

 

44 minutes ago, sprudeldudel said:

Looking at how I built it, would you say this is too demanding for the hardware?

 

The problem most likely is that you load a new scene from SD card with every single move of the car and each of those scenes have to load 24 masks for detection before it can even load and apply the color to the objects. Moving the car is what happens the most in that scene. The problem is not the hardware itself, but you are too demanding with SD card access. Although you have 19 different positions of the lambo, I´m still pretty sure that you can handle the video mode from a single LCM scene. When I look at your masks, I can see that there is a lot of overlap of the detection area. Have in mind that e.g. when lambo is in position 19 which is the leftmost, it is still in the detection area of the mask of position 14. I think if you use different masks to cover the areas where the objetcs are, 25 masks should be enough to detect all frames of all 19 LCM scenes, making it possible to merge them together. That would speed things up a lot.

 

Link to comment
Share on other sites

  • Content Provider
46 minutes ago, sprudeldudel said:

but will very quickly make me hit the limit of frames in an LCM scene, which i understand is 124!?

 

Although I have never tested it with more than 128 frames, there should be no limit.

 

Thinking more about it, the problem is also that in WPC mode there are transitions which make it even worse.

The frames received from the machine consist of 3 subframes. When the lambo moves it means

that first the LCM scene of the old position is triggered by one or two of those subframes and then

the new LCM scene is loaded and triggered by the second or third frame. That additionally costs a lot of time.

The goal should be to trigger all in one single LCM scene which is loaded at the begining of the video mode.

 

46 minutes ago, sprudeldudel said:

by merging 6 scenes, each mask for CPU cars and signs would need to be cut by 6 pixels on the side to remain independent of dynamic content around. that will not leave much left of them.

 

As long as the hashes are unique that is absolutely no problem. The task is to create those masks as small as possible and as big as necessary. Maybe @slippifishi  can have a look at your project and help with the masks for a single LCM scene.

Link to comment
Share on other sites

2 hours ago, lucky1 said:

The task is to create those masks as small as possible and as big as necessary. 

 

Hah; when I first read this I thought "hmmm, well put!" but then I thought about it some more and realised that I always approach it from the other perspective "create those masks as big as possible and as small as necessary", though I think they both probably mean the same thing. There was a scene in Flintstones that made me tear my hair out because I had a really small mask in the top left hand corner that was causing a clash else where, and when I eventually figured it out I was pretty upset because I had been using that mask for everything, and the only possible fix was to get rid of the mask so there was a bunch of rework (Dino's nose was the root of my pain if I remember correctly). 

 

As such, I follow the mantra of "bigger masks, fewer masks". As well as unwanted matches, I also recall a post from DJRobX in the past where he discussed how the triggering mechanism works. This may well have changed since then, or never worked like this at all, but it's how I think of it, and i'm being very literal here:

 

The frame loads on the display
The cpu generates a hash for plane 0 with no mask applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
The cpu generates a hash for plane 1 with no mask applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
The cpu generates a hash for plane 0 with mask 0 applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
The cpu generates a hash for plane 1 with mask 0 applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
The cpu generates a hash for plane 0 with mask 1 applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
The cpu generates a hash for plane 1 with mask 1 applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
The cpu generates a hash for plane 0 with mask 2 applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
The cpu generates a hash for plane 1 with mask 2 applied
It looks through the list of triggers for a matching hash
  Did you find one? If yes, show it and stop executing!
etc. etc.

 

Such a mouthful, and we only got as far as mask 2, way before we even get to having an LCM mode active and running and checking all its masks and triggers; when you add on those additional 24 LCM masks and associated triggers to the end of that algorithm then you have used up a lot of processor cycles, and before long the frame will move on. Whatever Robs post was it really made me think that that's a lot of processing to do and in such a short space of time. It made me aim to always try and get my triggers to fire as early as possible by "exploiting" the above algorithm, as otherwise you genuinely run the risk of the frame having moved on. I can't really explain better what I mean by that, but sometimes for example, I will avoid using a mask entirely and create 20 separate single full screen triggers, as those triggers will be found much earlier than if I had a single trigger using mask 19. Yes, I now have 19 extra triggers to wade through, but look how much earlier in the algorithm they would be detected!

 

However this video mode is such a bespoke and specific case I'm not sure all the normal preferences or best practices apply or can be followed. If you were desperate, I can envisage that you could trigger the lambo with a single bigger mask across the screen bottom, but there would be some extra dumps and triggers required to account for other cars in their positions. A fair bit of extra work for sure, but perhaps not unreasonable if it will recover 2 of those LCM masks, and the npc cars are at least static in their positions on the road. But also a lot of work to undertake to find out it still isn't enough...

Link to comment
Share on other sites

  • Content Provider

I guess I did my version of video mode a lot differently. I "swiss cheesed" all the dynamic bits it , and ignored the lines on the road.

I had it masked so that a road sign or a billboard or a lack of both triggered and filled in most of the hole on the left and right. the last bit was triggered by if there was a CPU car or a player car. where the grass met the road.  

 

Everything was colored in layers and now that Im trying to explain it, its pretty impossible without a ton of pictures.

Link to comment
Share on other sites

  • Content Provider
2 hours ago, sprudeldudel said:

Say top row, for example. Each car can shift by 19 pixels depending on the position of the road.

 

I had a look at a few dumps from real machines and I think the first appearance of all cpu cars can be triggered by a mask consisting of a single row .  We can leave out the case that 3 cars appear at the same time. We have 19 positions and 7 different possibilities left (1 car left/middle/right, two cars left/right ,one left/one right and no car = background only) which means we should be able to cover the top row with  133 frames and a single mask. 

 

 

 

Link to comment
Share on other sites

  • Content Provider
2 hours ago, sprudeldudel said:

first of all: which row will you choose?

row.thumb.png.0bc6ad2f93b7012ffcfff6003b4b22aa.png

 

I would choose this row because it is modified by the first appearance of the car.

The rows below get also modified when the car is moving down the road.

The picture needs to be modified of course because what you constructed here will never happen because it is either one car or two cars but never three.

Link to comment
Share on other sites

  • Content Provider

I guess I would keep it simple and color the first 2 appearences with one color and one area which covers both in the shape of the second appearance and add the details as the car keeps coming nearer.  The eye will not recognize it as those two pictures are only displayed a fragment of a second.

Link to comment
Share on other sites

  • Content Provider
13 hours ago, sprudeldudel said:

1. I will release the realPin with lambo only. I might still tweak this in terms of performance, as time goes by

 

There is a lot of room for improvement already in the original project. You could free up a resources by reducing the number of global masks and packing CM scenes togtether in LCM scenes which reduces the number of global keyframes that need to be checked. 

 

On 10/16/2021 at 9:11 AM, sprudeldudel said:

I thought about the background, but I don't know how to fix it so the cars stand out in front of it, without using all the car masks.

 

For now you can make some kind of compromise be coloring the area above the appearance of the cars (mountain top) and maybe use green as the background color for the side lanes .

lambo.png

Link to comment
Share on other sites

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
×
  • Create New...