POV-Ray : Newsgroups : povray.binaries.images : strange behavior, lightsource + lookslike + media : Re: strange behavior, lightsource + lookslike + media Server Time
2 Nov 2024 02:16:58 EDT (-0400)
  Re: strange behavior, lightsource + lookslike + media  
From: Alain
Date: 29 Oct 2011 14:20:54
Message: <4eac4406@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

A looks_like object location is relative to it's associated light_source.

This light_source have it's looks like correctly placed:
(texture intentionaly omited)
light_source{<100,0,0> rgb 1 looks_like{sphere{0, 1}}}

In your case, using <0,0,0> as the looks_like object location ALSO 
translate the media to the correct location.

This one don't, it's located at <200,0,0>:
light_source{<100,0,0> rgb 1 looks_like{sphere{<100,0,0>, 1}}}

Any contained media will be located relative to the light_source, but no 
longer with the container.


Some media hints:
intervals MUST remains at 1
samples NEVER use the second parameter when using the default smpling 
method: method 3.

As it is, you take only one sample at the mid point of the container and 
assume that it don't change.

Also, your containers overlap each other. As the spherical pattern have 
an effective radius of 1, reducing your containers radius to that value 
suppress the overlap, and some changes related to the location.


Alain


Post a reply to this message

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