This will be the first thing I will try tomorrow morning !!!
Thanks
Andreas
Overview of OSL Shaders in Octane
Forum rules
NOTE: The software in this forum is not %100 reliable, they are development builds and are meant for testing by experienced octane users. If you are a new octane user, we recommend to use the current stable release from the 'Commercial Product News & Releases' forum.
NOTE: The software in this forum is not %100 reliable, they are development builds and are meant for testing by experienced octane users. If you are a new octane user, we recommend to use the current stable release from the 'Commercial Product News & Releases' forum.
Architectural Rendering Services
1 x 4090 GTX, 1 x 3090 GTX
http://www.v-cube.de
1 x 4090 GTX, 1 x 3090 GTX
http://www.v-cube.de
thanks Roeland, this works!!!
cannot wait for this to run in my Rhino plugin...
my problem is that I am a little bit of an illiterate when it comes to coding, so I dare to post two additional wishes:
1. As I understand, right now the row offset is purely random, can you implement an option to make a fixed offset for every n row, so e.g. a) 2 row loop, 1. row +0%, 2.row +50% b) 4 row loop 1.row +0%,2.row +30%,3.row +40%,4.row +5%, so the user could define the number of rows until the pattern repeats, and the offset for each row?
2. Wish (I know, this is probably much harder to implement...) if we could add the possibility to define an "gap " between the tiles , which would be filled with a second material (e.g. mortar) we would have a very mighty brick simulator !
best
Andreas
cannot wait for this to run in my Rhino plugin...
my problem is that I am a little bit of an illiterate when it comes to coding, so I dare to post two additional wishes:
1. As I understand, right now the row offset is purely random, can you implement an option to make a fixed offset for every n row, so e.g. a) 2 row loop, 1. row +0%, 2.row +50% b) 4 row loop 1.row +0%,2.row +30%,3.row +40%,4.row +5%, so the user could define the number of rows until the pattern repeats, and the offset for each row?
2. Wish (I know, this is probably much harder to implement...) if we could add the possibility to define an "gap " between the tiles , which would be filled with a second material (e.g. mortar) we would have a very mighty brick simulator !
best
Andreas
Architectural Rendering Services
1 x 4090 GTX, 1 x 3090 GTX
http://www.v-cube.de
1 x 4090 GTX, 1 x 3090 GTX
http://www.v-cube.de
Hi Andreas,
have a look at this other shaders in this discussion:
viewtopic.php?f=33&t=63905&start=10#p325973
ciao beppe
have a look at this other shaders in this discussion:
viewtopic.php?f=33&t=63905&start=10#p325973
ciao beppe
thanks beppe, I already tried this one, but this did not really do what I wanted ( maybe it was just me...) I can define brick height/ width, the mortar thickness/ material, but I cannot use multiple textures for the bricks, nor can I define different offsets for the rows... maybe you can give me a hint ?
best
Andreas
best
Andreas
bepeg4d wrote:Hi Andreas,
have a look at this other shaders in this discussion:
viewtopic.php?f=33&t=63905&start=10#p325973
ciao beppe
Architectural Rendering Services
1 x 4090 GTX, 1 x 3090 GTX
http://www.v-cube.de
1 x 4090 GTX, 1 x 3090 GTX
http://www.v-cube.de
Hi Andreas,
it's a different approach compared with multi texture, but try with this version:
ciao beppe
it's a different approach compared with multi texture, but try with this version:
Code: Select all
shader brick(
float thick=0.05,
float rat=0.6,
float rep=2,
color MainColor = color(1,0.23,0.13),
color EdgeColor = color(0.9,0.9,0.9),
output color c = 0 )
{
color col = MainColor;
float x=rep*u;
float y=rat*rep*v;
if(mod(y, 2.0) < 1.0) x=x+0.5;
x *= (1+0.7*noise("cell", y));
float nx=x-floor(x);
float ny=y-floor(y);
if(nx>1-thick || ny<rat*thick) {
col = EdgeColor;
}
else {
float brg = 0.5*noise("cell", point(floor(x),floor(y),0))+0.3;
col = brg*MainColor;
}
c = col;
}
For anyone who is interested in writing OSL shaders, you can now find the information of the opening post here: https://docs.otoy.com/osl/
Any future changes, additional explanations, tutorials, examples, etc. will go to this page.
Any future changes, additional explanations, tutorials, examples, etc. will go to this page.
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
Thanks guys. Is there any hope of getting the regular docs looking this good too?abstrax wrote:For anyone who is interested in writing OSL shaders, you can now find the information of the opening post here: https://docs.otoy.com/osl/
Any future changes, additional explanations, tutorials, examples, etc. will go to this page.
Win10 Pro / Ryzen 5950X / 128GB / RTX 4090 / MODO
"I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live" - Jesus Christ
"I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live" - Jesus Christ
- rohandalvi
- Posts: 169
- Joined: Tue Apr 20, 2010 7:39 am
I’m not a programmer but I was curious about the overall ability of OSL in Octane. Since you can use OSL to build camera shaders , can something like the link given below be implemented into octane just via OSL.
http://matthias.hullin.net/publications ... SR2012.pdf
It’s something called a polynomial optics camera and the results look really nice. It mimics a full lens stack.
Just curious about it.
Regards
Rohan
http://matthias.hullin.net/publications ... SR2012.pdf
It’s something called a polynomial optics camera and the results look really nice. It mimics a full lens stack.
Just curious about it.
Regards
Rohan
The OSL Camera is very powerful and designed to explore and implement these kinds of things. Custom OSL camera rigs and optical/projection filters will get their own category on LiveDB, where we plan to mirror Octane camera formats with their OSL implementations so you can customize them further. In future releases, we will cover more node types with OSL shaders.rohandalvi wrote:I’m not a programmer but I was curious about the overall ability of OSL in Octane. Since you can use OSL to build camera shaders , can something like the link given below be implemented into octane just via OSL.
http://matthias.hullin.net/publications ... SR2012.pdf
It’s something called a polynomial optics camera and the results look really nice. It mimics a full lens stack.
Just curious about it.
Regards
Rohan
Hello!
I've been trying to write my first OSL texture.
So far so good with the Docs and resources on internet.
There is one thing I'm not sure how to do one specific thing.
I've got this code that give me a Projection, but by default it's using the UV and I'm wondering how to force it to change to something like Box or Perspective.
And also how can I change the values of the Transform Projection? If I want to transform it directly in the code, like a 90 degree rotation of the projection.
Or if a Texture is plugged, is there a way to access its Projection transformation value to tweak them?
Thank you!
I've been trying to write my first OSL texture.
So far so good with the Docs and resources on internet.
There is one thing I'm not sure how to do one specific thing.
Code: Select all
point Pos = P [[string label = "Projection",string inputType = "projection"]],
And also how can I change the values of the Transform Projection? If I want to transform it directly in the code, like a 90 degree rotation of the projection.
Or if a Texture is plugged, is there a way to access its Projection transformation value to tweak them?
Thank you!