Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Calculating gradients during fast third order interpolation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 rtclawson   Members   -  Reputation: 168

Like
0Likes
Like

Posted 18 April 2013 - 04:13 PM

I am using a method described in the GPU Gems book (http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter20.html) for Fast Third-Order Texture Filtering. I have it working well for filtering volume textures. I would now like to calculate 3D gradients for use as surface normals for shading.

 

The article states that this is possible as part of the filtering step, and offers an example in one dimension. They hand wave the possibility of extending the process to multiple dimensions, but it isn't at all clear how this leap should be made. Here is the relevant sentence:

 

"To compute the gradient in higher dimensions, we obtain the corresponding filter kernels via the tensor product of a 1D derived cubic B-spline for the axis of derivation, and 1D (nonderived) cubic B-splines for the other axes."

 

Any ideas on how to accomplish this? Obviously I could just sample the texture a few more times and calculate the gradient on my own, but since I already have the samples from the filtering, it would be faster if I could calculate the gradient from them.

 

Thanks for your help!



Sponsor:

#2 rtclawson   Members   -  Reputation: 168

Like
0Likes
Like

Posted 24 April 2013 - 12:05 PM

Someone can correct me, but I don't believe it is possible to compute the high quality gradients without doing more texture samples. I think what is being said in the article is that the same procedure for calculating the pixel value can be used to calculate the gradients, but they are separate processes. Under this model, there are 8 texture samples for the pixel value, and 8 samples each for the 3 cardinal directions. An extra 24 texture samples isn't as great as I would have hoped, but the gradient does look better than when it is computed using central differencing.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS