POV-Ray : Newsgroups : povray.binaries.images : strange behavior, lightsource + lookslike + media : strange behavior, lightsource + lookslike + media Server Time
30 Jul 2024 12:25:15 EDT (-0400)
  strange behavior, lightsource + lookslike + media  
From: [GDS|Entropy]
Date: 28 Oct 2011 07:50:01
Message: <web.4eaa95c011cbbbbd77e50e540@news.povray.org>
I do not understand why the position of this object controls its appearance.
Any clues?

I seem to have covered all position based params with the macro variable...

Source below:

// ----------------------------------------

camera
{
    right x*image_width/image_height
    location  <0, 0, -5>
    look_at   <0, 0, 0>
}

// ----------------------------------------

#macro BlackHoleWarp(Iterations, Falloff, Strength, Position, Radius)
    #local counter = 0; // set counter to 0
    #while (counter < Iterations)

        warp
        {
            black_hole Position, Radius
            falloff Falloff
            strength Strength
            turbulence 0.4
        }

        #local counter = counter + 1;
    #end
#end

#macro Glow(glowPosition, glowRadius, glowColor)
light_source
{
    glowPosition
    color rgb glowColor
    looks_like
    {
        sphere
        {
            glowPosition, glowRadius
            hollow
            pigment
            {
                rgbt <0, 0, 0, 1>
            }
            interior
            {
                media
                {
                    intervals 1 //  scale this in relation to distance from
camera
                    samples 1, 1
                    emission glowColor
                    density
                    {
                        spherical
                        scale 3
                        density_map
                        {
                            [0.0 rgb glowColor * 0.000]
                            [0.8 rgb glowColor * 0.250]
                            [0.9 rgb glowColor * 0.750]
                            [1.0 rgb glowColor * 1.000]
                        }
                    }
                    density
                    {
                        spherical
                        density_map
                        {
                            [0.00 color rgb glowColor * 0.000]
                            [ 0.90
                                granite
                                color_map
                                {
                                    [0 color rgb glowColor * 0.750]
                                    [1 color rgb glowColor * 0.250]
                                }
                                //BlackHoleWarp(4, 1, 1, glowPosition, 1)
                            ]
                            [1.00 color rgb glowColor * 1.500]
                        }
                    }
                }
            }
            finish
            {
                reflection 0
                diffuse 0
                ambient 0
                phong 0
                specular 0
                brilliance 0
            }
        }
    }
}
#end

Glow(<2, 0, 0>, 2, <1, 1, 1>)
Glow(<0, 0, 0>, 2, <0.5, 0.5, 0.55> * 1.5)
Glow(<-2, 0, 0>, 2, <0, 0.5, 0.5> * 1.5)

plane
{
    <0, 1, 0>, 0
    hollow
    texture
    {
        pigment
        {
            color rgb <0.5, 0.5, 0.55>
        }
    }
    scale <1, 1, 1>
    translate <0, -1, 0>
}


Post a reply to this message


Attachments:
Download 'mediaglow2011_0.png' (55 KB)

Preview of image 'mediaglow2011_0.png'
mediaglow2011_0.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.