POV-Ray : Newsgroups : povray.general : "best" way to create an shape covered with a picture? Server Time
5 Aug 2024 10:22:38 EDT (-0400)
  "best" way to create an shape covered with a picture? (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
From: Jeff Kish
Subject: Re: "best" way to create an shape covered with a picture?
Date: 19 Nov 2002 22:23:56
Message: <Bf3aPR=kEAXyhlkPJEGCFN5MWNSq@4ax.com>
On Tue, 19 Nov 2002 10:36:52 -0000, "Tom Melly" <tom### [at] tomandlucouk>
wrote:

>"Jeff Kish" <ELN/kishj@earthlink.net> wrote in message
>news:EJnZPbtpCghb5wuNusBXFxgV+kHg@4ax.com...
>>
>> Answers are good.. pointers to answers are appreciated. Heck, I'll
>> even take a flame if it answers my question!
>
>Hi Jeff, is the head a mesh or a blob/other?
>
>Anyway, I would suggest you check the docs on spherical mapping - something
>like:
>
>#declare MyHead = sphere {0, 1}
>
>object{
>  MyHead
>  pigment{
>    image_map{ // see section 6.7.1.5.1
>      sys
>      "testsor.bmp"
>      once // see section 6.7.12.7.1
>      map_type 1
>    }
>  }
>}
>
>The main point/drawback is that map_type 1 maps the image using spherical
>mapping - i.e. the above is ideal, mapping the image to a sphere. Because a head
>isn't exactly spherical, you will get some distortion. If your head uses a mesh,
>you would have the option of using UV mapping, but to be honest I've no idea how
>you would go about this without deforming the image too much.
>
Thanks, I'll check the docs on this.
I was trying a sphere. I tried this, but it came out pretty dark...how
do you get it lighter? I tried adding light.
 let me play with it some.


Post a reply to this message

From: Jeff Kish
Subject: Re: "best" way to create an shape covered with a picture?
Date: 19 Nov 2002 22:24:53
Message: <+f=aPWpVSGdEQcvCLyA8Dg7zpiDP@4ax.com>
On 19 Nov 2002 05:26:23 -0500, Warp <war### [at] tagpovrayorg> wrote:

>Jeff Kish <ELN/kishj@earthlink.net> wrote:
>> I am a beginner. I have gone through some tutorials for moray and
>> pov-ray. I have some pictures of my son I would like to map to a 3d
>> shape (shaped like his head of course).. what is the best way to do
>> this? I tried messing around with the pigment/image_map stuff, but
>> that looks like I am going the wrong way there.
>
>  If you are using a mesh to model your object, then uv-mapping gives you
>the best freedom for assigning a pigment to it (you can tell for each vertex
>point which point of the pigment is assigned to it).
>  The problem with this is that it's next to impossible to write it by hand.
>You'll need a modeller which supports uv-mapping in order to do this.
>(I think there's a program called "uv-mapper" which has been praised).
>
>  If your object consists of other primitives, then the issue is a lot
>more complicated. If you want to apply an image map to this object, there's
>basically no other way than using the few default mapping types (eg.
>spherical).
Thanks for your reply.
By mesh, you mean a mesh object where you define all of the points it
consists of? is this a standard way to model organics like heads,
torsos, etc?

I just want to make sure I got in the right direction.

Thanks
Jeff


Post a reply to this message

From: Tom Melly
Subject: Re: "best" way to create an shape covered with a picture?
Date: 20 Nov 2002 04:47:59
Message: <3ddb5a4f$1@news.povray.org>
"Jeff Kish" <ELN/kishj@earthlink.net> wrote in message
news:Bf3aPR=kEAXyhlkPJEGCFN5MWNSq@4ax.com...
> >
> Thanks, I'll check the docs on this.
> I was trying a sphere. I tried this, but it came out pretty dark...how
> do you get it lighter? I tried adding light.
>  let me play with it some.
>

Heh - well make sure you add a camera, a light and of course that you have a bmp
file available.

Here's the full scene I checked my syntax with:

#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

plane {
  y, -1
  pigment { color rgb <0.7,0.5,0.3> }
}


#declare MyHead = sphere {0, 1}

object{
  MyHead
  pigment{
    image_map{
      sys
      "testsor.bmp"
      once
      map_type 1
    }
  }
}


Post a reply to this message

From: Tom Melly
Subject: Re: "best" way to create an shape covered with a picture?
Date: 20 Nov 2002 04:52:56
Message: <3ddb5b78$1@news.povray.org>
"Jeff Kish" <ELN/kishj@earthlink.net> wrote in message
news:+f=aPWpVSGdEQcvCLyA8Dg7zpiDP@4ax.com...

> Thanks for your reply.
> By mesh, you mean a mesh object where you define all of the points it
> consists of? is this a standard way to model organics like heads,
> torsos, etc?
>
> I just want to make sure I got in the right direction.
>

A mesh is basically a whole bunch of triangles (known as "facets" iirc). Each
edge of each triangle is shared by another triangle. When you see a figure in a
pov image, you can pretty much bet that it's a mesh, probably consisting of
several thousand triangles.

It's rare to use them for inorganic shapes, since, by and large, such shapes can
be modelled more effectively using primitives and CSG, but trying to model
something like a horse or human using standard pov primitives would be a
nightmare.

Generally, users don't write their own meshes, but will convert them from, for
example, exported poser figures. (poser can't export a mesh directly, but it can
export intermediary formats for which converters exist - iirc there is now a
converter that can handle poser format files directly).


Post a reply to this message

From: Warp
Subject: Re: "best" way to create an shape covered with a picture?
Date: 20 Nov 2002 05:46:39
Message: <3ddb680f@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> Each edge of each triangle is shared by another triangle.

  Not necessarily. (This is only true for closed meshes.)

-- 
#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: ABX
Subject: Re: "best" way to create an shape covered with a picture?
Date: 20 Nov 2002 05:49:35
Message: <nupmtucqbjoj7affojseru40aigt7ddh3b@4ax.com>
On 20 Nov 2002 05:46:39 -0500, Warp <war### [at] tagpovrayorg> wrote:
>  Not necessarily. (This is only true for closed meshes.)

Is the mobious tape treated as closed mesh ? ;-)

ABX


Post a reply to this message

From: Warp
Subject: Re: "best" way to create an shape covered with a picture?
Date: 20 Nov 2002 06:15:22
Message: <3ddb6eca@news.povray.org>
ABX <abx### [at] abxartpl> wrote:
> Is the mobious tape treated as closed mesh ? ;-)

  If it's a sheet of triangles, then it has borders. At these borders triangles
