Page 1 of 3 123 LastLast
Results 1 to 15 of 39

Thread: Transparent edges - planets atmosphere problem.

  1. #1
    Registered User
    Join Date
    May 2003
    Location
    Poland
    Posts
    299

    Transparent edges - planets atmosphere problem.

    So, I`m trying to make it the old way. You now, two spheres, one smaller with planet texture, one bigger with transparent edges, to make fake atmosphere. In old days it was easy.
    Now, in LW201lw2019 it is a mystery for me, how to make atmosphere imitation. Any ideas ?

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,639
    Yes, I really liked the simplicity of a couple of Edge Transparency shaders, one with Transparent mode and one with Opaque mode to make a nice, smooth, blurry atomsphere edge. All of the shaders have been removed for LW2019 (and LW2018) as being "incompatible with the new rendering engine".

    For LW2019, you can use a Gradient to specify the Transparency based upon the angle of Incidence. The angle of Incidence ranges between 0.0 and 1.0, where 0.0 is pointing at right angles to the Camera and 1.0 is pointing directly at the Camera. The Incidence node can also be set up for 0.0 to 2.0 (180 degrees in the interface) to allow manipulation of the back side of the object.

    A quick LW2019 sample scene attached.

    Click image for larger version. 

Name:	Final_Render_000.jpg 
Views:	27 
Size:	45.2 KB 
ID:	144086 Click image for larger version. 

Name:	Final_Render_030.jpg 
Views:	25 
Size:	89.0 KB 
ID:	144087

    Click image for larger version. 

Name:	Final_Render_080.jpg 
Views:	26 
Size:	159.1 KB 
ID:	144088 Click image for larger version. 

Name:	Final_Render_120.jpg 
Views:	33 
Size:	114.5 KB 
ID:	144089

    MOV file: EdgeTransparency_AtmosphereTest.mov

    The setup is on the Transparency channel of the Atmosphere layer:

    Click image for larger version. 

Name:	EdgeTransparency_AtmosphereTest_Setup.jpg 
Views:	41 
Size:	964.0 KB 
ID:	144092

    Note that it is the Alpha channel value which determines the Transparency as the Incidence decreases from 0.7 to 0.0. Anything less than an Incidence of 0.7 keeps the Alpha value of the lowest key.

    Here's a closeup of the Atmosphere with the Gradient on Incidence angle super-imposed where the Planet Surface has been disabled:

    Click image for larger version. 

Name:	Closeup_Gradient_EdgeTransparency_WithPlanetDisabled_GradientOverlay.jpg 
Views:	37 
Size:	93.2 KB 
ID:	144093

    and here's the full view, again with the Planet Surface disabled:

    Click image for larger version. 

Name:	Gradient_EdgeTransparency_WithPlanetDisabled.jpg 
Views:	26 
Size:	17.2 KB 
ID:	144094

    As the Alpha channel goes to 0.0 (the checkered portions of the Gradient), the Surface becomes opaque, and as it goes to 1.0 the Surface becomes transparent. This allows basically any "shape" of the opacity of the atmosphere.

    For your own application, you can load the sample object and copy-n-paste the Atmosphere Surface and then adjust as you want (color, banding, etc.)

    Have fun!
    mTp
    Attached Files Attached Files
    Last edited by MonroePoteet; 02-10-2019 at 07:22 PM. Reason: Forgot sample scene file; invert Incidence, 0-1 range

  3. #3
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Pasadena, CA
    Posts
    1,052
    Thanks a heap for all of this MonroePoteet. I've periodically tried whanging a basic starter planet with LW over the past couple of versions, but didn't realize it was sort of a moving target. Then I thought for what I wanted to do, I'd just use the VideoCopilot tool in After Affects, but unfortunately, my video hardware is "inadequate". It's always something. Will be remedying both the hardware thing & the 2019 update soonish though so looking forward to playing.
    "Never be a cat in a cartoon. Never." Chief Wiggum

  4. #4
    Registered User
    Join Date
    May 2003
    Location
    Poland
    Posts
    299
    Thx, Monroe. This is very helpful.

  5. #5
    Registered User
    Join Date
    May 2012
    Location
    Virginia
    Posts
    334
    Have you considered using a volumetric primitive for the atmosphere?

    Interested to see how that would turn out, or if it's usable.

  6. #6
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,639
    Quote Originally Posted by RPSchmidt View Post
    Have you considered using a volumetric primitive for the atmosphere?

    Interested to see how that would turn out, or if it's usable.
    As far as I can tell, neither the Incidence node nor the Gradient=>Incidence input work in the node editor for Volumetric primitives.

    mTp

  7. #7
    Registered User
    Join Date
    May 2012
    Location
    Virginia
    Posts
    334
    Quote Originally Posted by MonroePoteet View Post
    As far as I can tell, neither the Incidence node nor the Gradient=>Incidence input work in the node editor for Volumetric primitives.

    mTp
    That is a real shame. That seems like a very limiting omission.

  8. #8
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,639
    No reason it would work that way. Volumes arent a solid thing like an object, you can think of them as a collection/,ist of tiny particles, thus youd be talking the incidence of each particle, which ofc isnt the same. The incidence trick on a sphere object is meant to simulate the thickening and scattering through the atmosphere as the angle of view through it changes. A volume, done right, would have this effect "naturally" occur.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  9. #9
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,639
    I think the Incidence angle is the cosine of the angle between the Camera and the Surface normal (i.e. dot product). Since in a Volumetric primitive there isn't any geometry which provides a Surface at all the Surface normal isn't readily available, so I can kind of understand the omission.

    Having said that, IMO the options for user-defined manipulation the Volumetric primitives are very limited (I would even say crippled) by the general omission of ANY sort of "volume" information in the Volumetric Primitive node editor. The Gradient node's X, Y and Z Coordinate inputs have some access to the volume in a Cartesian coordinate system, and the 3D textures also have that same sort of access, but I can't find any node that provides a general (X,Y,Z) volumetric coordinate for use in the node network's calculation / manipulation.

    The X Coordinate, Y Coordinate and Z Coordinate access in the Gradient might provide some minimal, Cartesian manipulation of the volume, but my testing and attempts to use them makes me think the Alpha channel manipulation of the volumetric texture is completely non-intuitive and IMO, broken. After infinite experimentation, I was able to produce an OK shape for a cumulonimbus cloud in this post:

    https://forums.newtek.com/showthread...=1#post1548050

    but the values used in the Alpha channel are completely non-intuitive for shaping the Volumetric Primitive, e.g. Alpha of -1000 to make it *bigger* and 1000 to make it *smaller*?!!? As well, changing one value seems to have completely incomprehensible affects (IMO) on other dimensions / nodes, not in keeping (again, IMO) with the Hermite or Bezier spline curve supposedly enforced in the Gradient.

    IMO, the node editor for Volumetric Primitives desperately needs a "Spot Info" node similar to the LW2015 node, but reflecting the "current spot" in the volume. Ideally, there would be two "Volumetric Spot Info" nodes, one which provides Cartesian coordinates of the volume and another which provides Polar coordinates (basically heading angle, pitch angle, and radial distance to the voumetric point). Since the 3D textures clearly have internal access to that information for producing volumetric manipulation of the Density, etc., I would hope it's just a matter of providing Nodal access to that information.

    But, of course, I could be completely wrong about ALL of this!

    mTp
    Last edited by MonroePoteet; 02-12-2019 at 09:56 AM. Reason: Capitalize "Cartesian"

  10. #10
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,639
    Just saw RebelHill's post. The basic (very long winded) point of my prior post is that the atmospheric effect would be easy if there was a Volumetric Spot Info node. The Volumetric Density could then be set according to the Distance from the center, providing a thick Density at the "planet surface" and diminishing density outward as the atmosphere fades off. Assuming the Volumetric Primitive is implemented correctly, as RebelHill indicates, the desired effect should be automatic.

    mTp

  11. #11
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,639
    You can do it with a distance to object gradient using the ol layer node.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	distGrad.PNG 
Views:	39 
Size:	427.9 KB 
ID:	144105  
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  12. #12
    Registered User
    Join Date
    May 2012
    Location
    Virginia
    Posts
    334
    Quote Originally Posted by RebelHill View Post
    No reason it would work that way. Volumes arent a solid thing like an object, you can think of them as a collection/,ist of tiny particles, thus youd be talking the incidence of each particle, which ofc isnt the same. The incidence trick on a sphere object is meant to simulate the thickening and scattering through the atmosphere as the angle of view through it changes. A volume, done right, would have this effect "naturally" occur.
    Absolutely, volumes aren't solid; neither is our atmosphere. It is made up of a combination of gasses and a very large amount of water, either vapor or ice crystals.

    Literally, you are taking the incidence angle of each particle when you look at an area of earth from space that is lit by the sun; but large swathes of the area you are looking at can share the same (or so close as to be miniscule) incidence angle depending on your light source and your optical viewpoint.

    I'm not sure about the implementation of incidence here, but the actual angle of incidence has a mathematical solution used to determine the total amount of solar radiation striking a portion of the earth.

    Quote Originally Posted by MonroePoteet View Post
    Just saw RebelHill's post. The basic (very long winded) point of my prior post is that the atmospheric effect would be easy if there was a Volumetric Spot Info node. The Volumetric Density could then be set according to the Distance from the center, providing a thick Density at the "planet surface" and diminishing density outward as the atmosphere fades off. Assuming the Volumetric Primitive is implemented correctly, as RebelHill indicates, the desired effect should be automatic.

    mTp
    Certainly thickness is important, but so is the angle of light and the optical viewpoint to the surface.

    Create a null and call it volume; make it a volumetric primitive and set the step size to 10mm, emission scale to 5 and color to white, and the absorption scale to 4. Make it non-pyroclastic.

    Then create a null and call it sphere and make it a spherical shape primitive; change the surface color to blue.

    When you look at it in VPR, you should see a small blue sphere inside the volume. You can see that the apparent density of the volume increases as it gets nearer the center of the volume, obscuring the sphere.

    Now change the size of the sphere to .88. Add another camera and change its angle of view to look at your sphere from a glancing / grazing angle.

    If you look at the sphere through your straight camera and your glancing angle camera, there is no change to the appearance of the atmosphere. It remains uniform.

    We just aren't getting atmospheric reflection here based on the position of our "sun" and the amount of light striking it; all we are getting is uniform density. So the amount of perceived density doesn't change the further you are from the angled position camera, or when you are looking at it from two very different viewpoints.

    Or I could be completely wrong. It still seems like an oversight in volumetrics.

  13. #13
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,639
    Black sphere with white scattering volume atmosphere. With the light behind the camera, we get incidence type effect as a natural consequence of the volume. With the light behind the "planet" we get the shine through with creeping atmospheric illumination beyond the night side... all as expected.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	plan.PNG 
Views:	43 
Size:	72.7 KB 
ID:	144106   Click image for larger version. 

Name:	p2.PNG 
Views:	43 
Size:	49.6 KB 
ID:	144107  
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  14. #14
    Registered User
    Join Date
    May 2012
    Location
    Virginia
    Posts
    334
    Quote Originally Posted by RebelHill View Post
    Black sphere with white scattering volume atmosphere. With the light behind the camera, we get incidence type effect as a natural consequence of the volume. With the light behind the "planet" we get the shine through with creeping atmospheric illumination beyond the night side... all as expected.
    Oh, certaintly... I guess I was looking for something more like what we see in this image; the atmospheric density appears to be less nearer the optical view and increases with distance to the horizon.

    Click image for larger version. 

Name:	39644-earth-space.jpg 
Views:	37 
Size:	267.8 KB 
ID:	144108

    In my test, at least, you aren't getting that... the atmosphere is uniformly dense.

    Even when I pulled the camera in so that it was easily partially inside the edge of my "atmosphere" the density didn't seem to change.

  15. #15
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,639
    The effect is one based on the angle of view, not the distance. That pic you post could have the camera located in low earth orbit, or it could be in another galaxy (with a super-mega-alien zoom lens)... it would appear no different.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •