|
![](/i/fill.gif) |
In article <489ee7de$1@news.povray.org>, chr### [at] chrfr de says...
> Patrick Elliott wrote:
>
> > 1. Will this work with other shapes, like cylinders, boxes, etc. I mean
,
> > and look right, since this is a projection of the "inside" of an object
,
> > not the outside?
>
> I think you should be ok with all star-shaped objects (i.e. those
> which have a direct line of sight from any surface point to the
> origin). Of course, you can only apply the texture to the same
> object type (with identical proportions and centering).
>
> > 2. How would I use this to do something like like a plasma ball. The
> > prior attempt at that borrowed code from someone else, using media.
>
> That would probably require to implement a new camera type in
> POV-Ray such as "spherical_inverted". It may not be so useful to
> "sculpt" objects containing internal 3D structure, though, as all
> the environment and light interactions such as reflections and
> shadows would be frozen in place.
>
Well, strictly speaking can you make media "no image", and maybe "no
shadow"? Basically, the original concept, which was imho seriously
flawed, used an inverted sphere, which had only 'reflection 1' and no
other attributes, to make sculpties, not texture maps. Now, my thinking
is that, for doing a sculpty the "right" way, you need the object to not
cast shadows on itself at all, it to give off all the light (ambient 1),
and project not image that the camera might "accidentally" see. You then
place the camera at the center of the object itself, make its interior
texture 100% transparent, so you can see through it, then, you get the
"result" reflected into the sphere. Now, the problem the original
concept had was that it only worked right with certain parameters. One
reason was that the sphere itself could "reflect" images of its own
surface. This meant that, instead of a single projection, you got echos.
So.. I assume that "no reflection" only effects cases of "its" image
bouncing off something, else, not if some other object is reflected. In
other words, I want to "see" the center object in the sphere is going to
map onto, but I don't want that to echo to the other surfaces.
In theory, if it works how I think it would, the result will be a
perfect map, no matter what the shape is, so long at there are no
"overlaps" where some part of the shape gets occluded by its own
surface. Now, presumably, one could tell the media the same thing, "Do
not produce a direct image, so only your reflection is seen." A camera
at the center, I would hope, would see through the now invisible cloud,
pick up the reflection, and map "that" to the resulting image.
Mind you, that only solves part of the problem. I have no fracking clue
how to make something like:
density{
spherical
turbulence .3 lambda 3
density_map {
[.01 rgbt <0,0,0,0.5>]
[.01 rgbt <0,0.3,1,0.5>]
[1/4 rgbt <0,.5,.1,0.5>]
[2/4 rgbt <0,1,1,0.5>]
[3/4 rgbt <1,1,1,0.5>]
}
}
animate, so that I can get 16 different frames, never mind if its even
possible to make it cyclic... :p
In any case, if adding no shadow and no image to the object I am trying
to "map", then no reflection to the sphere, works like I think...
Well, this was the original example given for how to do this:
#declare t_sculpty = texture {
pigment {
average
pigment_map {
[1 gradient x color_map {[0 rgb 0][1 rgb <1,0,0>]}]
[1 gradient y color_map {[0 rgb 0][1 rgb <0,0,1>]}]
[1 gradient z color_map {[0 rgb 0][1 rgb <0,1,0>]}]
}
translate -0.5
}
finish { ambient 3 diffuse 0 }
}
lathe { bezier_spline 24,
<0.000,0.005>, <0.000,0.005>, <0.102,0.005>, <0.102,0.005>,
<0.102,0.005>, <0.102,0.102>, <0.060,0.154>, <0.214,0.212>,
<0.214,0.212>, <0.370,0.270>, <0.450,0.307>, <0.450,0.410>,
<0.450,0.410>, <0.450,0.511>, <0.450,0.957>, <0.450,0.974>,
<0.450,0.974>, <0.450,0.990>, <0.371,0.997>, <0.352,0.990>,
<0.352,0.990>, <0.332,0.985>, <0.175,0.975>, <0.000,0.975>
sturm
translate y*-0.5
scale <1,-1,1>
texture { t_sculpty }
}
sphere { 0, 1.001 inverse
finish { ambient 0 diffuse 0 reflection 1 }
}
camera { spherical location 0 look_at z*-1 }
So, I am thinking of changing it to something more like, the following,
which "should" fix the existing problems with the trick, which currently
doesn't always work. Now, can "media" be told to "no_shadow" and/or
"no_image" too, or would I have to use a texture to do it? This is kind
of important, since I think the particle systems from Rune employ media,
and if you can't make it no_image, you can't use this trick on it.
#declare t_sculpty = texture {
pigment {
average
pigment_map {
[1 gradient x color_map {[0 rgb 0][1 rgb <1,0,0>]}]
[1 gradient y color_map {[0 rgb 0][1 rgb <0,0,1>]}]
[1 gradient z color_map {[0 rgb 0][1 rgb <0,1,0>]}]
}
translate -0.5
}
finish { ambient 3 diffuse 0 }
}
object {My_Tingy //Some CSG or mesh object, or media container.
no_image
no_shadow
texture { t_sculpty }
hollow
}
sphere { 0, 1.001 inverse
finish { ambient 0 diffuse 0 reflection 1 }
no_reflection
}
camera { spherical location 0 look_at z*-1 }
--
void main () {
if version = "Vista" {
call slow_by_half();
call DRM_everything();
}
call functional_code();
}
else
call crash_windows();
}
<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models,
3D Content, and 3D Software at DAZ3D!</A>
Post a reply to this message
|
![](/i/fill.gif) |