don't share one of their edges with any other triangle.

-- 
#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: Tom Melly
Subject: Re: "best" way to create an shape covered with a picture?
Date: 20 Nov 2002 06:58:38
Message: <3ddb78ee$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3ddb680f@news.povray.org...
> Tom Melly <tom### [at] tomandlucouk> wrote:
> > Each edge of each triangle is shared by another triangle.
>
>   Not necessarily. (This is only true for closed meshes.)

Heh - KISS.

I'm also slightly assuming that meshes created from exported models will tend to
be closed (since they rarely have infinitely thin elements).


Post a reply to this message

From: benp
Subject: Re: "best" way to create an shape covered with a picture?
Date: 20 Nov 2002 19:50:36
Message: <3DDC261A.7080703@rsp.com.au>
if it's a triangle sheet, wouldn't it only have one border?

Warp wrote:

> ABX <abx### [at] abxartpl> wrote:
> 
>>Is the mobious tape treated as closed mesh ? ;-)
>>
> 
>   If it's a sheet of triangles, then it has borders. At these borders triangles
> don't share one of their edges with any other triangle.
> 
>


Post a reply to this message

From: Warp
Subject: Re: "best" way to create an shape covered with a picture?
Date: 21 Nov 2002 03:54:47
Message: <3ddc9f57@news.povray.org>
benp <ben### [at] rspcomau> wrote:
> if it's a triangle sheet, wouldn't it only have one border?

  It depends. If you join two opposite edges of a sheet, you get then two
borders.
  In the case of a moebius strip there's only one contiguous border because
the sheet makes a 180 degrees turn before joining the two opposite edges.

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

<<< Previous 4 Messages Goto Initial 10 Messages

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