I get it. That's what I needed. Please compare:
http://stolaf.edu/people/hansonr/jmol/test/test-fog-jmol.png
http://stolaf.edu/people/hansonr/jmol/test/test-fog-povray.png
On Tue, Nov 15, 2011 at 5:22 PM, Alexander Rose <[email protected]
> wrote:
> Hi,
>
> Am 15.11.2011 um 23:10 schrieb Robert Hanson:
>
> Oh, you mean you were able to direct the fog from the back to the front?
> That's an idea....
>
> ...nope. I can't get it to work. I think it's a POV-Ray bug. Do you
> suppose they never considered using ground fog this way?
>
>
> me neither, so searched some more
>
>
> The last two entries claim it works?!
>
> http://news.povray.org/povray.general/thread/%[email protected]%3E/?ttop=227500&toff=900
>
> There is also an entry in the PyMOL list suggesting it works:
> http://www.mail-archive.com/[email protected]/msg00850.html
>
> They use another approach (an object whose interior fade to some color,
> they use a plane but I also tried it with a box):
> http://www.dino3d.org/pov/index.php?p=depth
>
> I tried the 'dino' approach, but yet again I couldn't make it work :-(
> See also: http://www.povray.org/documentation/view/3.6.0/410/ and
> http://www.povray.org/documentation/view/3.6.1/416/
>
> However, I sort of faked the effect using multiple planes which transmit
> less and less light.
>
> background { color rgb <0,0,0> }
>
> plane{ z, 5000
> texture { pigment { color rgbft <0,0,0,1,0.8> } }
> }
>
> plane{ z, 5050
> texture { pigment { color rgbft <0,0,0,1,0.7> } }
> }
>
> plane{ z, 5100
> texture { pigment { color rgbft <0,0,0,1,0.6> } }
> }
>
> Though this fails for a white background...
>
> I have the feeling I am missing something.
>
> Best
> Alex
>
> On Tue, Nov 15, 2011 at 10:29 AM, Alexander Rose <
> [email protected]> wrote:
>
>> Hi Bob,
>>
>> I agree to what you said regarding fog_type=1, but why do you think the
>> ground fog (fog_type=2) is not a solution? It's not just ground fog but fog
>> along the up vector.
>>
>> So my idea was that with an up vector that points in the same direction
>> as the vector from the camera location to the 'look_at' point you would get
>> is very, very weak up to some point where it has a high constant value. My
>> understanding is, that you could achive this when you set distance so that
>> the fog is generally very weak; set fog_offset so that the fog hides the
>> protein at the desired location; set fog_alt to adjust how fast the fog
>> hides the protein. But then again, I was not able to get the desired
>> results...
>>
>> Alexander
>>
>> fog {
>> distance 1
>> color rgbft <0,0,0,0.0,0.0>
>> fog_type 2
>> up <0,0,1>
>> fog_offset ZCoordinateOfProteinCenter /* Constant below this */
>> fog_alt 0.5 /* Decay rate */
>> }
>>
>>
>> ----- Ursprüngliche Mail -----
>> > Von: "Robert Hanson" <[email protected]>
>> > An: [email protected]
>> > Gesendet: Dienstag, 15. November 2011 16:02:57
>> > Betreff: Re: [Jmol-users] fog/zShade in POV-Ray
>> > Well, after a bit of experimentation, I'd say this is probably not
>> > going to work. POV-Ray assumes that you are IN the fog yourself,
>> > looking around. So everything in a scene is foggy. There is no way
>> > around that. Certainly fog_type=2 (ground fog) is not a solution.
>> >
>> > Jmol uses a very different idea -- you are looking at the model, and
>> > it is partially obscurred by fog. This is much more dramatic, and much
>> > more useful. The key setting is zSlab, which is assumed to be about
>> > 300 in POV-Ray but is critically important to be around 50 for Jmol.
>> > (I just checked in a bug fix that was setting zSlab to 0 by default in
>> > Jmol.)
>> >
>> > If you want something that is about the same in both, try this:
>> >
>> > in Jmol:
>> >
>> > background white
>> > set zSlab 300
>> > set zDepth -1000
>> > set zShadePower 3
>> > set zShade
>> >
>> > Then in POV-Ray use:
>> >
>> > fog {
>> > distance 1500
>> > color rgb <1,1,1>
>> > fog_type 1
>> > }
>> >
>> >
>> >
>> > Bob
>> >
>> >
>> > ps. For the record....
>> >
>> > The algorithm for fog in Jmol is this, applied to each pixel:
>> >
>> > f = (zDepth - z) / (zDepth - zSlab) // fraction of depth, from zDepth
>> > (0) to zSlab(1)
>> >
>> > p = f^zShadePower // default: f^3
>> >
>> > pixel_color = background_color + p * (object_color - background_color)
>> >
>> > = p * object_color + (1 - p) * background_color
>> >
>> > Comparing that to POV-Ray:
>> >
>> > PIXEL_COLOR = exp(-d/D) * OBJECT_COLOR + (1-exp(-d/D)) * FOG_COLOR
>> >
>> > where d is the pixel depth from the camera and D is the "fog distance
>> > parameter"
>> >
>> > Note that these would be identical if
>> >
>> > FOG_COLOR = background_color
>> > p = exp(-d/D)
>> >
>> > Of course, that's not what p is. The main difference here is that it
>> > is quite possible in Jmol to have an object disappear. That is
>> > intentional. In Jmol, we absolutely allow that, for good reason -- for
>> > good effect. zShadePower was developed for the infinite crystal view
>> > in the Epcot Touch-A-Molecule display. We need that, because we only
>> > have a certain number of unit cells in actuality, and it is very
>> > effective. In contrast, it's not possible in POV-Ray to get full
>> > merging with background color, probably because that is more
>> > realistic, and the POV-Ray formula results in the color being 1/e of
>> > pixel_color "at depth" (0.368) instead of 0 * pixel_color, as in Jmol.
>> >
>> > Both of these algorithms result in a fog that gets stronger further
>> > from you, allowing objects closer to the viewer to be less affected
>> > than distant objects. The power of that effect is more adjustable in
>> > Jmol than in POV-Ray, and the formula is different, because I needed
>> > full disappearance within a finite distance, which I suppose is not
>> > realistic so is not modeled by POV-Ray, and I needed to have the
>> > observer and possibly part of the model outside of the fog.
>> >
>> >
>> >
>> >
>> > --
>> > Robert M. Hanson
>> > Professor of Chemistry
>> > St. Olaf College
>> > 1520 St. Olaf Ave.
>> > Northfield, MN 55057
>> > http://www.stolaf.edu/people/hansonr
>> > phone: 507-786-3107
>> >
>> >
>> > If nature does not answer first what we want,
>> > it is better to take what answer we get.
>> >
>> > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>> >
>> >
>> ------------------------------------------------------------------------------
>> > RSA(R) Conference 2012
>> > Save $700 by Nov 18
>> > Register now
>> > http://p.sf.net/sfu/rsa-sfdev2dev1
>> > _______________________________________________
>> > Jmol-users mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
>
> http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users