YOUR ACCOUNT

Messages 1 - 45 of 354
First | Prev. | 1 2 3 4 5 | Next | Last 
Login or Register to post new topics or replies
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Seems like I have more ideas than I'll ever have time to try, so I better write them down somewhere in case someone else has use for them.

Multi-pass filters

These are filters that have two or more "modes" (switched by a checkbox or selector), that first generate a starting image or an intermediate image and on the next application generate either the next step or the final image.

Example: Etch-A-Sketch. First application "shake mode" would draw the Etch-A-Sketch and one line. Subsequent application in "draw mode" would draw one more line each time without altering the image otherwise, just adding a line each time. Line beginning and end would be controlled by sliders.

Storing and retrieving information from image

For multi-pass filters, you might want to be able to store information that will be used in the next pass. Using the same Etch-A-Sketch example, you might want to store the x and y coordinates of where the last line ended so you can use it as the beginning coordinates of the next line in the next pass.

There are a couple of ways of doing this. They are based on embedding a couple of pixels that represent the number (0=black, 100=white). A rather neat way would be to use an area that is transparent, so as to hide the pixels from view altogether. For instance, in the Etch-A-Sketch filter, the four corners are transparent. You could store the values there in the RGB channels and retrieve them from there.

As this may not be enough of an explanation, the method to get the stored numbers back out and into use involves enlarging those pixels to cover the entire image area. Then you can use them in any green component input.

Other uses for transparency

Or you can store a whole bunch of information temporarily as transparency. Let's say you want to modify a height map over a number of passes of a filter. You could do a Set Alpha to temporarily use the transparency of the image to store the height map and Get Alpha in the next pass to retrieve it. Since FF does not remove any of the RGB information during this operation, it is non-destructive and can be used as many times as you want.

Boolean Logic

The easiest way to implement "IF ____( AND/OR/XOR ____) THEN" functionality into a filter is to use black and white to represent FALSE and TRUE. Then you can do blends to make boolean logic decisions. Blend modes work as follows:

Maximum = OR
Minimum = AND
Difference = XOR

Then you can use the result as opacity in another blend.

Okay, that may be difficult to comprehend. Here's two examples:

Say you only want to flip an image IF the center pixel is lighter than 50%. Okay, you would enlarge the center pixel to cover the entire image and threshold it at 50. Then you would use the outcome (which is basically TRUE or FALSE) as the opacity in a blend in which Background is flipped and Foreground isn't.

Follow?

Second example: You only want to flip an image IF the center pixel is lighter than 50% AND the transparency of the center pixel is less than 75. In this case, you would do the same with the threshold. Then you would do a similar operation on the transparency (Get alpha, enlarge to cover whole image, threshold at 75). Now you have two outputs, one which tells you whether the center pixel is lighter than 50% (white or black for TRUE or FALSE) and another that tells you whether its transparency is less than 75 (TRUE or FALSE). You want them both to be true, so you blend them with minimum (boolean AND operation) and get TRUE or FALSE. Then feed this into the opacity of the flipped/non-flipped blend.

If you read the above many times enough and try it, I'm sure it will eventually make sense.
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
Quote
Multi-pass filters

These are filters that have two or more "modes" (switched by a checkbox or selector), that first generate a starting image or an intermediate image and on the next application generate either the next step or the final image.

Example: Etch-A-Sketch. First application "shake mode" would draw the Etch-A-Sketch and one line. Subsequent application in "draw mode" would draw one more line each time without altering the image otherwise, just adding a line each time. Line beginning and end would be controlled by sliders.


i like this one. it's similar to something i asked for once, looping. goes well with batch processing.

one of the things talked about in the wish lists was scripting. i would think the storing and retreiving ideas might fit with this, also some or all of the boolean. and yes, i've love some decision components. i miss the if-thens.

and i also got some ideas from some of your explanations of black and white uses. you really could make decision legs off that... i think smile:)
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
[Sorry, useless blabber was here -- I need to sleep more]
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Quote
ThreeDee wrote:
useless blabber was here

That sounds like most of my posts..... smile:| ..... smile:dgrin: LOL....

