Manipulating textures before interpolation?
-
On 07/06/2015 at 23:51, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R15
Platform: Mac ;
Language(s) : C++ ;---------
Greetings to all!Is there any way to manipulate textures *before* interpolation within C4D? I'm trying to load up some PNG files, but I need to do some math on the raw pixel values before C4D can use them. I've thought about writing a bitmap loader plugin, but there doesn't seem to be any way to attach user-configurable options to that.
Then I thought about writing my own bitmap channel shader, but that would mean that I'd have to re-implement all the interpolation types (nearest, mip, sat, circle, square, alias1, alias2, alias3, etc) myself. At the moment, I've written an external utility to process the actual image files but I'd much rather have that functionality inside C4D.
What's the best way to go about this?
-CMPX
-
On 08/06/2015 at 04:02, xxxxxxxx wrote:
I think it should be a ShaderData plugin, there is an example that Sebastian has published a while ago,
http://bach-sebastian.de/download/materialData_example.zip -
On 09/06/2015 at 08:47, xxxxxxxx wrote:
Hello,
the Xbitmap shader loads, samples and interpolates the given bitmap internally, there is no way to change that.
You can of course write you own ShaderData based shader that samples a sub-shader and works with the given output like the Colorizer shader. An example is the BitmapDistortion shader in the SDK. What exactly are you trying to achieve?
The linked example is not an example on ShaderData but on MaterialData.
best wishes,
Sebastian -
On 09/06/2015 at 09:02, xxxxxxxx wrote:
ops, sorry for this.
-
On 19/06/2015 at 09:13, xxxxxxxx wrote:
Hello CMPX,
was your question answered?
Best wishes,
Sebastian -
On 20/06/2015 at 16:41, xxxxxxxx wrote:
Yeah, it's answered, though I didn't find a solution.
Unfortunately I needed to be able to process the image data before interpolation, and as you stated that doesn't seem to be possible short of writing my own image loader that does interpolation manually. I landed up just sticking with my external utility to process the texture files outside of C4D.
-CMPX