YOUR ACCOUNT

Login or Register to post new topics or replies
rgoer
Posts: 46
Hi FF peoples,

Let's say you have a profile gradient such as this:



And let's say you want to quantize that gradient into 8 by 8 blocks like this, with these exact pixel values in the quantized result:



The catch is that you want to quantize it using only an offset node. What would your H and V offset inputs look like?

(The reason I'm looking for a way to get this exact result by quantizing an input gradient rather than just creating the quantized result from the start via a step curve is: I want to eventually apply this kind of quantization to non-linear gradients)

edit: the exact pixel values in that result are:

[(1/64),(2/64),(3/64)..(8/64)]
[(9/64)..(16/64)]
..
[(57/64)..(64/64)]
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I ain't gonna try and do it with one offset, but here it is with four offset steps.



Quantize 8x8.ffxml
  Details E-Mail
rgoer
Posts: 46
Wow, you rule. On a guess I changed the one percentage from -6.13 to -6.25 (half of one eigth) and the other from -43.88 to -43.75 (the remainder out of 50), and the results still seemed to work, so very cool.

One interesting bug has popped up out of this, though--working with large image sizes (2k*2k or larger) you will see weird border artifacts show up between quantized "cells" in the render preview unless you have the "view actual size preview" option enabled.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
rgoer wrote:
On a guess I changed the one percentage from -6.13 to -6.25 (half of one eigth) and the other from -43.88 to -43.75 (the remainder out of 50), and the results still seemed to work, so very cool.


Glad you saw that. Math before morning coffee always carries a certain liability...
  Details E-Mail

Join Our Community!

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

33,712 Registered Users
+19 new in 30 days!

153,534 Posts
+31 new in 30 days!

15,348 Topics
+72 new in year!

Create an Account

Online Users Last minute:

9 unregistered users.