Excellent ideas!!! smile:devil:
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Boolean by depth

Not altogether a new idea, but I haven't seen it clearly pointed out elsewhere and definitely worth a special mention:



That's how I'll be constructing my 3D teapot...

Here's how it works:

Boolean Construction Technique.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Negative boolean by depth

This one may be something new.



You can do boolean with any two (or more) height maps, it is in no way limited to just spheres. As you can see, you can have the color/texture defined for each component.

Here's the negative boolean technique (The curves math in the beginning is not part of the boolean, it's there to make the smaller spheres height map):

Boolean, negative.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Boolean Intersection

I just had to try it...







Boolean, intersect.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Damn, this is getting rather exciting, if I dare say so myself!
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
way the freak above my head. lol. but i still like looking smile:)
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Very interesting.....you'll make a 3D program out of FF yet!!! smile:devil:

Craig, Booleans are a simple 3D concept buy which two or more solid forms can be added, subtracted, or differenced with each other. Pretty easy to learn.....and part of almost all 3D programs out there. You would definitely encounter it if you ever got in something like TrueSpace..... smile;) smile:)
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Kraellin wrote:
way the freak above my head. lol. but i still like looking


"Boolean" is just a fancy mathematical word, the idea is really simple. When it comes to 3D objects, they are basically just three different things:

1) Combine objects together.

2) Subtract object(s) from another.

3) Use the space that is in common with two or more objects as new object(s).

Then you can call them "boolean operations" to make it sound real fancy. (George Boole was the mathematician that described these types of operations)
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
oh, i know what boolean is as far as computers and coding is, i'd just never seen it applied to imaging before.
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Saving multiple alpha channels in one file

As to what you would use them for, I leave it to your imagination. (Think for instance bump, transparency, diffusion, ambience, specularity, metallicity and reflectivity maps. Or making selections for separate objects in the image, rocks separate from sand, grass, twigs, etc.) Here's the theory.

You can of course create a filter that creates an alpha channel, say with a checkbox and a switch, and save it as an image and then later load it as a selection. Not a big deal. But what if you wanted to save more than one selection into one file?

You could save three alpha channels pretty easily by making each of them one of the RGB channels.

But for even more capacity, take a look at this: Filter Forge can save lossless images with 3 channels, 16 bits per channel. If you use 8 bits for full quality anti-aliasing, you can theoretically still have 3x8 = 24 "alpha channels" at photoshop quality for every image. But how would you store them in a single image?

By the upper 8 bits!

Okay, that is probably too technical an explanation, so let me rephrase that in other terms.

You could save one selection by making the alpha channel white 0/256 black and the alpha channel black 1/256 black in one of the RGB channels. You would have used one bit of image information.

Then you can save your second alpha channel in the same RGB channel by making white 0/256 black and black 2/256 black. When you add that to the existing image, you will have used 2 bits of image information. Yet the two alpha channels remain separatable out, for they fall in distinguishable black ranges.

The next alpha channel would be added to it with black at 4/256, the next one with black at 8/256, 16/256, 32/256, 64/256 and 128/256. At this point you would have used up one of the RGB channels storage capacity.

Thus, if you save the image in 16-bit format, you should be able to store up to 24 alpha channels in one image this way.

Separating them back out is a bit of a subject, too, but I'll return to it eventually, or if someone wants to try this.

Sounds good in theory, it'll have to be tested to see how it works out.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Object construction by multi-pass filters

This may be my next thing to try.

The boolean method can be used over and over, adding new pieces to construct an object in several passes. You will have to store the bump information (and, for fancier applications, other information) separately from the RGB channels. And you will have to have a separate surface-type filter to generate the final shaded object.

How would that work?

Say you did that same image I made the boolean example for. One big purple sphere and four smaller green spheres.

You would have a filter that would output a spherical height map and a colored circle of the same size. The filter would have controls for radius and x, y and z coordinates of the sphere. So you would make a big purple sphere in the center. Then you would save the output, making the height map either a separate file (with a checkbox and switch) or make it the transparency channel of the image.

