Hello,
As this is my first post, just a short presentation before the question. I am a hobbyist using Cinema4D for about 12 years. I am mainly attracted by architecture. I am an active member of the french forum FrenchCinema4d.fr (https://frenchcinema4d.fr/forum.php - search for user "bru"). I am starting using Octane (under subscription for 2 weeks now), and as I like to create procedural materials, I explore OSL scripting. But I encounter now my first problem.
I would like to introduce some distortion in a texture through UV modifications. I have understood that this can be done in OSL shaders using the function "_evaluateDelayed", but I get no effect when I modify parameters "TexU" or "TexV".
Here under a simple example that should (in my understanding) mirror a texture. When I compile, there is no error but this script simply transmits the texture without any modification.
#include <octane-oslintrin.h>
shader Texture(
color col1 = color(1, 0, 0),
output color c = 0)
{
c = _evaluateDelayed(col1, -u, -v);
}
There is a note in the manual that I do not understand: "To use the custom UV coordinates in another OSL node connected via a delayed input, give it a point input and connect a OSL UV Projection node to the corresponding input pin.". If I create such a pin and do not use it, I have a warning and nothing happens. What is to be done with this pin ?
Technical information: Octane Release: 2020.1-R7 - Cinema4d Plugin. - Cinema4d R21.207 - Windows 10 pro
No effect of "TexU" and "TexV" in "_evaluateDelayed"
Hi,
You need to go to the input texture that you are plugging into `col1` and set its projection mode to "OSL delayed UV".
The note in the manual is in case you wanted to plug an OSL texture itself into another one that is using _evaluateDelayed.
You need to go to the input texture that you are plugging into `col1` and set its projection mode to "OSL delayed UV".
The note in the manual is in case you wanted to plug an OSL texture itself into another one that is using _evaluateDelayed.