Hi Ognen,
use allocArrayPad,
instead of allocArray. It works completely similar but adds before and after
extra coordinates for memory.
Syntax allocArrayPad( 0, X, Y, Z, byte size, padding).
E.g. with allocArrayPad( 0, 200, 200, 3, 2, 3) you can go from x = -3 till x =202.
By the way (and again) it’s all in the FilterMeisterWiki…
sin( ) is an obsolete function from the early days of FilterMeister. Use
fsin( a), fcos( b), ftan( c),
asin( a), acos( b), atan( c), etc.
These return float variables with an internal 14 digits precision and in radians format. 2 *PI ==full cercle…
Because
at the end pixels must be integers, I use aside floats an integer avatar for
the end result.
Be aware that an integer will not directly be recongnised as float. E.g.
float fA0;
int iA0;
Important to know:
fA0
=25; will give 0.0
fA0 =25 +0.0; or 2fA0 =5 *1.0 will give 25.0 (each mix or calculation with an
float, transforms an integer to float).
iA0 =fA0 =asin( 1.0) *90.0 /M_PI_2;
fA0
will give float 90.0 and iA0 int 90
You probabely miss the UserGuide pdf? For the convenience I add it as attachement.
I’m actually still in the middle of a transformation of my kitchen and
therefore the promise of an extended and more worked out explanation of the
most important basics of making filters in FM moves more forward in time.
Meanwhile I made nonetheless a more efficient working Worley Noise filter, but
I won’t publish it before I could fully document it. It’s an interesting topic
of how to approach a task and translate it to the most compact math.
Hopes this helps you further away.
Greetings,
Paul
--
You received this message because you are subscribed to the Google Groups
"FilterMeister Mailing List (FMML)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to filtermeiste...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/filtermeister/c637433e-12c8-48f1-bf0f-0457010b7431n%40googlegroups.com.
Hi Ognen,
Of coarse you can – a piece of cake! It’s just a matter of channel number. In
rgb you have the channels 0, 1 and 2. The alpha channel for transparency is nr
3. In the case of 16-bit, 32768 is completely opaque, 0 is completely
transparent.
Note:
1. You must first transform the image into layer mode. A flattened image cannot
have transparency.
2. As long as the alpha channel contains no zeros, you can fully turn back
transparency to full opaqueness. The imageparts were zeros were set are defenitely
lost (unless you apply a CTRL+Z).
About my promises about a faster code for Worley Noise and further explanations, I’m still working on it. Actually my time is split between renovation works in my appartment (to come to an intermediate break) and FM. Also, I’ll approach this as a cae study that will go beyond the filter effect only. I see this as a first step to refurbish and promote the potentials of FM, it really merits, together with its low threshold for stepping in.
Awaiting this, I’m finishing a FM tool that will make it much more
comfortable to follow up all kind of coding by means of an extensive info panel.
A while ago I spoke about a basic structure, as part of different
interschangeable versions – this will be one of it. I’ll hope to send this
tomorrow - or at least one of next days.
Best Greetings,
Paul
Van: filter...@googlegroups.com
[mailto:filter...@googlegroups.com] Namens Ognen
Verzonden: zaterdag 20 november 2021 17:18
Aan: FilterMeister Mailing List (FMML)
Onderwerp: Re: [FMML2] Cells/Worley noise discussion continued...
Hello,
--
You received this message because you are subscribed to the Google Groups
"FilterMeister Mailing List (FMML)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to filtermeiste...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/filtermeister/aac96eed-9b1e-4e04-823a-c2498d20d3e2n%40googlegroups.com.
Hi Ognen,
A quick answer inbetween:
In Grayscale mode you have only 1 channel with Z-plane number 0. If your image
is set into a layer, you obtain the availability of an extra Alpha channel with
Z-plane number 1.
In RGB mode the channel numbers are 0, 1 and 2. If it is set into
a layer, the extra Alpha channel will take Z-plane number 3.
8 or 16-bit has nothing to do with the Z-planes.
A complete filterbase is almost finished that will help you better distinguish
these concepts and follow up your own coding.
Kind Regards,
Paul
To view this discussion on the web visit https://groups.google.com/d/msgid/filtermeister/4168ac44-4014-422a-9c9e-1471158e8929n%40googlegroups.com.
Hi Ognen,
You make it unnecessary very complicated. Subtracting
something identical will per definition result in zero... So think again about
the effect you want to obtain!
1. ‘val’ is a non existing code in FM. Rval, Gval, Bval and Aval exists
and are used to retrieve the respective channel values from a pixel. This works
only in 8-bit! Btw, how could you get ‘val’ passed through the compiler?...
2. Pixels are always positive integers. So retrieving pixels don’t need
to be transformed first to abs values, because nothing will change, except
increase of processing time.
3. Interesting to know: pget( x, y, 0) retrieves pixels from
the image buffer and is zoom setting sensitive! src( x, y, 0) gets the pixel
values from the image itself. src works faster. Theoretical disadvantage is
that with src the image is handled as a single file and demands thus more ram,
but today that’s mostly not an issue anymore (for normal sized images).
What you want to obtain will thus look something like this:
pset( x, y, 0, src( x, y, 0) –src( x -2, y, 0));
This will indeed often result in negative values truncated to zero. Therefore a
‘carrier’ is necessary, such as a middle value of 16384, similar to a high pass
filter.
Paul
To view this discussion on the web visit https://groups.google.com/d/msgid/filtermeister/b09c63a8-2fef-4cf5-b92e-30277a8f20bbn%40googlegroups.com.
Hi Ognen,
You make it unnecessary very complicated. Subtracting something identical will per definition result in zero... So think again about the effect you want to obtain!
1. ‘val’ is a non existing code in FM. Rval, Gval, Bval and Aval exists and are used to retrieve the respective channel values from a pixel. This works only in 8-bit! Btw, how could you get ‘val’ passed through the compiler?...
Waw, an unexpected and impressive effect – well done !
Congratulations for your persistance of not giving up !
Best Greetings,
Paul
Van: filter...@googlegroups.com
[mailto:filter...@googlegroups.com] Namens Ognen
Verzonden: vrijdag 3 december 2021 14:09
Aan: FilterMeister Mailing List (FMML)
Onderwerp: Re: [FMML2] Cells/Worley noise discussion continued...
> Works fine here
--
You received this message because you are subscribed to the Google Groups
"FilterMeister Mailing List (FMML)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to filtermeiste...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/filtermeister/7c249fab-d7e8-4d80-afc0-90993b824538n%40googlegroups.com.
An Array allows you to store variables in a grid. It’s just a grid
- just like a notebook with squared paper you put notes in. That grid is not
aware from which variable which value came from. The only way to know the
origin from a value is to know what coordinate stood for that particular
variable.
Personally, I recommend to use shorter names for variables, with a hint to
understand for what they stand for. That permits a more comfortable reading of the
coding and is less confusing. But that’s a personal view.
Forget ‘tsets and tgets’, they are obsolete remnants from the historical build-up of FilterMeister. In a modern approach, I should ban all code that doesn’t permit internal 16-bit math, even if the output will be 8-bit. The resolution grid of 16-bit (which is in fact 15-bit +1) allows to manipulate values with almost no danger of overlap. Thus maintaining the original information as long as possible. 8-bit is an end product with too little margin for editing.
Regards,
Paul
To view this discussion on the web visit https://groups.google.com/d/msgid/filtermeister/634fca44-67ce-4866-98f3-46a508ab0382n%40googlegroups.com.
Hi Ognen,
I’m not familiar with specific C-code. FilterMeister code is inspired on C, but
it’s not fully exchangeable with it. So the question looks irrelevant to me.
Perhaps somebody else could pick in?
To view this discussion on the web visit https://groups.google.com/d/msgid/filtermeister/96b5485f-4e32-4d85-a9cd-35eeeb6f2694n%40googlegroups.com.