With this new image loaded back in (or filter applied and FF evoked again, if you are using it as a plug-in), you would create a smaller green circle in the top right corner and choose one of the boolean operations (add, subtract or intersect) and save that image and the new height map, separately or together.

Then do the same for the remaining three green spheres in the other corners.

(You could continue this with spheres of different sizes, colors and boolean operations infinitely as long as you saved the image in 16-bit format.)

In the end you would call up a surface filter that would use the height map and create a dimensional object out of it (that looked like one of the boolean examples above).
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Separating objects by index number

Another idea for multi-stage image construction. Say you want to "build" and object but haven't decided what textures to apply to the different parts. How about assigning an index number to each of the parts and deciding later what texture to apply to each? It's like having separate modeling and texturing steps that anyone who has done 3D modeling is familiar with.

And how that would be possible is this:

With each separate "object" that is created, the filter can create a grayscale image that matches the objects with a certain flat gray value (again, checkbox-and-switch approach would work for rendering this out separately). I better make a picture here to show you what I mean. I'll use the same boolean image example.

Here is the diffuse color:



Here is the height/bump map:



And here is how the index channel could look:



You see how that could be used later? You could retrieve any one object out of that index image and assign a texture to it, then another object, assign a texture to it, etc. This could be done for example with the multiple-image-input workaround method.

But this would allow you to add, change and experiment with different textures altogether separately from object construction.

---

PS. The index channel idea could, BTW, be used as a simplified multi-selection storage method. It is limited in that you can't have overlapping selections, but could be useful for some purposes.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1750
Filters: 39
Quote
ThreeDee wrote:
Then you can save your second alpha channel in the same RGB channel by making white 0/256 black and black 2/256 black. When you add that to the existing image, you will have used 2 bits of image information. Yet the two alpha channels remain separatable out, for they fall in distinguishable black ranges.


I think that will be very difficult, if not impossible since FF internally works in floating point mode, you can't work with packed composites as you do with 32 bit unsigned ints. If you work out a way to do this I'd be very interested in the approach smile;)

Task: pack two map inputs into one channel by only reducing bitdepth and not samplerate.. tough one!
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Custom shapes library

Thought of another use for saving multiple alpha channels in one image. You could make a custom shapes library that way. Think about it: 24 custom shapes in one file!

Didn't InfiniView or someone talk about some such thing?

Man, now I really want to try that idea out!
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Sphinx. wrote:
I think that will be very difficult, if not impossible since FF internally works in floating point mode, you can't work with packed composites as you do with 32 bit unsigned ints. If you work out a way to do this I'd be very interested in the approach Wink

Task: pack two map inputs into one channel by only reducing bitdepth and not samplerate.. tough one!


True, I might be wrong about that since I haven't tried it, but I will be doing so soon enough.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Okay, wasn't quite as easy as that, and probably will only work for 2-bit images, for you get the residue from the antialiasing of the other channel(s) in the lower end. Nevertheless, my first attempt came out fine with a bit of cleanup at the end (.1 blur and levels to clean up the residue).

Here's the 2-image packing example:



Pack alpha.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
And here's the extraction method:

Extract channel.ffxml
  Details E-Mail
CorvusCroax
CorvusCroax

Posts: 1227
Filters: 18
Quote
ThreeDee wrote:
You could save three alpha channels pretty easily by making each of them one of the RGB channels.

But for even more capacity, take a look at this: Filter Forge can save lossless images with 3 channels, 16 bits per channel. If you use 8 bits for full quality anti-aliasing, you can theoretically still have 3x8 = 24 "alpha channels" at photoshop quality for every image. But how would you store them in a single image?

By the upper 8 bits!


We actually use the RGB multi-alpha channel trick in games. It works pretty well. All sort of inter-related data packed into an RGB layer. We've talked about breaking each layer into it's respective bits, but it's hard to work that way. Not to mention messy; It's very easy to get a little bit of anti-aliasing from one area into another area accidentally. I've tried separating it all off with pshop threshold layers, but it's hard to work that way and your work habits have to be pristine.

