Bad Mood : Falcon030 'Doom'

All 680x0 related coding posts in this section please.

Moderators: Zorro 2, Moderator Team

User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3999
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

dml wrote:Playing random MIDI files will probably be quite erratic. :) But I'll tidy up the convertor so its all standalone and you can find out for yourself.

The two main problems are the soundfont (which is 'optimized' for Doom, with plenty of gaps in it) and some missing controllers. The 'dukin' track actually has a controller which does some sort of cross-mixing between the two lead channels but it's not the volume or panning ones because fruityloops completely ignores it too. So there are probably lots of weird things like that which would need added/fixed for general purpose use.
There are several things that I was thinking of trying:
- music which needs just one good, "generic" instrument such as piano or acustic guitar (e.g. Bach piano pieces, or melodies for TV-series)
- music with lot of tracks, pitchbend & other control changes. With some of these even FluidSynth on Linux had trouble on my previous (~1GHz) machine when it tried to play everything. In Falcon case this needs good priority/discard handling
- music needing good instrument match

Does your soundfont have (a good) piano sound? AFAIK with older sound card fonts that could take a sizable part of the whole sound font.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Eero Tamminen wrote: There are several things that I was thinking of trying:
- music which needs just one good, "generic" instrument such as piano or acustic guitar (e.g. Bach piano pieces, or melodies for TV-series)
- music with lot of tracks, pitchbend & other control changes. With some of these even FluidSynth on Linux had trouble on my previous (~1GHz) machine when it tried to play everything. In Falcon case this needs good priority/discard handling
- music needing good instrument match
It should be easy to break it with all/any of those, plus a bunch of more innocent cases. :)
Eero Tamminen wrote: Does your soundfont have (a good) piano sound? AFAIK with older sound card fonts that could take a sizable part of the whole sound font.
It has no piano sound - none are referenced by the Doom tracks so I didn't add any, to save memory (and time on my part). It does have a harpsichord(!) due to Bobby Prince changing it from piano, apparently as a joke, and everyone liked it. So it's now in my font also :)

There are lots of guitar sounds - not all of the MIDI guitars are implemented but the ones which are have several samples each, for octave shifts.

However after BM is released (in a month or two, now) I'll probably redo the soundfont and make it a bit more general, so it should work more often with less fiddling of instrument mappings.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3999
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

I think harpsicord should be fine, expecially for Bach:
http://en.wikipedia.org/wiki/Harpsichor ... arpsichord

(But Bach sounds good regardless of instrument. :-))
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Eero Tamminen wrote:I think harpsicord should be fine, expecially for Bach:
http://en.wikipedia.org/wiki/Harpsichor ... arpsichord

(But Bach sounds good regardless of instrument. :-))
Maybe its time for a Falcon rendition of BWV 578 :)
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Just for the sake of complete and total insanity - 'Fugue in G minor, BWV 578' rendered as you probably haven't heard it before...

On a Falcon, played with Doom electric guitars.

https://dl.dropboxusercontent.com/u/12947585/bwv578.mp3

g'night
ausl8
Atari User
Atari User
Posts: 41
Joined: Tue May 03, 2011 12:53 am

Re: Bad Mood : Falcon030 'Doom'

Post by ausl8 »

Insanity indeed! That made my morning.....
User avatar
dma
Atari God
Atari God
Posts: 1223
Joined: Wed Nov 20, 2002 11:22 pm
Location: France

Re: Bad Mood : Falcon030 'Doom'

Post by dma »

Play it twice as fast and you got some Malmsteen sounding stuff. ;)
User avatar
dhedberg
Atari God
Atari God
Posts: 1388
Joined: Mon Aug 30, 2010 8:36 am

Re: Bad Mood : Falcon030 'Doom'

Post by dhedberg »

Any news regarding the BM release? Don't mean to stress you out, just curious! ;-)
Daniel, New Beat - http://newbeat.atari.org.
Like demos? Have a look at our new Falcon030 demo It's that time of the year again, or click here to feel the JOY.
kristjanga
Captain Atari
Captain Atari
Posts: 400
Joined: Sat Jul 25, 2009 3:35 pm

