POV-Ray : Newsgroups : povray.advanced-users : Using images in density-medias? Server Time
29 Jul 2024 18:26:52 EDT (-0400)
  Using images in density-medias? (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
From: Tim Nikias
Subject: Re: Using images in density-medias?
Date: 5 Feb 2002 14:18:00
Message: <3C602FD7.A4A4928@gmx.de>
>
> What exactly was the problem? When I tried this some time ago it worked
> without probs.

It returns error message and points at the image_map statement inside
the density.

Some time ago, this way worked for me as well...

I'm stuck!
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: Using images in density-medias?
Date: 5 Feb 2002 14:28:41
Message: <MPG.16ca50b3e22f3aa69896db@news.povray.org>
In article <MPG.16ca4ce65d03bb809896da@news.povray.org>, lpv### [at] gmxde 
says...

> What exactly was the problem? When I tried this some time ago it worked 
> without probs.

Oh, I just tried re-render it, and it didn't work anymore.
So propably i created that one in MegaPov...

However, using image_pattern or a function makes it work but without 
color, so you will have to use 3 medias (one for each color component).

Is there a reason why Pov 3.5 doesn't accept an image_map inside a 
density?

Lutz-Peter


Post a reply to this message

From: Tim Nikias
Subject: Re: Using images in density-medias?
Date: 5 Feb 2002 14:33:19
Message: <3C60336F.830840EF@gmx.de>
Thanks for your testing, but I guess I'll have to stick to a "normal"
image (not glowing).

Also, while testing, I've found that using a contrast-adjusted and
shadow-midtone-highlight-adjusted image, I can achieve something
pretty realistic.

It was meant for a dark room, without much light, and the adjustments
to the image-map made if appear more like an in-scene radiosity-affected
image-map (though it isn't, of course).

I'll post a version of that on my homepage WIP sometime this night.

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html


Post a reply to this message

From: Warp
Subject: Re: Using images in density-medias?
Date: 5 Feb 2002 15:31:55
Message: <3c60413a@news.povray.org>
Tim Nikias <tim### [at] gmxde> wrote:
:>   Already tried image_pattern?

: I only get a gray-scale image then.

  It's difficult to tell what is wrong without seeing any code.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Using images in density-medias?
Date: 5 Feb 2002 16:33:04
Message: <3c604f8f@news.povray.org>
Lutz-Peter Hooge wrote:


> Oh, I just tried re-render it, and it didn't work anymore.
> So propably i created that one in MegaPov...

  Same case here... I used it on my IRTC entry for "LABORATORY", but that 
was MegaPOV. I don't know right now if it was posible with 3.1, but I 
doon't think so. Anyhow, I don't remember to have seen this specified as a 
MegaPOV feature.... hmmmm. 

  Indeed, this was very handy for "luminous" objetcs with global ambient 
set to 0.... I'm also curious about why this does not work on 3.5. Must 
investigate...

-- 
Jaime Vives Piqueres

La Persistencia de la Ignorancia
http://www.ignorancia.org


Post a reply to this message

From: Tim Nikias
Subject: Re: Using images in density-medias?
Date: 5 Feb 2002 16:40:24
Message: <3C605138.2B584D4C@gmx.de>
In basic, its like this:

object{ Area hollow pigment{rgbt <0,0,0,1>}
 interior{media{emission 1 intervals 1 method 3 samples 1,5
 density{image_map{tga "image.tga"} translate -.5 /*centers the image*/}
}}
}

It does create some sort of emission, based on the calculated grayness
of a colored pixel, but the colors get lost. That's not the behaviour of
POV-Ray 3.1g, and probably MegaPOV (I don't use MegaPOV).


--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html


Post a reply to this message

From: Warp
Subject: Re: Using images in density-medias?
Date: 5 Feb 2002 18:22:31
Message: <3c606937@news.povray.org>
Tim Nikias <tim### [at] gmxde> wrote:
: It does create some sort of emission, based on the calculated grayness
: of a colored pixel, but the colors get lost. That's not the behaviour of
: POV-Ray 3.1g, and probably MegaPOV (I don't use MegaPOV).

  When I try to render a scene like that in povray 3.1g, it says:

error: Keyword 'image_map' can only be used in a pigment statement.

  In MegaPov it works, though.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Tim Nikias
Subject: Re: Using images in density-medias?
Date: 6 Feb 2002 00:41:30
Message: <3C60C1F2.761C8F7D@gmx.de>
>
>   When I try to render a scene like that in povray 3.1g, it says:
>
> error: Keyword 'image_map' can only be used in a pigment statement.
>
>   In MegaPov it works, though.

Thats the error I meant. Someone suggested using image_pattern,
and that gives only gray-scale media from the image.

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html


Post a reply to this message

From: RAY
Subject: Re: Using images in density-medias?
Date: 6 Feb 2002 23:45:39
Message: <3c620673$1@news.povray.org>
> I wanted to create an emission-media which actually uses
> an image as base, simulating a glowing image.
color_map your emmision media!


Post a reply to this message

From: Christopher James Huff
Subject: Re: Using images in density-medias?
Date: 7 Feb 2002 08:56:39
Message: <chrishuff-10CAED.08583807022002@netplex.aussie.org>
In article <3C602B2E.39A4AA9F@gmx.de>, Tim Nikias <tim### [at] gmxde> 
wrote:

> Before, all I did, was use image-map right inside
> the density-statement, but I don't get it to work.

POV 3.5 doesn't support that feature (I wonder when it got added to 
MegaPOV?), but you should still be able do it this way...

#declare imgFn = function {pigment {image_map {...}}}

density {average
    density_map {
        [1 function {imgFn(x, y, z).red}
            color_map {[0 rgb 0] [1 red 3]}]
        [1 function {imgFn(x, y, z).green}
            color_map {[0 rgb 0] [1 green 3]}]
        [1 function {imgFn(x, y, z).blue}
            color_map {[0 rgb 0] [1 blue 3]}]
    }
}

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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