Clever idea for FF, though!
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
CorvusCroax wrote:
We actually use the RGB multi-alpha channel trick in games. It works pretty well. All sort of inter-related data packed into an RGB layer. We've talked about breaking each layer into it's respective bits, but it's hard to work that way. Not to mention messy; It's very easy to get a little bit of anti-aliasing from one area into another area accidentally. I've tried separating it all off with pshop threshold layers, but it's hard to work that way and your work habits have to be pristine.

Clever idea for FF, though!


Yes, that makes sense in games, trying to cram as much data into as small a package as possible, sort of like I'm trying to do here since FF can take 5 channel inputs max at a time (R,G,B, selection and transparency).

Well, I managed to make something somewhat useful out of it. Check this out.

If you download the below image (right-click, save as) and apply the attached filter to it, lo and behold, you get 12 different pictures out of it. Yes, they're a bit raggy, but usable with some cleanup or by reducing their size.



I managed to pack and extract 21 channels in exploring this, but it was getting too slow to be that useful. 12 seems like an optimum of sorts at the moment.

Extract 12 Alpha Channels.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Importing font outlines into FF?

If you add a selection input to the above, you get 16 alpha channels.

Further, if you put, multi-image-input style, 4-up on each channel, you have 64 inputs -- or enough inputs to get the upper and lower case alphanumeric character outlines into FF.

Not that I can think of any sensible reason to do so, but maybe someone will -- or maybe I can come up with some nonsensical reason to do it anyways.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Oh, and I forgot to make the originals 2-bit, which would obviate having to do the cleanup of the antialiased edges remnants...
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I was in the middle of another too-ridiculous-for-words filter but now I have to go to sleep. Not fair.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Secret messages!

Okay, just one more crazy idea, then I'll go to sleep...

You could make image scrambling filters that you could process an image with at the sending end and then have another (or the same) FF filter that would unscramble it at the receiving end. For secure image transmissions. Or just for kicks.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Here are couple of the ideas in action.



The image on the screen of the Etch-a-Sketch was drawn one line at a time in FF during several passes with the filter, "rotating the knobs" with two sliders.

You can see two small gray squares at the top corners; that is where the previous pass X and Y coordinates are stored and retrieved from.

Actually the biggest problem was figuring out how to draw lines between two points. It's not working correctly yet, for the lines disappear if they are drawn horizontally or vertically.

Plus, it is painfully slow to draw anything with it -- just like the real Etch-a-Sketch! smile:D

I think I have an idea for how to draw the lines easier.
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
hehe, you're going to have to embed that cyber sketcher on a web site somewhere smile:)

very clever, 3D. just fascinating watching your output here smile:)
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
CorvusCroax
CorvusCroax

Posts: 1227
Filters: 18
Ah, steganography!

You could set it such that you have to know the correct variation # to decode!

Some techniques use the last 2 bits, ThreeDee:

http://en.wikipedia.org/wiki/Steganography
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
CorvusCroax wrote:
Ah, steganography!

You could set it such that you have to know the correct variation # to decode!


Was thinking along the same lines...

Quote
CorvusCroax wrote:
Some techniques use the last 2 bits, ThreeDee:

http://en.wikipedia.org/wiki/Steganography


Ooh, most interesting. They've even got a sample image. Let's see if I can make a "reader" for steganographic images! Should work the same as my alphapacking/unpacking.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I give up -- it is impossible. You can probably only do it as a bitwise operation.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Custom shaders

HDRI shading is nice but there are instances where building the shading in a Simple filter works better. It gives you more control and additional options to do it that way. For example:

-Casting shadows from the bump map
-Multiple reflections or refractions
-Multiple-layer surfaces
-More realistic metals with blended reflections (sharp and blurred)
-Anisotropic reflections
-More controlled specularity, specular halos
-Reflectivity by angle
-Deeper shadows, more contrast
-Internal diffusion
-Spectral refractions
-Glow/self-illumination
-Custom lighting sources
-Custom environments
-Colored lights and ambient lighting
-Fuzzy objects

You can build some of these effects into Surface filters too, but the HDRI map tends to override and conceal them.

The key component for making such effects in Simple filters is Refraction, for it doubles as reflection, and the derivative simulated normal mapping which can be used for custom lighting.