Re: Bad Mood : Falcon030 'Doom'

Post by kristjanga »

Doug will release binary soon
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Yes the code is finished enough to release now although there are some options which can't be set in the config file yet, and will need separate builds. So it will be released initially as several binaries until I get around to that.

The WAD isn't finished yet but not much to do - will release once the final demo and credit screens are added to the WAD.
User avatar
dma
Atari God
Atari God
Posts: 1223
Joined: Wed Nov 20, 2002 11:22 pm
Location: France

Re: Bad Mood : Falcon030 'Doom'

Post by dma »

Great news, thanks!
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Something I was playing with a while back... did some work on an image filter which subtly adds shading and richness to textures, while preserving detail. It aims to upgrade 256-colour textures to truecolour. This will be handy for BadMooD.

before/after:
i.png
o.png
before/after:
i2.png
o2.png
It needs some tweaking to cope with different contrast ranges but gives decent results on quite a few of the textures.
You do not have the required permissions to view the files attached to this post.
User avatar
exxos
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England

Re: Bad Mood : Falcon030 'Doom'

Post by exxos »

That looks pretty awesome :)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

It's an ImageMagick script I cobbled together using the image calculator function. It's unfinished and full of magic numbers but I have attached an interim version below if anyone is interested in that stuff.

You can have a go by installing the ImageMagick commandline tools and run the script from a bash shell (cygwin, linux, darwin etc..).

It produces a large number of intermediate png files, but so what :)


# todo: parameterize everything properly

convert FLOOR5_1.png -fx 'p' i.png

# split r,g,b

convert i.png -fx 'r' r.png
convert i.png -fx 'g' g.png
convert i.png -fx 'b' b.png

# 1x3 edge detect x:y

convert r.png -fx 'pow(abs(((p[-1,0]*-1.0) + (p[0,0]*2.0) + (p[1,0]*-1.0)) / 1.0), 0.5) * 1.05' rxe3.png
convert g.png -fx 'pow(abs(((p[-1,0]*-1.0) + (p[0,0]*2.0) + (p[1,0]*-1.0)) / 1.0), 0.5) * 1.05' gxe3.png
convert b.png -fx 'pow(abs(((p[-1,0]*-1.0) + (p[0,0]*2.0) + (p[1,0]*-1.0)) / 1.0), 0.5) * 1.05' bxe3.png

convert r.png -fx 'pow(abs(((p[0,-1]*-1.0) + (p[0,0]*2.0) + (p[0,1]*-1.0)) / 1.0), 0.5) * 1.05' rye3.png
convert g.png -fx 'pow(abs(((p[0,-1]*-1.0) + (p[0,0]*2.0) + (p[0,1]*-1.0)) / 1.0), 0.5) * 1.05' gye3.png
convert b.png -fx 'pow(abs(((p[0,-1]*-1.0) + (p[0,0]*2.0) + (p[0,1]*-1.0)) / 1.0), 0.5) * 1.05' bye3.png

# 1x3 filter x:y

convert r.png -fx '(((p[-1,0]*1.0) + (p[0,0]*2.0) + (p[1,0]*1.0)) / 4.0)' rxf3.png
convert g.png -fx '(((p[-1,0]*1.0) + (p[0,0]*2.0) + (p[1,0]*1.0)) / 4.0)' gxf3.png
convert b.png -fx '(((p[-1,0]*1.0) + (p[0,0]*2.0) + (p[1,0]*1.0)) / 4.0)' bxf3.png

convert r.png -fx '(((p[0,-1]*1.0) + (p[0,0]*2.0) + (p[0,1]*1.0)) / 4.0)' ryf3.png
convert g.png -fx '(((p[0,-1]*1.0) + (p[0,0]*2.0) + (p[0,1]*1.0)) / 4.0)' gyf3.png
convert b.png -fx '(((p[0,-1]*1.0) + (p[0,0]*2.0) + (p[0,1]*1.0)) / 4.0)' byf3.png

# 1x5 edge detect x:y

