POV-Ray : Newsgroups : povray.advanced-users : Fitting a texture to an object.. : Fitting a texture to an object.. Server Time
3 Jul 2024 04:30:54 EDT (-0400)
  Fitting a texture to an object..  
From: Patrick Elliott
Date: 9 Aug 2008 22:58:58
Message: <MPG.230807db1a9dce6498a18b@news.povray.org>
Didn't have much luck with a trick where one can use POVRay to create a 
sculpty, but then it occurred to me that the trick "may" be useful for 
something else...

include "colors.inc"                  
include "stones.inc"

sphere { 0, 1.0
 hollow
 interior_texture {T_Stone18}
 finish { ambient 0 diffuse 0.2 reflection 0.0 }
}

light_source {<0,0,0>,0.5}

camera { spherical location 0 look_at z*-1 }

What do yah know, I can get a spherical map that "should" fit an object 
of that shape in SL...

Now, I am wondering two things:

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?

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. 
Obviously, a reflected image won't work, since its going to also reflect 
parts of the reflection. (Hmm. Wonder though, could one do something 
like: sculpt_obj{... no_image} reflect_sphere{no_reflection}, and thus 
"only" see the reflected version of the object in the center? Going to 
have experiment a bit and see...)

Basically, I need something with the apparent "depth" of media, but 
which the camera maps to the shape of the object it needs to fit, not 
just a 2D plane, like I had before. It worked, but only but layering 
several spheres, with the map, so that the result looked solid. 
Otherwise, flames and other effects all tend to produce flat, 2D planes, 
which have to be placed on more than one prim, to get the intended 
effect, and then, it often looks ugly. If there was some way to map it 
so that you only got the shape you wanted... For example, a camp fire 
might be an open ended cylinder (we don't want the "top" reflecting the 
flames, and maybe not the bottom either), with a camera that "captures" 
the result as a cylindrical pattern. Map that to the shape in SL, 
complete with transparency, and you get a fire with one prim, instead of 
2-3.

Though, that might not work... Still, something that is "supposed to" 
cover the entire prim, like a ball of plasma, or a normal texture, 
should. Right? Am I on the right track here with using no image on the 
thing "producing" the result, like a particle system, and no reflection 
on what it needs to "project" onto? Obviously, solid textures, which are 
not a result of object shape, or of particles, etc., as a lot easier. :p 
lol

-- 
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

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