I take a question already ask elsewhere on the forum, but has not yet had an answer.
example:milanm wrote:
Question:
What's going on with point inputs and projection options for OSL texture in the plugin? In OctaneRender ( aka. Standalone), when we add apoint
input, a projection pin is created, but that doesn't happen in the plugin. Is that a plugin SDK thing? Is that going to change soon? I noticed a related question in the Blender plugin forum too. It's a serious limitation if we have to hardcode the projections ourselves.
Code: Select all
shader Circles(
float rad=0.5 [[float min=0, float max=1]],
float sharp=1 [[float min=0, float max=1]],
int rep=1[[int min=1, int max=10]],
point proj = point(u, v, 0)
[[string label = "Projection"]],
matrix xform = 1
[[string label = "UV transform"]],
output color c = 0)
{
point p = transform(1/xform, proj);
point pt = point(rep*u, rep*v,0);
float ctx = floor(pt[0])+0.5;
float cty = floor(pt[1])+0.5;
point ct = point(ctx, cty, 0);
float d = fmod(distance(ct, pt), rep)/rad;
c = 1-smoothstep(0.5*sharp, 1-0.5*sharp, d);
}

in the plugin , no input for transform or projection ?
I think I can easily modify the transform by adding a UVW transform node after the texure , but for the projection I have no idea except to write a few lines in the osl directly.
I have of course read the infos on this page https://docs.otoy.com/osl/input%20types/
but impossible for me so far to put things in the right order...
If someone could kindly show which code to handle a projection (cubic, cynlidrical or any other), directly in the code,waiting for the pins to appear in the nodegraph, it would be nice.

thanks