convert r.png -fx 'pow(abs(((p[-2,0]*-1.0) + (p[-1,0]*-1.0) + (p[0,0]*4.0) + (p[1,0]*-1.0) + (p[2,0]*-1.0)) / 2.0), 1.2) * 1.5' rxe5.png
convert g.png -fx 'pow(abs(((p[-2,0]*-1.0) + (p[-1,0]*-1.0) + (p[0,0]*4.0) + (p[1,0]*-1.0) + (p[2,0]*-1.0)) / 2.0), 1.2) * 1.5' gxe5.png
convert b.png -fx 'pow(abs(((p[-2,0]*-1.0) + (p[-1,0]*-1.0) + (p[0,0]*4.0) + (p[1,0]*-1.0) + (p[2,0]*-1.0)) / 2.0), 1.2) * 1.5' bxe5.png

convert r.png -fx 'pow(abs(((p[0,-2]*-1.0) + (p[0,-1]*-1.0) + (p[0,0]*4.0) + (p[0,1]*-1.0) + (p[0,2]*-1.0)) / 2.0), 1.2) * 1.5' rye5.png
convert g.png -fx 'pow(abs(((p[0,-2]*-1.0) + (p[0,-1]*-1.0) + (p[0,0]*4.0) + (p[0,1]*-1.0) + (p[0,2]*-1.0)) / 2.0), 1.2) * 1.5' gye5.png
convert b.png -fx 'pow(abs(((p[0,-2]*-1.0) + (p[0,-1]*-1.0) + (p[0,0]*4.0) + (p[0,1]*-1.0) + (p[0,2]*-1.0)) / 2.0), 1.2) * 1.5' bye5.png

# 1x5 filter x:y

convert r.png -fx '(((p[-2,0]*1.0) + (p[-1,0]*2.0) + (p[0,0]*3.0) + (p[1,0]*2.0) + (p[2,0]*1.0)) / 9.0)' rxf5.png
convert g.png -fx '(((p[-2,0]*1.0) + (p[-1,0]*2.0) + (p[0,0]*3.0) + (p[1,0]*2.0) + (p[2,0]*1.0)) / 9.0)' gxf5.png
convert b.png -fx '(((p[-2,0]*1.0) + (p[-1,0]*2.0) + (p[0,0]*3.0) + (p[1,0]*2.0) + (p[2,0]*1.0)) / 9.0)' bxf5.png

convert r.png -fx '(((p[0,-2]*1.0) + (p[0,-1]*2.0) + (p[0,0]*3.0) + (p[0,1]*2.0) + (p[0,2]*1.0)) / 9.0)' ryf5.png
convert g.png -fx '(((p[0,-2]*1.0) + (p[0,-1]*2.0) + (p[0,0]*3.0) + (p[0,1]*2.0) + (p[0,2]*1.0)) / 9.0)' gyf5.png
convert b.png -fx '(((p[0,-2]*1.0) + (p[0,-1]*2.0) + (p[0,0]*3.0) + (p[0,1]*2.0) + (p[0,2]*1.0)) / 9.0)' byf5.png


# selective mixer 3x1:5x1

convert rxe5.png rxf3.png rxf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' rxc3.png
convert gxe5.png gxf3.png gxf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' gxc3.png
convert bxe5.png bxf3.png bxf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' bxc3.png

convert rye5.png rxf3.png ryf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' ryc3.png
convert gye5.png gxf3.png gyf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' gyc3.png
convert bye5.png bxf3.png byf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' byc3.png


# selective mixer 1x1:3x1

convert rxe3.png r.png rxc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' rxc.png
convert gxe3.png g.png gxc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' gxc.png
convert bxe3.png b.png bxc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' bxc.png

convert rye3.png r.png ryc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' ryc.png
convert gye3.png g.png gyc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' gyc.png
convert bye3.png b.png byc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' byc.png


#convert rxe3.png rxc.png rye3.png ryc.png -fx '(u[0] < u[2]) ? u[1] : u[3]' rc.png
#convert gxe3.png gxc.png gye3.png gyc.png -fx '(u[0] < u[2]) ? u[1] : u[3]' gc.png
#convert bxe3.png bxc.png bye3.png byc.png -fx '(u[0] < u[2]) ? u[1] : u[3]' bc.png


