3Delight Laboratory Thread: tips, questions, experiments

19495969798100»

Comments

  • FG3DFG3D Posts: 7
    edited April 2021

    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 2021

    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,933
    edited April 2021
    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,933

    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. 

     

  • mindsongmindsong Posts: 1,693

    After a few fascinating hours in the internet-search wormhole, I didn't have any luck finding info or references to 3Delight cameras with respect to native 360 rendering, especially 360-stereo  - offsets, etc.

    Is this available and simply not 'exposed' to us in the 3Delight versions we're using?

    The answer may be useful, but the ability to use 3DL to generate spherical/360 stereo renders is really the goal.

    Any comments or pointers to long-since-given-up forum discussions, or clever hacks/scripts that work around unavailable functionality?

    (I have working non-spherical L/R camera rigs, and can generate and convert single-point-of-view cube-maps, but a stereo/VR function from 3DL is my current holy grail, even if it is a hack)

    cheers/tia,

    --ms

  • Mustakettu85Mustakettu85 Posts: 2,933
    edited July 2021

    I'm not sure about stereo, IIRC DS never allowed rendering from two cameras at once - so here you might be limited to sequential rendering from one camera and then from the second one.

    But a panorama is perfectly doable if you have a 12.x 3Delight standalone installed - a Windows binary is archived here: https://www.malavida.com/en/soft/3delight/#gref

    Then you export your scene to RIB (if using the vanilla render settings tab, check "collect and localise"; if using scripted rendering, then either do not close the scene in DS or run ribdepends manually on the RIB exported from DS), and then you need to edit the "projection" option and instead of "perspective" and its FoV you type "spherical" and delete the line with FoV, so that only this remains:

    Projection "spherical"

    You may also set the exact dimensions in pixels while you're at it, in case you forget to change your camera settings (the previous line, Format, and the next one, ScreenWindow).

    You should be able to get something like this (I forgot to change the dimensions, so the panorama overlaps a bit)... The scene is a WIP conversion of an UltraScenery scene to my own shaders, so the branch of that tree instance does get in the way of the camera lens :)

    us_test.rib.png
    1000 x 618 - 1M
    Post edited by Mustakettu85 on
  • mindsongmindsong Posts: 1,693
    edited July 2021

    Multi-zillion ray-bounces of thanks @Mustakettu! (I've learned a lot more than I probably wanted to about depth-maps since that last note, heh).

    I just grabbed that 3dl standalone (tnx!), but was wondering if the 3DL-standalone versions that I've saved that are closer to the current DS 12.0.27 have any advantage as far as matching the behavior and results, with respect to materials, shaders, etc.?

    I'm hoping to composite some layers in this effort, so matching results is pretty important, even if 'not the latest' in terms of quality/accuracy. I've got the 12.0.19 and 12.0.68 standalones - any thoughts on that? (e.g. do these even honor the mentioned 'spherical' option?)

    eta: looks like spherical projections were added in 12.0.7, and last fixed in 12.0.32. Looking for more details in the docs and possible IOD offsets

    eta: this is for animations as well, so any thoughts on generating the rib series are welcomed too. I've got mjcasuals rib series script and a variant from the script/SDK forums, but any advice on that topic would be welcomed and appreciated as well.

    best,

    --ms

    Post edited by mindsong on
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited July 2021
    You're most welcome ))

    Depends on what shaders you're using - if it's NPR and/or DS vanilla shaders in REYES, all 12.x builds are the same. If you're using path-tracing, then the final build (12.5.9) is the best in terms of quality and speed, particularly the GGX bsdf.

    RIB series... so much pain. It's exactly what it is, a hack (normally we'd have all frames in a single RIB, but DS simply does not have RiFrameBegin/RiFrameEnd in the render script API... maybe even in the plugin SDK, can't tell for sure). I haven't looked into mCasual's script; I added that functionality to my own scripts based on my own experiments, but it's such a brittle process, extremely prone to the dreaded "popContext() doesn't match with pushContext()" Qt error. And there's no way we'd get support on that because it's likely circumventing restrictions that were put in on purpose... or a glaring oversight.

    Post edited by Mustakettu85 on
  • mindsongmindsong Posts: 1,693
    edited July 2021

    Mustakettu85 said:

    You're most welcome ))

    Depends on what shaders you're using - if it's NPR and/or DS vanilla shaders in REYES, all 12.x builds are the same. If you're using path-tracing, then the final build (12.5.9) is the best in terms of quality and speed, particularly the GGX bsdf.

    That's a valuable distinction. Right now I'm working with a more stylized toon effect, so I'll assume (going in) that those effects are not changing notably in the 12.x family, but I'll certainly do some verification renders. It's always nice to know up-front when radical changes are reasonable to expect as updates are released.

    RIB series... so much pain. It's exactly what it is, a hack (normally we'd have all frames in a single RIB, but DS simply does not have RiFrameBegin/RiFrameEnd in the render script API... maybe even in the plugin SDK, can't tell for sure). I haven't looked into mCasual's script; I added that functionality to my own scripts based on my own experiments, but it's such a brittle process, extremely prone to the dreaded "popContext() doesn't match with pushContext()" Qt error. And there's no way we'd get support on that because it's likely circumventing restrictions that were put in on purpose... or a glaring oversight.

    I've got to go find a basic RiFrameBegin/RiFrameEnd example of a simple spinning cube to see if I can hack a quick-fix for an idea I have, but outside that, it sounds like my perception of DS RIBs is consistent with your assessment.

     

    To be fair, as I dive into the 3DL facet of my project (it's expected to be a mix of stylized iray/3dl and maybe even some opengl), my perusal of this 3DL lab thread shows that there's an absolute wealth of information relating to the core DS 3DL engine, fixes/tweaks, and the key RSL 'expansions' (yours, wowies's AWE, AoA lights/shaders, Parrish's IBL-master, Marshian's tools, the PW-family, etc.) that both boggle the mind, but clearly define and address available 3DL features and improvements that can be realized with some extra (and clever) work-arounds. Thanks to all who share.

    I haven't needed this level-of-detail up until now, but I will do my due-diligence and 'rewind'/review the thread over time, but I *really* appreciate that you folks will let me skip reading the better part of 100+ pages of 3DL genius, and *can* (and do!) quickly summarize the current state-of-affairs with respect to specific situations like this. Gracias!

    It's pretty funny how sparse my internet pickings were relating to the "3DL + 360, VR, VR360, ..." searches, but as soon as I searched with '3DL projection spherical' ... lol, ooodles of information popped right up. Go figure, you have to already know what you're looking for to find what you're looking for, heh. I really thought my searches were broad and exhaustive, then I felt silly for missing so much.

    I'm still digging around for the stereo 'angle' on this :^), which requires that the camera is offset about +/- 33.3mm in the X from it's 0,0,0 point as it 'spins', taking the spherical L/R snapshot, but I don't see any additional 'spherical' parameters in the user's guide, so either there is no such option/hack, or I have to get further into the innards of the 3DL-directives and/or RIB language to find it. Do you know of a docs repository that has the more 'gory' information relevant to our 12.x family of 3DL (and the RIB spec that it used as a reference at that time)? I would imagine the newer current stuff is likely to have a lot of not-yet-supported features and specs since the 12.x family was dropped. All pointers are appreciated. Off to the wayback machine I go...

    Thanks again, and I'll share/track my progress here as I dig in further.

    eta:

    RIB file reference link from above (not sure how old, but a good start) :

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

    3DL 'legacy' (pre-NSI version) user-guide and release notes that are still available on their site:

       https://www.3delight.com/documentation/display/3DSP/Release+Notes
       https://www.3delight.com/documentation/display/3DSP/Changelog+12.x

    Some interesting/relevant local threads on the subject:

       https://www.daz3d.com/forums/discussion/147701/have-a-look-around-360-renders/p1
       https://www.daz3d.com/forums/discussion/64539/can-someone-build-a-360-panormaic-camera-for-use-in-daz-for-animation-i-ll-pay
       https://www.daz3d.com/forums/discussion/71102/spherical-camera
       https://www.daz3d.com/forums/discussion/126176/spherical-cameras-and-3d-in-carrara
       https://www.daz3d.com/forums/discussion/4324/combining-spherical-mapper-and-anaglyph-system

    Most of the conversations wander a bit into relevant facets of the area that may be more interesting than the main topics. Will add as I find 'em (I know the Bryce forums have some too)

    (if there's already a list of current 3DL links/repos like this, let me know. This could be very redundant and confusing if better links are already available).

    best,

    --ms

    Post edited by mindsong on
  • Mustakettu85Mustakettu85 Posts: 2,933
    There was talk of stereo rendering somewhere, but it could've been on the old 3Delight forums - and those weren't picked up by the Wayback Machine anyhow well.

    The devs are still quite responsive even to free tier users, it's just that they've moved all the interaction to their Discord, so it's only for those who keep up with the times now :) The link should be somewhere on their website; if you don't mind Discord, you could ask there. It might be the best bet.

    "Expansions" like shaders and scripted rendering aren't even "expansions", they're about using a programmable renderer the way it's supposed to be used... though a lot of the stuff in the store here has somehow historically focused on artistic effects and encouraged "faking" at the expense of proper understanding. A major pet peeve of mine, that. Still going on with Iray as well. But I digress.

    The last RiSpec is here: https://hradec.com/ebooks/CGI/RPS_13.5/prman_technical_rendering/users_guide/RISpec-html/index.html

    3Delight installs with some documentation and quite a few shader and RIB examples (mostly REYES, but the Maya folders are more up-to-date).

    There were lots of SIGGRAPH papers and courses ("advanced renderman" this and that, "what the RiSpec never told you", etc) still available as PDF files on the web; Moritz Moeller contributed with neat stuff to at least one of those.

    But I don't think there was much about stereo rendering there. It didn't seem to be en vogue back then.

  • mindsongmindsong Posts: 1,693
    edited July 2021

    Mustakettu85 said:

    There was talk of stereo rendering somewhere, but it could've been on the old 3Delight forums - and those weren't picked up by the Wayback Machine anyhow well.

    The old forums, hmm, that's a thought. Like many, I've got some working dual camera rigs for normal '90-deg FOV forward facing' stuff that work pretty well (and I was using the 6-face cube technique well-enough in 3DL - hence my pleasure at your 3DL 'projection spherical' option enlightenment!).

    And there are many clever folks that have done similar, and posted their experiments as well. Not too much 360 stuff, and even less 360-stereo. Still, a few gems might be buried in the rough, and the search is usually enlightening in one way or another.

    The devs are still quite responsive even to free tier users, it's just that they've moved all the interaction to their Discord, so it's only for those who keep up with the times now :) The link should be somewhere on their website; if you don't mind Discord, you could ask there. It might be the best bet.

    something to be said for going right to the source.

    "Expansions" like shaders and scripted rendering aren't even "expansions", they're about using a programmable renderer the way it's supposed to be used... though a lot of the stuff in the store here has somehow historically focused on artistic effects and encouraged "faking" at the expense of proper understanding. A major pet peeve of mine, that. Still going on with Iray as well. But I digress.

    (ms smiles - appreciating the distinction and ongoing tension between true mastery and a good-ole-hack or six)

    The last RiSpec is here: https://hradec.com/ebooks/CGI/RPS_13.5/prman_technical_rendering/users_guide/RISpec-html/index.html

    3Delight installs with some documentation and quite a few shader and RIB examples (mostly REYES, but the Maya folders are more up-to-date).

    thanks - this is good to know, as I usually do better starting with examples/templates, and then I can confirm/refine with docs, rather than the other-way-around, so that's a good resource. I've browsed the docs, but haven't yet perused the examples.

    There were lots of SIGGRAPH papers and courses ("advanced renderman" this and that, "what the RiSpec never told you", etc) still available as PDF files on the web; Moritz Moeller contributed with neat stuff to at least one of those.

    +++ added to my places to treasure-hunt list.

    But I don't think there was much about stereo rendering there. It didn't seem to be en vogue back then.

    3D-stereo definitely comes (and quickly goes) in waves. A couple of years back our local big-box Costco store had atleast 30+ 3D-stereo TVs in their TV-product area, now you can't find a single one in *any* retailer's stock. There are a few VR360 folks in this community, and with phones + google-glass, and the next generation of head-mounted-displays dropping into the commodity pricing domain, I think we'll soon see yet another variant of the s3D wave again. Popularity-wise, pre-rendered 'static' s3D stuff will have its work cut-out for it relative to dynamic emmersive/realtime environments, but I think there's a place for it, and I enjoy the heck out of the challenge, even if I'm probably doing MS-Paint in a Photoshop world.

    Thanks for your continued interest and comments. I hope this mini-thread will prove meaningful to other curious souls that follow.

    best,

    --ms

    Post edited by mindsong on
  • Mustakettu85Mustakettu85 Posts: 2,933
    You're most welcome; it would be great if you managed to solve this puzzle :)
Sign In or Register to comment.