How to apply compiled shader for surface in D|S ? (solved)
Hi in daz studio, now there are RSL Editor (I do not think at curent it is very powerful ^^;
anyway, I like to use offered tools in daz studio)
then open my "test.sl" writed by text editor.
I feel OK,, and complie by RSL Editor menu. (I know in surface option menu,
there is "compile RSL shader" , but anyway I like to use daz RSL Editor.
Actually I know I need not to open d|s for compile renderman sl,
because I have already downloaded 3delight ,,
then I can use "shaderdl" , just r-click the test.sl file in windows pc,,
but I like to use daz offered tool :coolsmile:
OK,,, now my "test.sl" are compiled , then it generate test.sdl , I check file location,, yes,, there are
new test.sdl file . wit test.sl. I am so happy now,,, :coolsmile:
but,,,, how I can apply the "compiled shader" test.sdl for surface in daz studio?
I am afraid,, I must use shader builder and open as Macro from "test.sl" once?
if so why I need compile ?! :coolcheese:
I believe there should be menu to apply compiled shader on daz surface,,, one click action in daz studio,,
then tell me the way please :coolsmile:
Comments
Compiling the shader directly does not generate the needed support scripts, for populating the Surfaces pane and for applying the shader. This is one of the benefits of using Shader Builder. I'm not sure where manual creation of the needed files is covered - it's not immediately obvious in the DS3 scripting documents, which is where I thought it was.
mmmmmm,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:gulp:
I checked shader directory, in my user ..>>src/ surface/Myshders,
where I can find, shaders compile and saved by shader buider .
then I can see these shaders (saved by shader builder) in shader builder tab,,,
(then apply it for surface)
I felt, if I copy and paste, mytest.sdl and mytest.sl ,the directory,
I can load test shader,,, in shadr builder,
but there are another file, xxxx.dzs .
I expect it is simple script,, but I can not open it in text editor,,,
if it is generated script, to load sl or sdl file?
I believe, ds offered tool, (exe) or script, which generate the file.
without it, I think there is no good meaning to offer RSL editor in daz studio,,,
(if it just to make shader builder macro,,?
============
Boo Boo! if DS can not use sdl or sl direct, I must need to use shader builder to use sl,
please offer more clear shader builder document :ohh:
Rob noticed this thread and pointed out that I couldn't see for looking - if you open the DS 3 scripting docs (http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start) and on the index.html page click Samples and scroll down you will find links for a sample Shader Definition that is used to set up and use a compiled shader.
I could find the discribe , by your suggestion, thank you richard. and Rob .
(before you suggested me to download it, if I hope to earn daz script, then I downloaded it)
but main problem is I can not clear understand how to use it at current.
If I need first make the "difinition file" by daz script for my test shader
as same as those samples?
or I can simply apply the sample script for test.sl , then it make parameter in surface tab?
anyway, I now reading them again .:roll:
maybe I will ask again after some test,,,thank sir.
(uu,,,untill now,,
I did not hope, and expect to learn daz script for such shader purpose,,
I hope to learn sl one by one,,l,,these days,, )
The script needs to be customised to set the correct parameters in the Surface pane, and to pass them to 3Delight. it's not a feature I've ever used, however, so I can't be very precise.
:down:
I "felt" so,, and feel the "customize" seems more difficult for me, and take time than simply load sl by shader buidler
and connect somehow,, then order to generate parameters for surface pane,, .shader builder good job ?!
anyway try it,, if I can,,,
haha,, I almost give up , but just hope to know how each definition files work with shader preset,, for future purpose,,,
with documents,
there are sample,of Shader Preset (dsa)
that applies a Material definition (below) for the Constant Surface Shader.
but the document said(The file is as written by the standard
SaveFilter at File > Save As > Shader Preset)
then,, there are two difinition files for the shader preset.dsa ,,,
A "material difinition file" dsa (a support file required by the Shader Preset )
B "shader definition file" dsa (a support file required by the Material Definition=A)
then A seems set path of compliled render man "Constant.sdl "
by DzRSLShader.setShaderFile()
(which I may write as test.sl then compile,,but I give up because,, the "path" say it relative
but relative where? ^^;
It said,,, The relative path [from ./shaders/]
I do not undrstand,, where it appointed,,,
if it is ds contents root directory? or user/appdata etc??
then, my question is,, I may need to write A, and B Definition ,
but ,finally I must need to write (customize) the "shader preset.dsa" manually?
or there is another way, by using A and B definition file, and it apply sdl properties,
in ds surface tab, for selected surface, then I can save it as shader preset?
(that means I need not write shader preset.dsa manyually,,)
The Shaders folder would usually be the one in the DS application folder. Yes, you would need to write the scripts - not having to do that is one of the benefits of using Shader Builder.
Not everything is very clearly documented when it comes to the shader definition scripts. Writing them by hand is more often than not a trial and error process.
The easiest way to bring in a new RSL shader is through Shader Builder.
If you haven't read them yet, there are a couple of tutorials on doing so, with Shader Builder.
http://www.sharecg.com/v/66014/gallery/3/PDF-Tutorial/DAZ-4.5-Shader-Builder-Tutorial-MK-Gooch-Shader
http://www.sharecg.com/v/75671/view/3/PDF-Tutorial/Alternative-Image-Based-Lighting-in-DAZ-Studio
https://mustakettu85.wordpress.com/2015/04/15/3delights-physical-sun-into-daz-studio-a-yet-another-shader-builder-mini-tutorial/#more-309
Hi richard, I think I may need to locate each three file once, and check path again.
then thank you to take time . I feel , I could grab how ds work about sl shader ,
then change it to work in daz stuido,, though I can not generate from sl, still.
but may need not. keep studying sl with shader builder.
mjc yes, I know them all. (actually those of two kettu shader and tutoriall push me to study sl,
and kettu taught me which document I need to learn them, in
http://www.daz3d.com/forums/discussion/42984/
I already made them by shader builder.
then I feel, I need to write sl directly once, with 3delight and renderman shading documetns.
and apply it in shader builder, as same as shader mixer.
without it I just copy someones shader or tutoriall.
the difficulity of shader builder is , to make same sl code shader,
I can choose many ways .then generate code is not clean for reading.(by ID input out put,,)
After all, there seems no easy way for me,, to test sl shader in daz studio ,without using shader builder,
I write sl once, then generate it by shader builder, and customize from scratch again with shader builder blicks,
it make me more clear , ,how shader builder work. and each value , macro , function meaning.
already I found many which I did not understaqnd, before,, normarize(N) , normalize(-I) etc,,
(then I still keep thinking,, the daz Os must be something wrong,, about shadow color )