# inverse selective mixer x:y

convert rxe3.png rxc.png rye3.png ryc.png -fx '(((0.001+u[2]) * u[1]) + ((0.001+u[0]) * u[3])) / ((0.001+u[0])+(0.001+u[2]))' rc.png
convert gxe3.png gxc.png gye3.png gyc.png -fx '(((0.001+u[2]) * u[1]) + ((0.001+u[0]) * u[3])) / ((0.001+u[0])+(0.001+u[2]))' gc.png
convert bxe3.png bxc.png bye3.png byc.png -fx '(((0.001+u[2]) * u[1]) + ((0.001+u[0]) * u[3])) / ((0.001+u[0])+(0.001+u[2]))' bc.png

convert rc.png gc.png bc.png -channel RGB -combine o.png
User avatar
dhedberg
Atari God
Atari God
Posts: 1388
Joined: Mon Aug 30, 2010 8:36 am

Re: Bad Mood : Falcon030 'Doom'

Post by dhedberg »

Awesome! ImageMagick comes in handy sometimes! :-)
Daniel, New Beat - http://newbeat.atari.org.
Like demos? Have a look at our new Falcon030 demo It's that time of the year again, or click here to feel the JOY.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

dhedberg wrote:Awesome! ImageMagick comes in handy sometimes! :-)
It does indeed :)

