|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I have a cylinder (open, hollow) that has a PNG graphic file as texture. That
image consist only of white dots (blurred edges) and the rest is transparent,
and I want to simulate light speed (or a wormhole travel, whatever).
The texture moves along that cylinder.
Outside of that cylinder is another one with a color_map (red to white to blue).
QUESTION
How can I achieve that of that PNG texture only the white color allows a part of
the outside color_map can shine through? "Filter" and "transmit" seem to be
rejected when using an image. Any idea?
SCENE SOURCE CODE
#declare Warp = texture
{
pigment
{
image_map
{
png "Warp - 001.png"
map_type 1
interpolate 2
}
rotate < 0.0, 0.0, 90.0 > //
rotate < 0.0, 90.0, 0.0 > //
scale < 10000.0, 10000.0, 10000000.0 >
translate < 0.0, 0.0, (50000.0*clock) >
}
finish { ambient 1.0 }
}
#declare LightShift = texture
{
pigment
{
gradient z
color_map
{
[ 0.0 pigment Blue ]
[ 0.5 pigment White ]
[ 1.0 pigment Red ]
}
scale < 1.0, 1.0, 1000000.0 >
}
finish { ambient 1.0 }
}
background { Black }
cylinder // Warp
{
< 0.0, 0.0, -1000000.0 > < 0.0, 0.0, 1000000.0 > 10000.0
hollow
open
texture { Warp }
}
cylinder // Warp Light Shift
{
< 0.0, 0.0, -1000000.0 > < 0.0, 0.0, 1000000.0 > 10000.01
hollow
open
texture { LightShift }
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 31-3-2015 14:08, Sven Littkowski wrote:
> How can I achieve that of that PNG texture only the white color allows a part of
> the outside color_map can shine through? "Filter" and "transmit" seem to be
> rejected when using an image. Any idea?
I don't know if this can help you, but when using images you can use the
following terms:
transmit all or filter all
followed by a value, for instance 0.5, inside the pigment block
containing the image.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Or is there any other way to change just the whites in a distance from white to
blue (-z) and to red (+z)?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 31.03.2015 14:08, Sven Littkowski wrote:
> That image consist only of white dots (blurred edges) and the rest is transparent
It sounds like you might be better of changing the image so that
the background is opaque and the dots are transparent? Then the star
color would be determined by the cylinder texture.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 31-3-2015 14:08, Sven Littkowski wrote:
> Hi,
>
> I have a cylinder (open, hollow) that has a PNG graphic file as texture. That
> image consist only of white dots (blurred edges) and the rest is transparent,
> and I want to simulate light speed (or a wormhole travel, whatever).
Another idea: Have you thought about using an absorption media inside
the cylinder? you might be able to simulate the light shift that way.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I like both ideas:
- transparent stars inside black image
- medium inside cylinder
But would a media not slow down the rendering? And it is only the stars that I
want to change the colors from white to red and blue, not the black. But how
would such a media be made? Can you give a sample code?
For working on the suggestion with transparent stars, I will change now the
graphic. Should easily be possible.
Steven
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 31-3-2015 14:08, Sven Littkowski wrote:
> > Hi,
> >
> > I have a cylinder (open, hollow) that has a PNG graphic file as texture. That
> > image consist only of white dots (blurred edges) and the rest is transparent,
> > and I want to simulate light speed (or a wormhole travel, whatever).
>
> Another idea: Have you thought about using an absorption media inside
> the cylinder? you might be able to simulate the light shift that way.
> --
> Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Heck, this idea is so simple, I wonder why I didn't get it... :-D
Christian Froeschlin <chr### [at] chrfrde> wrote:
> On 31.03.2015 14:08, Sven Littkowski wrote:
>
> > That image consist only of white dots (blurred edges) and the rest is transparent
>
> It sounds like you might be better of changing the image so that
> the background is opaque and the dots are transparent? Then the star
> color would be determined by the cylinder texture.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 31-3-2015 22:31, Sven Littkowski wrote:
> I like both ideas:
> - transparent stars inside black image
> - medium inside cylinder
>
> But would a media not slow down the rendering? And it is only the stars that I
> want to change the colors from white to red and blue, not the black. But how
> would such a media be made? Can you give a sample code?
I was thinking about something like this (not tested) for a cylinder
oriented along the z-axis:
cylinder {
<0, -0.5, 0>,<0, 0.5, 0>, 1
pigment {rgbt <0,0,0,1>}
hollow
interior {
//redshift
media {
absorption <0,0,1>
density {
cylindrical
density_map {
[0 rgb 0]
[1 rgb 1]
}
}
}
//blueshift
media {
absorption <1,0,0>
density {
cylindrical
density_map {
[0 rgb 0]
[1 rgb 1]
}
}
}
}
scale MyScale
}
it is possible to vary the absorption value of course as needed and/or
use a density block inside the media
Drawback might be that you may not be able to use the two media at the
same time as they coincide. You will have to build in a switch for when
to use redshift or blueshift.
In terms of dropping render speed, that would be minimal. Scattering
media is what influences speed most.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|