Blender Artists Community - OSL Tests and Support
https://blenderartists.org/forum/
For all your OSL tests, questions and problemsenWed, 13 Dec 2017 12:35:02 GMTvBulletin60https://blenderartists.org/design/baorg2012dark/images/misc/rss.pngBlender Artists Community - OSL Tests and Support
https://blenderartists.org/forum/
in depth OSL, where to start?
https://blenderartists.org/forum/showthread.php?442024-in-depth-OSL-where-to-start&goto=newpost
Thu, 07 Dec 2017 12:46:35 GMTHi all, i have been lurking this place for quite some time.

There seams to be considerable insight regarding OSL in this place and i'd like to ask around how you people got started.
My google-fu comes up with stuff that's so simplistic blender can do the same without OSL and stuff so advanced it's tough to make sense of.

I've read the spec but it's not that specific on what exactly a color closure is.
I'm guessing it's not quite the same as your run of the mill closure in lisp, ML and their ilk?

I've done toy implementations of all the usual graphics stuff _except_ a ray tracer maybe that's what i'm missing ...

So. How did you guys get into this stuff, surely there is a less masochistic way then straight up reading the sources?

asking Mr Secrop specifically :)
]]>OSL Tests and Supportkaffeehttps://blenderartists.org/forum/showthread.php?442024-in-depth-OSL-where-to-startmandelbrot confusion
https://blenderartists.org/forum/showthread.php?441741-mandelbrot-confusion&goto=newpost
Fri, 01 Dec 2017 03:38:49 GMTI'm trying to apply the mandelbrot set to my shader, but I've encountered a road block. first of all, osl doesn't seem to support complex numbers. you can't use pow(-1, 0.5) for example. I found a script that someone else wrote that seems to work, but I can't figure out why, and if I don't understand it, I can't manipulate it. here's is the code that works:

Code:

shader Fractal(
float Hue = 0,
point pos = P,
output color Color = 0
){
int i;
float real = pos[0];
float imag = pos[1];
float x = real;
float y = imag;
real = 0;
imag = 0;
for(i = 0; i < 20; i++) {
float realt = pow(real,2) - pow(imag, 2) + x;
imag = 2*imag*real + y;
real = realt;
if(pow(real,2)+pow(imag,2)>4){
Color = color("hsv", Hue, 1, i/20.0);
break;
}
}
}

looking at this code I see no complex numbers. it doesn't have anything in the form y = z^2 + c.
]]>OSL Tests and Supportandgarretthttps://blenderartists.org/forum/showthread.php?441741-mandelbrot-confusionuse osl to create custome math node?
https://blenderartists.org/forum/showthread.php?441526-use-osl-to-create-custome-math-node&goto=newpost
Sun, 26 Nov 2017 22:08:22 GMTI want to create a custom node that can do complex math such as julia sets. I've tried using the script node in cycles, but I can't even get a simple bit of code to work. the script is just a test. I know I can do the same thing with math nodes. this is just a test to make sure I know what I am doing before I move on to more complex things that the math nodes can't do.

can someone either link a guide on how to do math in a script node or tell me what I am doing wrong.
]]>OSL Tests and Supportandgarretthttps://blenderartists.org/forum/showthread.php?441526-use-osl-to-create-custome-math-nodeverticies unwanted conections
https://blenderartists.org/forum/showthread.php?441307-verticies-unwanted-conections&goto=newpost
Tue, 21 Nov 2017 20:46:03 GMTHi i have a men model. i want to hide some verticies but i select some vertexes and hide them, rest of them connect to ech others with strange...Hi i have a men model. i want to hide some verticies but i select some vertexes and hide them, rest of them connect to ech others with strange lines. when i go out from editing mode this lines disapears. i have enabled mirror and subd modifier. Anybody know what s happening?

]]>OSL Tests and Supportzatharahttps://blenderartists.org/forum/showthread.php?441307-verticies-unwanted-conections