I always thought there must be a kind of 'coders armoury' listing of useful graphics coding tools, and this should be in it! Along with POVRay and a few other surprisingly re-purposeable things...
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Another sample, on a tricky texture with unshaded black areas (256 colour version didn't have darker reds available).

New script has been parameterized and you can set a floor on the source so the filter will soften & shade dark patches like this while retaining dark edges.

before/after:
i.png
o.png
Most of the intermediate files get emitted to tmp/ but a few are retained at the working directory to provide feedback on the floor and edge detection steps and guide settings. The filter steps themselves don't need adjusted.

Invoke the script like this:

./texfilter.sh WALL49_1.png

Arguments:

FLOOR sets a lower limit the source pixel intensity for the edge detector, so transitions to dark areas won't be considered as large transitions. Set with care and watch 'floor.png' to make sure the image doesn't saturate out.
floor.png
GAIN is used to amplify pixel variations in the source image before edge detection. Useful on low-contrast images otherwise leave it alone.

GAM? sets the gamma (power) curve for the edge detector. higher values will retain only the sharpest details. Lower values will retain more detail in other parts but will limit opportunities for shading with new colours.

MAG? sets the final overall magnitude (brightness) of the edge detection. If GAM? seems correct but the edge detect looks too dark or too bright you can fudge it into the right range as a final step with this.

The 3 and 5 refer to the 3x1 and 5x1 soften filters used to add shading. Each one has its own edge detector and filter, so you may have to adjust each differently to get the edge detector maps to look sensible and get decent results out.

You can monitor the edge detection output by looking at edge3.png and edge5.png. Try to get the brightest pixels fairly bright, and the darkest areas black, with some kind of variation in between. If you're getting muddy grey all over, the GAM or FLOOR is wrong. If you're getting mostly black with white dots, reduce GAM and play with MAG for that edge detector. If you are having trouble picking out detail from a low-contrast image, increase GAIN. Likewise, perhaps reduce it if the source texture is already high contrast.
edge3.png
edge5.png
You'll have to try different settings with different textures to get optimal results but these png files are a fair guide to the results you'll get out.
FLOOR="0.3"
GAIN="2.0"

GAM3="0.75"
MAG3="1.05"

GAM5="1.0"
MAG5="1.5"

mkdir tmp

# todo: parameterize everything properly

convert $1 -fx 'p' i.png

# split r,g,b

convert i.png -fx 'r' tmp/r.png
convert i.png -fx 'g' tmp/g.png
convert i.png -fx 'b' tmp/b.png

convert tmp/r.png -fx 'flr='$FLOOR'; max(p,flr)' tmp/r0.png
convert tmp/g.png -fx 'flr='$FLOOR'; max(p,flr)' tmp/g0.png
convert tmp/b.png -fx 'flr='$FLOOR'; max(p,flr)' tmp/b0.png

convert tmp/r0.png tmp/b0.png tmp/g0.png -fx 'max(max(u[0],u[1]),u[2])' floor.png

# 1x3 edge detect x:y

convert tmp/r0.png -virtual-pixel tile -fx 'mf='$MAG3'; gf='$GAIN'; pf='$GAM3'; pow(abs((((p[-1,0]*-1.0) + (p[0,0]*2.0) + (p[1,0]*-1.0)) * gf) / 2.0), pf) * mf' tmp/rxe3.png
convert tmp/g0.png -virtual-pixel tile -fx 'mf='$MAG3'; gf='$GAIN'; pf='$GAM3'; pow(abs((((p[-1,0]*-1.0) + (p[0,0]*2.0) + (p[1,0]*-1.0)) * gf) / 2.0), pf) * mf' tmp/gxe3.png
convert tmp/b0.png -virtual-pixel tile -fx 'mf='$MAG3'; gf='$GAIN'; pf='$GAM3'; pow(abs((((p[-1,0]*-1.0) + (p[0,0]*2.0) + (p[1,0]*-1.0)) * gf) / 2.0), pf) * mf' tmp/bxe3.png

convert tmp/r0.png -virtual-pixel tile -fx 'mf='$MAG3'; gf='$GAIN'; pf='$GAM3'; pow(abs((((p[0,-1]*-1.0) + (p[0,0]*2.0) + (p[0,1]*-1.0)) * gf) / 2.0), pf) * mf' tmp/rye3.png
convert tmp/g0.png -virtual-pixel tile -fx 'mf='$MAG3'; gf='$GAIN'; pf='$GAM3'; pow(abs((((p[0,-1]*-1.0) + (p[0,0]*2.0) + (p[0,1]*-1.0)) * gf) / 2.0), pf) * mf' tmp/gye3.png
convert tmp/b0.png -virtual-pixel tile -fx 'mf='$MAG3'; gf='$GAIN'; pf='$GAM3'; pow(abs((((p[0,-1]*-1.0) + (p[0,0]*2.0) + (p[0,1]*-1.0)) * gf) / 2.0), pf) * mf' tmp/bye3.png

convert tmp/rxe3.png tmp/gxe3.png tmp/bxe3.png -fx 'max(max(u[0],u[1]),u[2])' tmp/xedge3.png
convert tmp/rye3.png tmp/gye3.png tmp/bye3.png -fx 'max(max(u[0],u[1]),u[2])' tmp/yedge3.png
convert tmp/xedge3.png tmp/yedge3.png -fx 'max(u[0],u[1])' edge3.png

# 1x3 filter x:y

convert tmp/r.png -virtual-pixel tile -fx '(((p[-1,0]*1.0) + (p[0,0]*2.0) + (p[1,0]*1.0)) / 4.0)' tmp/rxf3.png
convert tmp/g.png -virtual-pixel tile -fx '(((p[-1,0]*1.0) + (p[0,0]*2.0) + (p[1,0]*1.0)) / 4.0)' tmp/gxf3.png
convert tmp/b.png -virtual-pixel tile -fx '(((p[-1,0]*1.0) + (p[0,0]*2.0) + (p[1,0]*1.0)) / 4.0)' tmp/bxf3.png

convert tmp/r.png -virtual-pixel tile -fx '(((p[0,-1]*1.0) + (p[0,0]*2.0) + (p[0,1]*1.0)) / 4.0)' tmp/ryf3.png
convert tmp/g.png -virtual-pixel tile -fx '(((p[0,-1]*1.0) + (p[0,0]*2.0) + (p[0,1]*1.0)) / 4.0)' tmp/gyf3.png
convert tmp/b.png -virtual-pixel tile -fx '(((p[0,-1]*1.0) + (p[0,0]*2.0) + (p[0,1]*1.0)) / 4.0)' tmp/byf3.png

# 1x5 edge detect x:y

convert tmp/r0.png -virtual-pixel tile -fx 'mf='$MAG5'; gf='$GAIN'; pf='$GAM5'; pow(abs((((p[-2,0]*-1.0) + (p[-1,0]*-1.0) + (p[0,0]*4.0) + (p[1,0]*-1.0) + (p[2,0]*-1.0)) * gf) / 4.0), pf) * mf' tmp/rxe5.png
convert tmp/g0.png -virtual-pixel tile -fx 'mf='$MAG5'; gf='$GAIN'; pf='$GAM5'; pow(abs((((p[-2,0]*-1.0) + (p[-1,0]*-1.0) + (p[0,0]*4.0) + (p[1,0]*-1.0) + (p[2,0]*-1.0)) * gf) / 4.0), pf) * mf' tmp/gxe5.png
convert tmp/b0.png -virtual-pixel tile -fx 'mf='$MAG5'; gf='$GAIN'; pf='$GAM5'; pow(abs((((p[-2,0]*-1.0) + (p[-1,0]*-1.0) + (p[0,0]*4.0) + (p[1,0]*-1.0) + (p[2,0]*-1.0)) * gf) / 4.0), pf) * mf' tmp/bxe5.png

convert tmp/r0.png -virtual-pixel tile -fx 'mf='$MAG5'; gf='$GAIN'; pf='$GAM5'; pow(abs((((p[0,-2]*-1.0) + (p[0,-1]*-1.0) + (p[0,0]*4.0) + (p[0,1]*-1.0) + (p[0,2]*-1.0)) * gf) / 4.0), pf) * mf' tmp/rye5.png
convert tmp/g0.png -virtual-pixel tile -fx 'mf='$MAG5'; gf='$GAIN'; pf='$GAM5'; pow(abs((((p[0,-2]*-1.0) + (p[0,-1]*-1.0) + (p[0,0]*4.0) + (p[0,1]*-1.0) + (p[0,2]*-1.0)) * gf) / 4.0), pf) * mf' tmp/gye5.png
convert tmp/b0.png -virtual-pixel tile -fx 'mf='$MAG5'; gf='$GAIN'; pf='$GAM5'; pow(abs((((p[0,-2]*-1.0) + (p[0,-1]*-1.0) + (p[0,0]*4.0) + (p[0,1]*-1.0) + (p[0,2]*-1.0)) * gf) / 4.0), pf) * mf' tmp/bye5.png

convert tmp/rxe5.png tmp/gxe5.png tmp/bxe5.png -fx 'max(max(u[0],u[1]),u[2])' tmp/xedge5.png
convert tmp/rye5.png tmp/gye5.png tmp/bye5.png -fx 'max(max(u[0],u[1]),u[2])' tmp/yedge5.png
convert tmp/xedge5.png tmp/yedge5.png -fx 'max(u[0],u[1])' edge5.png

# 1x5 filter x:y

convert tmp/r.png -virtual-pixel tile -fx '(((p[-2,0]*1.0) + (p[-1,0]*2.0) + (p[0,0]*3.0) + (p[1,0]*2.0) + (p[2,0]*1.0)) / 9.0)' tmp/rxf5.png
convert tmp/g.png -virtual-pixel tile -fx '(((p[-2,0]*1.0) + (p[-1,0]*2.0) + (p[0,0]*3.0) + (p[1,0]*2.0) + (p[2,0]*1.0)) / 9.0)' tmp/gxf5.png
convert tmp/b.png -virtual-pixel tile -fx '(((p[-2,0]*1.0) + (p[-1,0]*2.0) + (p[0,0]*3.0) + (p[1,0]*2.0) + (p[2,0]*1.0)) / 9.0)' tmp/bxf5.png

convert tmp/r.png -virtual-pixel tile -fx '(((p[0,-2]*1.0) + (p[0,-1]*2.0) + (p[0,0]*3.0) + (p[0,1]*2.0) + (p[0,2]*1.0)) / 9.0)' tmp/ryf5.png
convert tmp/g.png -virtual-pixel tile -fx '(((p[0,-2]*1.0) + (p[0,-1]*2.0) + (p[0,0]*3.0) + (p[0,1]*2.0) + (p[0,2]*1.0)) / 9.0)' tmp/gyf5.png
convert tmp/b.png -virtual-pixel tile -fx '(((p[0,-2]*1.0) + (p[0,-1]*2.0) + (p[0,0]*3.0) + (p[0,1]*2.0) + (p[0,2]*1.0)) / 9.0)' tmp/byf5.png


# selective mixer 3x1:5x1

convert tmp/rxe5.png tmp/rxf3.png tmp/rxf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/rxc3.png
convert tmp/gxe5.png tmp/gxf3.png tmp/gxf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/gxc3.png
convert tmp/bxe5.png tmp/bxf3.png tmp/bxf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/bxc3.png

convert tmp/rye5.png tmp/rxf3.png tmp/ryf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/ryc3.png
convert tmp/gye5.png tmp/gxf3.png tmp/gyf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/gyc3.png
convert tmp/bye5.png tmp/bxf3.png tmp/byf5.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/byc3.png


# selective mixer 1x1:3x1

convert tmp/rxe3.png tmp/r.png tmp/rxc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/rxc.png
convert tmp/gxe3.png tmp/g.png tmp/gxc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/gxc.png
convert tmp/bxe3.png tmp/b.png tmp/bxc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/bxc.png

convert tmp/rye3.png tmp/r.png tmp/ryc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/ryc.png
convert tmp/gye3.png tmp/g.png tmp/gyc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/gyc.png
convert tmp/bye3.png tmp/b.png tmp/byc3.png -fx '((0.0+u[0]) * u[1]) + ((1.0-u[0]) * u[2])' tmp/byc.png


#convert tmp/rxe3.png tmp/rxc.png tmp/rye3.png tmp/ryc.png -fx '(u[0] < u[2]) ? u[1] : u[3]' tmp/rc.png
#convert tmp/gxe3.png tmp/gxc.png tmp/gye3.png tmp/gyc.png -fx '(u[0] < u[2]) ? u[1] : u[3]' tmp/gc.png
#convert tmp/bxe3.png tmp/bxc.png tmp/bye3.png tmp/byc.png -fx '(u[0] < u[2]) ? u[1] : u[3]' tmp/bc.png


# inverse selective mixer x:y

convert tmp/rxe3.png tmp/rxc.png tmp/rye3.png tmp/ryc.png -fx '(((0.001+u[2]) * u[1]) + ((0.001+u[0]) * u[3])) / ((0.001+u[0])+(0.001+u[2]))' tmp/rc.png
convert tmp/gxe3.png tmp/gxc.png tmp/gye3.png tmp/gyc.png -fx '(((0.001+u[2]) * u[1]) + ((0.001+u[0]) * u[3])) / ((0.001+u[0])+(0.001+u[2]))' tmp/gc.png
convert tmp/bxe3.png tmp/bxc.png tmp/bye3.png tmp/byc.png -fx '(((0.001+u[2]) * u[1]) + ((0.001+u[0]) * u[3])) / ((0.001+u[0])+(0.001+u[2]))' tmp/bc.png

convert tmp/rc.png tmp/gc.png tmp/bc.png -channel RGB -combine o.png
[EDIT]

The previous floor tile converts reasonably well with these settings:

FLOOR="0.0"
GAIN="2.0"

GAM3="0.5"
MAG3="1.25"

GAM5="0.8"
MAG5="1.5"
You do not have the required permissions to view the files attached to this post.
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3999
Joined: Sun Jul 31, 2011 1:11 pm

Re: Bad Mood : Falcon030 'Doom'

Post by Eero Tamminen »

Looks good. Noisy textures are bad especially when the amount of pixels visible is low, so this can nicely enhance both BM & Quake. People (not following this thread) looking at it don't recognize why it looks so good, because awesomeness comes from nearly invisible / subtle details. ;-)
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Eero Tamminen wrote:Looks good. Noisy textures are bad especially when the amount of pixels visible is low, so this can nicely enhance both BM & Quake. People (not following this thread) looking at it don't recognize why it looks so good, because awesomeness comes from nearly invisible / subtle details. ;-)
It definitely helps a bit - you don't notice too much difference in individual textures but when several are replaced together the appearance improves.

There are actually a few different kinds of improved texture to be used in BM:

1) complete truecolour replacements (e.g. sky textures)
2) truecolour replacements of original graphics (some wall, floor textures)
3) enhanced/processed versions of original 256colour graphics (anything not covered by 1 & 2 which looks like it needs improvement)

