News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

BMW Nazca C2

Started by Ryoma, March 12, 2022, 05:49:30 PM

Previous topic - Next topic

Ryoma

Not ready yet...in fact, I'm lazy to upload it and make better pictures.

I want to try to make the M12 and C2 version for the same car by playing with the color button.


Ryoma


KyLiE

This looks great! :) I have fond memories of this car from Need For Speed II SE.  Is it not possible to have the timer display correctly?

Ryoma

I don't know. I used a white box for dast and dasm. If I use a red box for the first, it doesn't work. I did not try all the possibilities.

Duplode


Ryoma

#5
Quote from: KyLiE on March 13, 2022, 03:24:22 AM
Is it not possible to have the timer display correctly?

Yes I found one trick !!!!!

I made some testing, only green works well :
blue:number->brown background->tranparent grey shadow->black
green:number->green  background->black shadow->no
red:number->grey background->red shadow->black
yellow:number->grey background->yellow shadow->black
brown:number->red background->red shadow->black

KyLiE

The green timer looks much better.  Excellent work! :)

Ryoma

Yes the question is how to anticipate the color in that case?

Daniel3D

It has something to do with colour value addition or substraction. Black on white becomes transparent.
So there is a clue in there.
Maybe CAS understands how it works.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

KyLiE

I just tested it and I can see that background objects interfere with the timer.  Perhaps the best solution is to make it transparent.  The transparency mask for this is attached.

Ryoma

I don't know the green is like an HUD and the white like an hole.

With the green, we can make a sunshields (green tinted glass on the top)  like old car.

Cas

Uhm... I have to study which colour numbers result in what to give an exact answer, but what I can tell you is this:

- On every frame, Stunts will first paste "dasm" by performing an AND operator against the rendered background with the dasm values
- Next, it will paste "dast" by performing an OR operator on top. This is the fastest way to do masking with legacy hardware

The clock is drawn either before both or after both or in between. I guess it's before both. I would also guess that Stunts uses the same procedure to draw the digital speedometer numbers as it uses to draw the clock, but instead of using the car number font, it goes for the default system clock font. This procedure is designed for a full mask, just like the masking system in dasm/dast. The engine is supposed to first AND and then OR and the mask is supposed to only use values 255 and 0; otherwise, you get mixed colours.

My guess is that Stunts can tell if you use a roof that it has to move down the clock, but it never expects that you'll get dasm/dast to the top, so the clock stays at the same position. Notice you can exploit this to better accommodate the clock. If you would use normal masking (all 255 or 0 in dasm), you'd cover the clock and it wouldn't be visible. But if you use something else, you'd only be masking some bits out. The clock colours, I think, must be 15 for the numbers and 0 for the shadow; that's the four lower bits on for the lock and all off for the shadow. If you use a green (2) mask, you're letting only bit 1 through. When on top of that, dast has a 0, you're not changing the colour, so the numbers look green. The problem here is that, if there would be anything green in the background, it would get filtered in too. Not just that, but any background colour that has its bit 1 on will get into the clock and corrupt it. Try driving the car looking at different track elements. At some point, you may encounter something that uses such colour. The more bits you filter in, the greater the chance that this happens, so safest colours would be: 1, 2, 4 and 8. Greater than that, there'd be no clock, as the colour value is 15. But even these colours, none is completely safe.
Earth is my country. Science is my religion.

Ryoma

Thanks cas, how I colorize with GIMP a color 1, 2, 4 and 8 ? I will try these 4 colors.

Daniel3D

Quote from: KyLiE on March 18, 2022, 06:14:24 PM
I just tested it and I can see that background objects interfere with the timer.  Perhaps the best solution is to make it transparent.  The transparency mask for this is attached.
I noticed that too. That is an unfortunate but kind of logical since the timer is behind the interior image.
One way I can think of to limit this is to make a mask for just the pixels where numbers can be, and make the rest solid.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Ryoma