POV-Ray : Newsgroups : povray.general : image_map with map_type CUBE ? Server Time
25 Dec 2024 14:34:01 EST (-0500)
  image_map with map_type CUBE ? (Message 1 to 3 of 3)  
From: mil01
Subject: image_map with map_type CUBE ?
Date: 27 May 2006 09:20:01
Message: <web.4478511baaed6a2be31c21340@news.povray.org>
Is there a way to have default mapping of image_maps into "cube" -mapping on
 normals of objects - like in " Flat/Cube/Tube/Sphere " in Blender ?

only planar....?

thank-you :-)





Milovann


Post a reply to this message

From: Ben Chambers
Subject: Re: image_map with map_type CUBE ?
Date: 27 May 2006 22:54:03
Message: <447910cb@news.povray.org>
mil01 wrote:
> Is there a way to have default mapping of image_maps into "cube" -mapping on
>  normals of objects - like in " Flat/Cube/Tube/Sphere " in Blender ?
> 
> only planar....?
> 
> thank-you :-)

You can change the map type.  From the docs, section "3.5.12.7.2  The 
map_type Option", you can read:

"A map_type 0 gives the default planar mapping [...]
A map_type 1 gives a spherical mapping [...]
With map_type 2 you get a cylindrical mapping [...]
Finally map_type 5 is a torus [...]
Types 3 and 4 are still under development"

I'm not sure if it's possible to use normals as references in to 
pigments, which is basically what you're asking.  However, the following 
might be possible:

1. Compute a function for your normals, based on the location of a point 
on the surface.  This is easy for some shapes (ie a sphere, where the 
normal of a given point is the location of that point scaled to be a 
unit vector), impossible for others (meshes), and somewhere inbetween 
for others.  If you know the exact shape you would like to use, you can 
post here and we will try to help you out.

2. Use this function as your pigment.

3.  Use a spherical image_map.

...Chambers

PS This might be one of those times I'm full of it, so take this 
suggestion with a grain of salt.


Post a reply to this message

From: bob
Subject: Re: image_map with map_type CUBE ?
Date: 28 May 2006 12:02:04
Message: <pan.2006.05.28.16.02.00.400183@almost.bestweb.net>
On Sat, 27 May 2006 19:53:58 -0700, Ben Chambers wrote:

> mil01 wrote:
>> Is there a way to have default mapping of image_maps into "cube"
>> -mapping on
>>  normals of objects - like in " Flat/Cube/Tube/Sphere " in Blender ?
>> 
>> only planar....?
>> 
>> thank-you :-)
> 
> You can change the map type.  From the docs, section "3.5.12.7.2  The
> map_type Option", you can read:
> 
> "A map_type 0 gives the default planar mapping [...] A map_type 1 gives a
> spherical mapping [...] With map_type 2 you get a cylindrical mapping
> [...] Finally map_type 5 is a torus [...]
> Types 3 and 4 are still under development"
> 
> I'm not sure if it's possible to use normals as references in to pigments,
> which is basically what you're asking.  However, the following might be
> possible:
> 
> 1. Compute a function for your normals, based on the location of a point
> on the surface.  This is easy for some shapes (ie a sphere, where the
> normal of a given point is the location of that point scaled to be a unit
> vector), impossible for others (meshes), and somewhere inbetween for
> others.  If you know the exact shape you would like to use, you can post
> here and we will try to help you out.
> 
> 2. Use this function as your pigment.
> 
> 3.  Use a spherical image_map.
> 
> ...Chambers
> 
> PS This might be one of those times I'm full of it, so take this
> suggestion with a grain of salt.

map image onto a cube:

box {
  -0.5, 0.5
  uv_mapping
  pigment {
    image_map {
      tga "some_pic.tga"
    }
  }
  finish { ambient 0.5 diffuse 0.5 }
  rotate y*20
  rotate x*-20
}

You might want to peruse the docs for better & more detailed
information on this matter.

It could be that I have misunderstood the question, in which
case I am sorry and please ignore this message.


-- 
to all the companies who wait until a large user base becomes
dependent on their freeware, then shafting said happy campers with
mandatory payment for continued usage. I spit on your grave.


Post a reply to this message

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