There was also some code written for...

4) high-res versions of existing textures

...but this is tricky for floor textures since it precludes direct DSP texturing - not enough space - and therefore affects performance, and it turned out not to be very effective vs storage cost for things like wall or sky textures so if it is done at all it will be for skies alone, and probably on one axis only (resolution doubled on x axis)

Some updated textures will be present in the first release but a sort of texture upgrade pack will have to follow later since there won't be time to do everything in one go.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

So at the last minute I ran into a heap of obscure bugs, including a nasty one that prevents demo recordings from replaying properly if monsters are present. I have been unable to find the reason for this desync even if the source has been narrowed down to one thing. I doubt there's time to figure it out and fix it properly just now - not least because each 'test' requires the recording of several minutes of demo and then playing it back - so the initial attract loop will have to be monster-free until it does get fixed.

The other problems have either been quickly fixed or are minor and will get fixed later.

So the last step is putting all of the separate bits into one PWAD (they are still scattered around as separate WADs or loose files) and making sure the graphics all work correctly in both VGA and RGB modes, and that it still all works on a real Falcon with the final PWAD (more tedious fun with ARJ and floppy emulator, or CFlash formatting headaches!).

Some of the replacement textures need to remain outside of the PWAD for now because the reader for those hasn't been updated to cope with WADs. This is minor though and will get tidied up later.

