Results 1 to 2 of 2

Thread: Need advice for shading Saturn's rings (as point sprites)?

  1. #1
    Newbie Newbie
    Join Date
    Apr 2017
    Posts
    5

    Need advice for shading Saturn's rings (as point sprites)?

    I am very inexperienced with OpenGL and need help making my scene look more convincing.

    In the attached image it shows a scene I made where there is a sphere surrounded by vertices that make a bunch of concentric rings (they are set to orbit the planet based on Newton's equation for gravity).

    I was hoping to make them look more connected and hazy (maybe some bloom and blur??)

    Additionally I want to also plot vertices behind the tails of commets and was hoping to use the same effect for both situations.

    saturn.jpg

    I was hoping that the effect could be achieved using just the vertex_shader (similar to how I create the sphere effect below)?

    Sphere effect (vertex shader):
    Code :
    //GLSL sphere point sprite effect
    in vec4 _color;
    out vec4 FragColor;
     
    void main() {
        //FragColor = vec4(_color, 1.0); //old way to just pass a color to the vertex (results in a rectangle)
     
        //Calculate normal from texture coordinates
     
        vec3 N;
        N.xy = gl_PointCoord* 2.0 - vec2(1.0);
        float mag = dot(N.xy, N.xy);
        if (mag > 1.0) discard;   // kill pixels outside circle
        N.z = sqrt(1.0-mag);
     
        // calculate lighting
     
        float diffuse = max(0.0, dot(vec3(1.0,0.0,1.0), N));
     
        FragColor = _color * diffuse;
    }


    I was hoping someone could help point me to a way to make my scene look better?

    And also please be thorough in your response because as a new member to the forum I can not respond to anything (yet????)

    Thanks!!

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,652
    Quote Originally Posted by logic1 View Post
    And also please be thorough in your response because as a new member to the forum I can not respond to anything (yet????)
    Sorry about that. I'm pretty sure there there's no such limitation. What is probably happening is your posts are being auto-marked pending approval by a moderator.

    I've contacted the site admin to help us fix this problem. It appears there's some over-aggressive post moderation going on (posts that are marked pending moderator approval before they appear on the forums), probably to try and help avoid forum spam.

    I'm reviewing the backlog of moderation requests right now, and I'll try to get your posts published ASAP. I'll also keep a closer eye on that list until this issue is resolved.

Similar Threads

  1. point sprites, help please...
    By sandbucket in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-25-2013, 04:22 AM
  2. point sprites
    By marksibly in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-06-2006, 10:59 PM
  3. Need advice - 2d height map terrain with relief shading
    By Javac in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 12-21-2003, 09:33 AM
  4. drawing Saturn's rings
    By cg-hci_novice in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-29-2003, 09:04 AM
  5. Point Sprites
    By Zeno in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 05-03-2001, 01:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean