YOUR ACCOUNT

Login or Register to post new topics or replies
uberzev
not lyftzev

Posts: 1890
Filters: 36
For example I know Blur does. What about complex curves and curve ops? etc.

Thanks.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
All bitmap-based components get cached:
http://www.filterforge.com/more/help/...nents.html

Also, there is a single-sample cache that works for every component. For example, if you feed a component into three inputs and these inputs request samples at the same coordinates, the sample is calculated only once.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
And how does this work for Switch components? Are all the incoming streams cached, or only the one currently active?
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
The sample cache is located at the output, not at the inputs of the component. Every component stores the coordinates and the value of the last calculated sample, and if the next sample has the same coordinates the component returns the cached value instead of evaluating the sample.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Hey, that gives me an idea:

What if we had a 'render/sample diagnostics' mode that displayed over each component the number of 'samples per pixel' that are taken there? For example, with 5 samples of anti-aliasing, most components would display '5' (samples per pixel), the refraction component and all of its upstream nodes or the component tree fed into the height input would display 5x3 or 15 (samples per pixel).

This way, users could quickly diagnose their filters for rendering bottle-necks visually by looking for component combinations that force excessive evaluation of upstream nodes (like a refraction fed into a high-pass fed into the height input of the result node, which would be 5x3x3 = 45 samples?).

Additionally, the components could be overlaid with shades of green (fast) to red (slow) according to how many times they are sampled. Worley-noises with custom profile curves would also be interesting in this regard, as the sample counts are likely to 'explode' here for more complex trees.
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Crapadilla wrote:
For example, with 5 samples of anti-aliasing, most components would display '5' (samples per pixel)


Things are a bit more complex. Suppose AA is set to 5 samples per pixel & Edges Only (as opposed to All Pixels). Since we use Edges Only, not all pixels will be anti-aliased, which means some pixels will be rendered using 5 samples, and some using 1 sample.

Quote
Crapadilla wrote:
like a refraction fed into a high-pass fed into the height input of the result node, which would be 5x3x3 = 45 samples?


This is correct if you remove High Pass from the example and feed Refraction into Height directly. You'll also need to take into account the Edges Only AA setting.

Quote
Crapadilla wrote:
Worley-noises with custom profile curves would also be interesting in this regard, as the sample counts are likely to 'explode' here


Any fractal noise that uses a custom profile curve will sample that curve once per octave (the number of octaves is defined by the Details slider). If Details is set to the max, the profile curve will be sampled 11 times.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Let's disregard the factual correctness of my sample count guesses for a second. They're just there to illustrate my point.

What do you think about the idea of having this 'sample diagnostics'? I'm thinking of displaying this number of samples over the preview thumbnail of each component. Even if things are more complex as you say - as with the Edge Only AA - we can arrive at 'generic' samples-taken-per-pixel values for each component, like '1|5' in the first case above (meaning 1 sample where no edge is and 5 at an edge).
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Crapadilla wrote:
What do you think about the idea of having this 'sample diagnostics'?


I think the sample-based diagnostics idea is better than time-based diagnostics from the implementation POV. On the other hand, it will be less clear to the non-technical users than the familiar seconds and minutes.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Crapadilla wrote:
as with the Edge Only AA - we can arrive at 'generic' samples-taken-per-pixel values for each component, like '1|5' in the first case above (meaning 1 sample where no edge is and 5 at an edge).


Good suggestion.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
One of the problems with this is that the sample count has to be dynamic since the number of samples can vary depending on the component parameters (as with profile curves and Details).
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
The 'sample diagnostics' could be a great visual learning tool for understanding FF's sample-based architecture. Granted, one would have to absorb lots of technical info on 'samples' first in order to make anything of it, but then again diagnostics has always been rather technical in nature. It would certainly be an advanced area of the program.

The 'sample diagnostics' would illustrate the effect that AA has on render-times. Just turn up the AA samples and see the whole filter tree update its sample counts.

Furthermore, it would illuminate why certain components and component combinations lead to slow filters, and the user could visually detect rendering bottle-necks by looking at where exactly in the filter tree the samples counts multiply.

Since the sample display would dynamically update with every change in the component tree or a component's parameters (say Noise Detail), the user could experiment with different component parameters/setups/sequences and directly gauge the effect his experiments have on the sample counts. This enables the user to optimize a filter on-the-fly while building it.
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
There's another problem -- the rendering time of one sample depends on the component itself, component inputs and parameters, and sample coordinates.

For example, every tile in the Tiles component is divided into several areas: sides, corners and the central rectangle. Samples in the central rectangle are the cheapest to calculate -- no profile curves/gradients, no complex hit testing against non-rectangular shapes. Samples on the sides take longer due to the profile curve sampling. Finally, samples in the corners are the most expensive due to hit-testing against a circular arc and the calculation of a circular gradient.

If we set Corners and Bevel Width to 100% and Mortar Width to 0, all samples will hit the corner region and therefore will take longer to render, while the sample count will remain unchanged.
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
Quote
and the user could visually detect rendering bottle-necks by looking at where exactly in the filter tree the samples counts multiply.
i like the general idea here, a speed indicator. and whereas i dont make my filters on a speed priority basis, i nonetheless sometimes wonder how i can speed them up and where is the bottleneck.

vlad, this wouldnt even have to be that precise, though dilla may disageee here. but for me, even a general indicator would help. even if the thing was nothing more than a calculator of speed in rendering AT that component, it would be worthy, providing the calculating itself didnt add a lot of additional time to the rendering.
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Quote
Vladimir Golovin wrote:
There's another problem -- the rendering time of one sample depends on the component itself, component inputs and parameters, and sample coordinates.


Ok, so samples also have different abstract 'calculation costs', meaning that all samples are not equal.

The question then is, would it be possible to arrive at an average 'calculation cost' value for all the samples of a given component? If so, then the number of samples-taken-per-pixel displayed on a component could be color-coded to show whether the component is slow or fast on average.

Alternatively, it could display the ratio of slow to medium to fast samples, so that a user could then gauge the effect of different parameter settings on this ratio. Using your example, turning down the Corners and Bevel Width sliders would shift this ratio in favor of the faster samples.

This would still be an approximation, but it would be closer to reality than taking all samples as equal.
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
Crapadilla wrote:
would it be possible to arrive at an average 'calculation cost' value for all the samples of a given component?


Blur with variable radius.
Perlin/Worley noises with different Roughness and Details.

For the above examples the variations in the calculation cost are pretty dramatic, so the average doesn't make much sense. There is a Russian joke about this kind of averages:

"The current average body temperature across all patients in our clinic is 36.6 degrees".

(36.6 degrees is the normal body temperature on the Celsius scale, don't know how much would that be in Fahrenheit).
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
And don't forget that inputs like Roughness can be mapped, so the calculation cost may vary for different areas.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Well, I'd be totally happy with a simple number-of-samples display that disregards sample calculation costs. That would already help a lot in getting 'under the hood'... smile:)
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Consider a Perlin noise with a custom Profile curve. Roughness of 0 produces one sample of the Profile curve, while Roughness of 100% produces eleven (assuming that Details is set to 100%). If Roughness is mapped with another component, which number should we display?
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Well, the highest sample count measured on that component should be displayed, or - alternatively - a range of sample counts.
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
again, for me, a simple 'rendering time' indicator would be fine. offset = .01 seconds, frame = .03 and so on. and though it would be best done right on the component itself, if that's not practical and makes for slower rendering speeds, then maybe there could be a diagnostic tool which would simply do a check on a given filter and output a text file or something.
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail

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:

17 unregistered users.