I also need to fill some gaps in the music entries. Some of the music isn't final yet but will have to do for a first release. I also found a performance related bug in the music player which needs fixed sometime (if pitchbend pushes a channel up or down to the next full note, it gets a bit confused and resamples it into the cache while using a mixer that ignores the cache anyway, and in tracks with pitchbend its quite common)

But apart from all of that it looks like things are still on course for a first release.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Off it goes to SV2014. An awesome individual (!thanks!) offered to take the files along - so providing it works and I didn't forget some files, it should hopefully appear at the party.

If it all goes very wrong, a download link will appear during/after the party anyway :)


Some last-minute compromises and fails...

The music track chosen for the demo loop turns out to be a bit CPU heavy on a real F030 so I'll probably need to change it again later to get a better FPS during attract mode. The MIDI tracks vary a lot in cost because of the way they work. For some reason Hatari shows less of a hit. Ingame tracks are ok though.

The demo desync problem with monsters present. Only one monster present currently (a very short-lived appearance)

I also ran into a nasty problem with GCC libraries again - linked to the 030 libs, which presume you have a FPU fitted. So I had to relink against the 68000 libraries at the last minute and resend! This invalidates some of the testing I did, but hopefully not too much...
EvilFranky
Atari Super Hero
Atari Super Hero
Posts: 926
Joined: Thu Sep 11, 2003 10:49 pm
Location: UK

Re: Bad Mood : Falcon030 'Doom'

Post by EvilFranky »

Doug - When it comes to the release will you be able to provide a link to 1.44MB ARJ files too?

This will make it 10 times easier for some of us that only have the means of floppy disk to transfer the files across :wink:
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

EvilFranky wrote:Doug - When it comes to the release will you be able to provide a link to 1.44MB ARJ files too?

This will make it 10 times easier for some of us that only have the means of floppy disk to transfer the files across :wink:
Good point. Yes I will.
EvilFranky
Atari Super Hero
Atari Super Hero
Posts: 926
Joined: Thu Sep 11, 2003 10:49 pm
Location: UK

Re: Bad Mood : Falcon030 'Doom'

Post by EvilFranky »

Champion! :mrgreen: :cheers:
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: Bad Mood : Falcon030 'Doom'

Post by dml »

Ok a build will be out later today. I had to fix some bugs at the weekend.

Will likely post a simple zip first then a set of spanned ARJs afterwards. They will probably appear on the BM site.

To be clear - this will be the 'beta' release. It's mostly code-complete. Some late fixes (for demo recording) and graphics/music changes will arrive in the final one.

Return to “680x0”