3Delight Laboratory Thread: tips, questions, experiments

19495969798100»

Comments

  • FG3DFG3D Posts: 7
    edited April 17

    I probably posted this comment in the wrong thread. Following Sven Dullah's advice, I post it here.

    I apologize if I ask a question about such an old post, I hope there is someone who will give me an answer.
    I tried following Mustakettu85 tutorial integrating envlight2 into daz and everything works perfectly except the known coordinate problem.
    Uber Environment 2 also has the same problem which cannot be solved by the code because the source code is not available.
    But envlight2.sl is available, so the question is:
    How can I change (via code) the coordinates so that it avoids rotating the shader by setting x = -90 and then doing the horizontal flip of the map with a software like Photoshop? (this is the method I normally use when working with UberEnv2).
    Thanks in advance
    Maurizio

    Post edited by FG3D on
  • FG3DFG3D Posts: 7
    edited April 18

    A very simple solution exists
    Just type in the envspace field (where you usually enter the default values such as "world", "shader", etc.) the value "3DLEnvSpace" and that's it.
    Since 4.10.0.108 version, some methods have been included such as addTransformBegin ( ), addTransformEnd ( ), addCoordinateSystem ( ), etc.
    Evidently this new coordinate system has also been included.

    The code can be found here.

    I then copied and inserted the code into the shader builder to try to create my own coordinate system.Unfortunately it doesn't work unless you delete this part of the code

    if( oOWNER.inherits("DzShaderLight") && !oOWNER.usesLocalShaderSpace() )

    I hope someone will explain to me how to fix it or if deleting this line of code might have any consequences. I thought I should enter a setUseLocalShaderSpace (false) but I don't know how to do it, let alone make inherits("DzShaderLight"). Documents and examples for shader builder = 0.5

    More I can not do, it is too difficult for someone like me who has a very low level of knowledge.

    Always have good dreams
    Maurizio

    Post edited by FG3D on
  • Mustakettu85Mustakettu85 Posts: 2,838
    edited April 19
    That code should be used in a rendertime script of your shader, and as it's relatively new, it's not that widely used. It's easier to rely on good old scripted rendering (which will also give you lots of other goodies).

    If you download Wowie's aweSurface installation package here - https://drive.google.com/file/d/154hmnGLi6xBC1Qrx3IJVnukVnfZgiCSr/view?usp=drivesdk - you will get a working scripted renderer setup. Once you unpack the zip, go to the template DS folder/scripts/support/DAZ/ScriptedRenderer/RaytracerGeneral and check out the script.

    Right after Renderer.riWorldBegin(), I built a new coordinate system that matches a skydome made out of a default DS primitive sphere with normals inverted.

    I don't know how its handedness compares to the 3DLEnvSpace, introduced for Parris way, way later.

    There's also a zip with documentation for DS scripting on the DS3.x page here -

    http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start

    Lots of it is still valid.

    You may also find the good ole RiSpec still useful if you need to brush on the foundations:

    https://hradec.com/ebooks/CGI/RPS_13.5/prman_technical_rendering/users_guide/RISpec-html/index.html

    Post edited by Mustakettu85 on
  • FG3DFG3D Posts: 7

    Mustakettu85 said:

    That code should be used in a rendertime script of your shader, and as it's relatively new, it's not that widely used. It's easier to rely on good old scripted rendering (which will also give you lots of other goodies).

    If you download Wowie's aweSurface installation package here - https://drive.google.com/file/d/154hmnGLi6xBC1Qrx3IJVnukVnfZgiCSr/view?usp=drivesdk - you will get a working scripted renderer setup. Once you unpack the zip, go to the template DS folder/scripts/support/DAZ/ScriptedRenderer/RaytracerGeneral and check out the script.

    Right after Renderer.riWorldBegin(), I built a new coordinate system that matches a skydome made out of a default DS primitive sphere with normals inverted.

    I don't know how its handedness compares to the 3DLEnvSpace, introduced for Parris way, way later.

    There's also a zip with documentation for DS scripting on the DS3.x page here -

    http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start

    Lots of it is still valid.

    You may also find the good ole RiSpec still useful if you need to brush on the foundations:

    https://hradec.com/ebooks/CGI/RPS_13.5/prman_technical_rendering/users_guide/RISpec-html/index.html

    Thanks a lot, I know it's very old stuff but as a musician I've always loved tube amps :)

  • Pardon me, I was told to ask here about a missing Rendeman brick? PxrFacingRatio (https://renderman.pixar.com/resources/RenderMan_20/PxrFacingRatio.html) doesn't seem to be available currently in either the Shader Mixer or the Shader Builder. I would think it would be easy to add this already existing Rendeman...uh...thing to Daz, but I'm completely clueless how it could be done. Guidance?

  • Mustakettu85Mustakettu85 Posts: 2,838

    Well, it says right there in the beginning: "Computes the facing ratio of the geometry: a simple dot product between the camera vector and the surface normal."

    You don't need bricks for something this basic. 

     

Sign In or Register to comment.