[request] Outline/Stroke Object
There seems to be a lot of nifty effect objects out there for Multimedia Fusion, such as the flame object, but why hasnt a simple effect object been developed?
I'm currently working on a game in which I'm trying to highlight objects at certain points of the game. The effect that I would love to have would be able to apply a stroke or outline to an active object at runtime. So if I had an active object, I could do something to the effect of "Apply Stroke to Active: 1 pixel, yellow" and it would outline the object in a yellow border 1 pixel thick.
I know that with HWA, this is possible with a shader. But, for this project there are a number of reasons that I cant use HWA because of all the unsupported extensions and lack of fullscreen.
While I'm on the subject, the ability to colorize an active object, and fade it back to normal would be amazing as well. So say there was an enemy active object, and upon getting hit I could set a mask of red on that active object, turning the entire sprite red. Then it would fade back to its normal palette.
Again, possible with shaders, but I can't use HWA in it's current form.
I figure if we have such advanced and beautiful extensions as the flame object, why not a simple one like this?
Thanks!
Re: [request] Outline/Stroke Object
I'm just guessing but maybe this isn't so simple as it have to calculate visible area of the image. Anyway, wouldn't be simpler to make it using a graphic program, export and import into MMF?
Re: [request] Outline/Stroke Object
Not when I have potentially hundreds of objects, each with their own animations. Doing this at runtime would greatly reduce the need to spend resources making a seperate sprite for an outline of every possible object with every possible frame of animation.
Re: [request] Outline/Stroke Object
This is something that pixel shaders could almost certainly do.
You'd have to take each pixel and draw an outline pixel if and only if the pixel is adjacent to at least one coloured pixel AND at least one transparent pixel AND the pixel itself is a transparent pixel.
Have no idea how you'd implement that in shader code, but I'm pretty sure it would work in principal.
Re: [request] Outline/Stroke Object
Quote:
I know that with HWA, this is possible with a shader. But, for this project there are a number of reasons that I cant use HWA because of all the unsupported extensions and lack of fullscreen.
Doesn't that depend on when you are planning to release the game? If the HWA builds are no longer in beta stage by then, the full-screen support should work nicely as well. That way, you'd only have the game windowed now while you're creating it which should be quite ok.
I guess you have a point though about the unsupported extensions. Which ones are you dependent on?
Re: [request] Outline/Stroke Object
The two big extensions I depend on are active picture (to create the levels) and screen capture object. Yes, the active picture is supposed to work when "Software mode" is enabled, but there seems to be a huge performance hit when I do that (I get lower FPS than I would if I just used Standard display modes) And I cant compromise the screen capture object at this point either.
Re: [request] Outline/Stroke Object
The screen capture object will indeed not work, but I've never had problems with the active picture and HWA. Software mode doesn't have to be enabled, but an exception is if you need it to create background objects (perhaps that is the case here?).
Re: [request] Outline/Stroke Object
I have seen some really impressive stroke/outlines and some were animated as in radiating and throbbing types.
My idea of a good s/o object would be to have both static and dynamic capabilities. Like, mouse-over an AO button that emits radiating outlines that quickly fade out.
Since shaders may be able to do outlines, I doubt if they would animate. Though perhaps changing settings over time could do something like that.
So, an object that could do this as a special effect might be worthwhile and, as said, less time and resource consuming. Special effects are a growing and important area for MMF2.
Re: [request] Outline/Stroke Object
I just think that its odd that the some of the extension developing community has focused on more up scale, crazy effects, such as the particle spray and the flame object, when such basic effects such as color masking and creating stroke/outlines, and drop shadows have been ignored for the most part. Something like this is definitely needed, at least by a few developers.
Re: [request] Outline/Stroke Object
Extensions are often created simply because the developer wants to create a certain kind. Some are created by request or contractually.
Honestly, I don't recall the ones you are requesting coming up much or at all. So, you have now requested them! ;)
I like the ideas, but we really have to leave the potential for their creation up to those who make them.
For instance, there are already many, many extension requests, (some are very much needed) on that big list in the sky :) Now that you have these ideas posted, you never know if and when they might get realized either independently or via EDT or as a feature in future versions from CT.
Thanks for bringing them to mind.
Re: [request] Outline/Stroke Object
To be honest, stroke/outline is a cool way of showing that an object is selected in an RPG or RTS or whatever, but it is a dispensable feature really. I'd reccomend that at least for the software rendered version of your came you just go for some simple selection brackets or something. It probably isn't worth pursueing this for software rendered modes unless you are willing to pay an extension developer for the work.
If you do a little bit of research you should be able to write the pixel shader yourself using the prinicpals i stated earlier.
Re: [request] Outline/Stroke Object
Outlining isn't too difficult as a shader, IF your sprite doesn't use the alpha channel to blend the edges. If it does then it gets a bit more complicated :)
Re: [request] Outline/Stroke Object
xerus/stuckboy, you should know that in the games all the 2D items icons the user can collect are all available in several versions like activated/deactivated/rollover/cliked and so on...
Currently, you can have a colored glow around your object with the corresponding shader I've made and which is available in the Complex-shaders pack. ;)
Re: [request] Outline/Stroke Object
Quote:
Originally Posted by xerus
I just think that its odd that the some of the extension developing community has focused on more up scale, crazy effects, such as the particle spray and the flame object, when such basic effects such as color masking and creating stroke/outlines, and drop shadows have been ignored for the most part. Something like this is definitely needed, at least by a few developers.
agreed, most people can make their own particles but mmf offers no solution for drawing effects like outlines
Re: [request] Outline/Stroke Object
Quote:
Originally Posted by dustingunn
Quote:
Originally Posted by xerus
I just think that its odd that the some of the extension developing community has focused on more up scale, crazy effects, such as the particle spray and the flame object, when such basic effects such as color masking and creating stroke/outlines, and drop shadows have been ignored for the most part. Something like this is definitely needed, at least by a few developers.
agreed, most people can make their own particles but mmf offers no solution for drawing effects like outlines
This has been quite the issue. It'd be easy to make your own outline object, but I guess how a pixel shader might work would be.
2 Values:
Outline thickness - Thickness of the line.
Outline distance - Distance from the edge.
Marked in points, not pixels, so you can have fractions.
You would be able to have alpha channeling, all you'd really need to do is make the outline slightly thicker and closer out the edge, that way it fades out with the alpha channel. If that's how it works of course.
Anyway, that's my two cents. :whistle:
Re: [request] Outline/Stroke Object
So, the ultimate quesition is, is this sort of extension possible?
Re: [request] Outline/Stroke Object
I really need this extension for a program I'm using too. I'm sick and tired of the overlay object and its high RAM usage...
Re: [request] Outline/Stroke Object
Quote:
Originally Posted by Dynasoft
Outlining isn't too difficult as a shader, IF your sprite doesn't use the alpha channel to blend the edges. If it does then it gets a bit more complicated :)
one problem with using a shader is that it would look pixelated if you wanted a thick outline... with an extension it'd probably be possible (or easier) to do a 2xSaI-like effect
another problem is that shaders can't go outside the objects' boundaries (unless said shader is applied to the whole layer, which you might not want), and having a lot of transparent areas as borders can throw off scaling calculations