3Delight Laboratory Thread: tips, questions, experiments

16162646667100

Comments

  • Oso3DOso3D Posts: 15,045

    Ah, no, the winter terrain thing is specific to the model; it uses an image mask specifically based on the terrain, rather than anything generated from the surface.

    Experimenting with Let it Snow. It's not perfect, but it's at least decent.

     

  • StonemasonStonemason Posts: 1,197

    winter terrains I think is map based..but this one http://www.daz3d.com/winter-kingdom-castle-ruins uses a shader that applies snow on the top facing polys,with a dial to control the snow amount

  • Oso3DOso3D Posts: 15,045

    Is the snow a texture map, or simple color controls?

     

  • StonemasonStonemason Posts: 1,197

    the snow and rocks are tiled maps..although if you already have 'let it snow' then you already have that snow shader..so no need for winter kingdoms :)

    Cheers

  • Oso3DOso3D Posts: 15,045

    Ah, but I have the second version of Let it Snow, which doesn't have it (it's totally geoshell-based).

     

  • You can get the facing of a polygon by taking the dot product of its normal (available from the Variable brick) with ( 0, 1, 0 ) - 1 is face-upup, 0 is vertical, -1 is face-down. You can also get the height by taking P from the variable brick, converting to world space if needed (I can't recall) and extracting the y value - though I think height might be directly available.

  • wowiewowie Posts: 2,029

    Something I've been working on and off. No textures or opacity maps. wink

     

    test4.jpg
    826 x 1070 - 319K
    test7.jpg
    826 x 1070 - 306K
    test8.jpg
    826 x 1070 - 281K
  • Oso3DOso3D Posts: 15,045

    Any tips on how to extract one value from float3, Richard?

     

  • Richard HaseltineRichard Haseltine Posts: 102,730
    edited August 2016

    Components brick? Is this Iray or 3Delight?

    Post edited by Richard Haseltine on
  • Oso3DOso3D Posts: 15,045
    I keep dabbling back and forth. Heh. Either or both? RDL seems to have some 'get y' stuff. So does MDL, but it crashes.
  • I've not really looked (at least without gibbering) at the MDL stuff.

  • Oso3DOso3D Posts: 15,045

    Ha! I figured it out, thanks. ;)

    (Going to add normals and elevation to procedural thing)

  • If you did it in MDL I'd love to know how.

  • Oso3DOso3D Posts: 15,045

    It's from the Float accessors.

    I was flummoxed when 'Float: Get Y' just crashed Daz consistently. Buuut if you use the previous brick Float3 [I] and feed it a coordinate (1 for Y, as it turns out), it spits out a Y value.

    (Note this works for Position, too, giving you an elevation output)

     

    (Location of brick: Bricks > Functions > MDL > Built Ins > Types > Accessors > Float3 > Float3 [I]

    And you owe me your firstborn because that was a royal PITA to uncover)

     

  • Heh, I thought I'd looked there - obviously you have better eyes than me.

  • wowie said:

    Btw, what is NSI?

    It's DNA's new API, it adds to RiSpec and may eventually supplant it. Right now, it's used to define OSL shders in the RIB file.

  • Handling of refraction shouldn't change from one renderer to the other

    I made two quick examples for Iray and 3delight. I have no difference in the refraction through the glass with custom shaders

    For the absorption, I don't think that it is needed for a liquid on a so short distance. Making unnecessary complicated things

    Hi! 

    You must have posted a different 3DL render than you intended - glossy refraction is just not cutting it as "no difference". Show us the real deal sans roughness, please.

    Supposing I want to animate the liquid, or just render a fluid sim mid-splash? There will be a difference between absoption and simply multiplying refraction by a colour. Especially if it's something like coffee.

    And since I get very little penalty for absorption - it uses the RT distance reported by that very trace() that does the GGX reflect/refract - I just don't see the advatange of complicating the user interface with even more switches. There is more use to RT subsets than only this cheat =)

    I don't see absorption in your render.And I think you got it wrong. The distance given by trace() is the distance to closest intersection. So are you calculating absorption based on the distance to an occluding object?

    Here is an other render. This one is with volume absorption. I don't think I got the refraction right.

    AA delight glass 16.jpg
    611 x 892 - 184K
  • Mustakettu85Mustakettu85 Posts: 2,933
    edited September 2016

    I don't see absorption in your render.And I think you got it wrong. The distance given by trace() is the distance to closest intersection. So are you calculating absorption based on the distance to an occluding object?

    Exactly. It takes objects inside the refractive mesh into account. And when there is none, it hits the other side and calls it a day. It may become too much in places like corners with multiple bounces, I think, because I don't cut it off at any ray depth. But it's believable regardless.

    It handles shallow water with increasing depth when the water is just a plane:

    https://mustakettu85.files.wordpress.com/2015/09/shinyfakewater.jpg

    And this isn't exactly coffee but getting there (Spacebone's water OBJ, SickleYield DS4-fication):

    It's definitely not a 150% physically correct sim of absorption, but for artistic purposes it doesn't look that bad.

    weird_liquid.png
    433 x 700 - 475K
    Post edited by Mustakettu85 on
  • Here is an other render. This one is with volume absorption. I don't think I got the refraction right.

    Were you going for a cocktail with two layers of barely mixing liquids? Cool.

     

  • And now... sorry if someone here knew this already, but I came across this today totally at random and wanted to share.

    Geometry Editor tool, selection by edge gives you an option to set "subdivision weight".

    And you can go above 1!!

    These cubes have creased angles, as you see. The smoother one is weighted at 1. The sharper one, at 5.

    Why all the excitement? We can use old models that don't have beveled edges! // if they don't fall apart when subdivided, of course //

    It works for Catmark, Catmull-Clark _and_ Loop (maybe bilinear too, but I didn't render). The point is, what you see in the viewport isn't really the same that you get in render. Maybe increasing viewport subdivision levels will help, but I didn't try.

    Remember that for real sub-d (the Cat* ones), 3DL always renders the "limit surface" ("highest quality", so to speak), so no need to increase render sub-d level.

    Loop, on the other hand, gets passed to 3DL as polys, so for Loop, render sub-d will matter. If you go too high, you may even crash DS.

    subdiv_weight_2.png
    512 x 512 - 107K
    subdiv_weight_5.png
    512 x 512 - 108K
  • Oso3DOso3D Posts: 15,045

    Is there a RDL brick to spit out absolute Normal? Poking at ideas of doing something in 3DL like I am with Iray.

    So in MDL there is a Normal brick that returns XYZ information about an object's normals based on the absolute world reference frame.

    In RDL, there is a Calculate Normal brick, but it seems to return a normal based on the camera.

     

  • Richard HaseltineRichard Haseltine Posts: 102,730
    edited September 2016

    Is there a RDL brick to spit out absolute Normal? Poking at ideas of doing something in 3DL like I am with Iray.

    So in MDL there is a Normal brick that returns XYZ information about an object's normals based on the absolute world reference frame.

    In RDL, there is a Calculate Normal brick, but it seems to return a normal based on the camera.

    The Transform brick (Geometric>Transformations>Transform) will convert points between spaces (coordinate systems) - you may be able to use that. Though I thought the normal, returned from the Variable brick, was in World Space - I used it to dot product the normalised eye vector in my shader to allow two-sided shading (back face different from front).

    Post edited by Richard Haseltine on
  • Will, what exactly you're trying to do? The default coordinate system - the "current" space - is indeed the same as "camera" space, but most of the time it's sufficient.

  • Oso3DOso3D Posts: 15,045
    Contemplating a dual shader where one set is on 'tops' and the other for the rest, like snow or similar.
  • Oso3DOso3D Posts: 15,045
    Richard: maybe I'm misunderstanding the results I've been seeing from Generate Normal brick.
  • wowiewowie Posts: 2,029
    edited September 2016

    And now... sorry if someone here knew this already, but I came across this today totally at random and wanted to share.

    Geometry Editor tool, selection by edge gives you an option to set "subdivision weight".

    And you can go above 1!!

    These cubes have creased angles, as you see. The smoother one is weighted at 1. The sharper one, at 5.

    Why all the excitement? We can use old models that don't have beveled edges! // if they don't fall apart when subdivided, of course //

    It works for Catmark, Catmull-Clark _and_ Loop (maybe bilinear too, but I didn't render). The point is, what you see in the viewport isn't really the same that you get in render. Maybe increasing viewport subdivision levels will help, but I didn't try.

    Remember that for real sub-d (the Cat* ones), 3DL always renders the "limit surface" ("highest quality", so to speak), so no need to increase render sub-d level.

    Loop, on the other hand, gets passed to 3DL as polys, so for Loop, render sub-d will matter. If you go too high, you may even crash DS.

    Oh that's nice. Couldn't find the option in 4.7 though, so maybe it's 4.8 or above only.

    Now here's something I've come across by accident. Ctrl clicking on a color value in the surfaces tab will bring up a dialog box with the color in decimal values and an option to toggle gamma correction (I assume for only the color).

    In theory, this could makes matching linear color values way more easier.

    The gamma correction is always applied. Using 187,187,187 returns a value of 0.51. There seems to be a slight rounding difference though. I tried inserting the linear value for copper but the color values are slightly different (249,208,194 instead of 251,209,195 from the Naty Hoffman slide), For comparison, I got 250,208,192 with Seb Lagarde's chart and 251,165,139 from Solid Angle Arnold specular chart.

    Btw, Seb has a new paper for SIGGRAPH 2016, An Artist-Friendly Workflow for Panoramic HDRI

    You can find his paper and others including Brian Karis on hair here: http://blog.selfshadow.com/publications/s2016-shading-course/

    Color.jpg
    522 x 199 - 22K
    Fresnel.jpg
    1246 x 724 - 241K
    Post edited by wowie on
  • Contemplating a dual shader where one set is on 'tops' and the other for the rest, like snow or similar.

    And what do you need the normal for? Bump/displacement, slope distribution control, or?.. For bump/displacement, any normal will do, even if you're building a worldspace procedural pattern. It's the shading point coordinates in worldspace that you will need to generate the pattern - and transform() should work for this.

    If you build a patter in UV space, you don't need to know the point, only U and V = s and t.

    If you want altitude-based changes, you also need shading point coordinates (specifically Y) and not normals.

    If you just want one pattern to overlay another, you need to use mix() and no normals =)

  • wowie said:

    Now here's something I've come across by accident. Ctrl clicking on a color value in the surfaces tab will bring up a dialog box with the color in decimal values and an option to toggle gamma correction (I assume for only the color).

    ...

    Btw, Seb has a new paper for SIGGRAPH 2016, An Artist-Friendly Workflow for Panoramic HDRI

    You can find his paper and others including Brian Karis on hair here: http://blog.selfshadow.com/publications/s2016-shading-course/

    Cool! Thanks for sharing!

  • Oso3DOso3D Posts: 15,045
    edited September 2016

    Mustakettu: A mix based on 'how much is this surface facing upward'

    Here's an example of what I did in Iray, and a picture showing the use of it in a scene is here: http://willbear.deviantart.com/art/Traveler-heading-home-after-a-snow2-632252074

     

     

    Snow Cover.duf.png
    364 x 364 - 118K
    Post edited by Oso3D on
  • Mustakettu: A mix based on 'how much is this surface facing upward'

     

    Slope-based distribution, then. Try Functions-Geometric-Transformations-NTransform, "current" to "world".

     

Sign In or Register to comment.