And if you work with a 3D program, you can make switches to render these maps for use in a 3D program as applicable. Or keep them as faster-rendering simulations of the same effects permanently embedded into the diffuse map. Why recreate a bump map shading -- or anything else for that matter -- newly in 3D unless your lighting scenario is likely to change radically?
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
What important shading types and effects am I forgetting?
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Quote
ThreeDee wrote:
there are instances where building the shading in a Simple filter works better

That's for sure.....I'd love to be able to use different lighting without the raised surface artifacts..... smile:eek:
Quote
ThreeDee wrote:
What important shading types and effects am I forgetting?

Point source lighting would be nice.....but need FF to go 3D..... smile:devil:
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
CorvusCroax
CorvusCroax

Posts: 1227
Filters: 18
Quote
ThreeDee wrote:
What important shading types and effects am I forgetting?


Ambient Occlusion smile;) (is sort of Deeper shadows, more contrast / casting shadows, but not exactly)

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I finally discovered Sphinx Shader V0.2 where he has already done some of these things.
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Quote
CorvusCroax wrote:
Ambient Occlusion

This works.....to a certain extent.....

http://www.filterforge.com/filters/4517.html
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
CorvusCroax
CorvusCroax

Posts: 1227
Filters: 18
Quote
StevieJ wrote:
This works.....to a certain extent.....

http://www.filterforge.com/filters/4517.html
Steve


Does it work realistically on an arbitrary shape? (ie not a photo, but a heightmap)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Meanwhile, here's my first stab at a custom "surface filter" constructed as a simple filter. Got reflections, transparency, refractions and a (sort-of-a) lightsource. The blob represents an object. Or a blob.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Same with teapot.



Kinda cute. Remarkably slow.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112

Quote
CorvusCroax wrote:
Ambient Occlusion


Quote
StevieJ wrote:
This works.....to a certain extent.....

http://www.filterforge.com/filters/4517.html
Steve


Okay, I get the idea. The object itself occludes ambient lighting in its self-generated shadow areas. Like reverse radiosity.
  Details E-Mail
CorvusCroax
CorvusCroax

Posts: 1227
Filters: 18
Quote
ThreeDee wrote:
Okay, I get the idea. The object itself occludes ambient lighting in its self-generated shadow areas. Like reverse radiosity.


Yes, that's correct. It's self-shadowing the ambient light. In a 3d app, an HDRI image for lighting would take care of this in the render, but since FF doesn't shadow, you don't get the self-shadowing of the ambient.

Ambient Occlusion (AO) goes a long way making an object look more realistic. Typical 'ambient' in computer graphics should almost never be used, IMHO, b/c it's just added everywhere, and makes an image look exceedingly fake looking.

AO is different from radiosity. Radiosity is like sunlight bouncing off a red wall, which makes the other things around it red.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Yes, I get what you mean.
  Details E-Mail
StevieJ
Designer/Artist

Posts: 11264
Filters: 163
Quote
CorvusCroax wrote:
Does it work realistically on an arbitrary shape? (ie not a photo, but a heightmap)

Good question.....only used it as a "fake out" on a normal map.....I should check that out.....
Quote
ThreeDee wrote:
here's my first stab at a custom "surface filter" constructed as a simple filter. Got reflections, transparency, refractions and a (sort-of-a) lightsource.

That's a challenge.....getting a surface result refraction and shine out of a simple result.....but I believe it's possible.....
Steve

"Buzzards gotta eat...same as worms..." - Clint :)
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I just realized the flaw in my logic with the idea of being able to store alpha channels in RGB. 16 bits isn't really any more than 2 times 8 bits, in terms of storage capacity -- duh! So with RGB, you could store a maximum of 6 alpha channels with 8-bit quality. But you could still store up to 24 1-bit alpha channels in an 8-bit RGB image, or 48 of them in a 16-bit image. At least theoretically.
  Details E-Mail

Messages 1 - 45 of 354
First | Prev. | 1 2 3 4 5 | Next | Last 

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,531 Posts
+36 new in 30 days!

15,347 Topics
+72 new in year!

Create an Account

Online Users Last minute:

11 unregistered users.