POV-Ray : Newsgroups : povray.general : image_map stretched on objects : Re: image_map stretched on objects Server Time
3 Aug 2024 00:23:31 EDT (-0400)
  Re: image_map stretched on objects  
From: "Jérôme M. Berger"
Date: 15 Jun 2004 16:11:23
Message: <40cf57eb@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Summit Group wrote:
| I've been trying to apply a fabric image map to a couch that I've been
| working on. I created the model in 3D Studio, and I used accutrans3d to
| convert it to POV-Ray. From there I added the image map like this:
|
|   texture {
|     pigment {
|       image_map {jpeg "07-2312-482.jpg" map_type 0}
|     }
|     finish { ambient rgb<0.466667, 0.541176, 0.678431> diffuse 0.5 }
|   }
|
| and this is the result:
|
| http://avis.summit-tech.ca/render/povforum.png
|
| Notice how the image map gets streched as though it was applied
head on.
	That's because it was "applied head on". That's what "map_type 0"
means. What you need to do is use UV mapping (provided your model has
UV coordinates of course).

| The
| other problem was finding a way (from povray) to set the sizing of
the tile
| when it gets applied. Right now I'm forced to resize the object (at the
| time of export) in order to obtain the image tile size that I want.
|
	By default, POV puts the image in a 1 by 1 square from 0 to 1 on the
x and y axis (I think, not sure about the axis). You can scale,
translate and rotate the texture to position it as you want
independently of the object you apply it to (just use the
corresponding transform in the texture block). Note that if you use
UV mapping, the texture is naturally at the right position and size
(unless you want the pattern to repeat itself, in which case you will
need to scale it down).

		Jerome

- --
******************************
*      Jerome M. Berger      *
* mailto:jbe### [at] ifrancecom *
*  http://jeberger.free.fr/  *
******************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAz1fmqIYJdJhyixIRAifXAKCUNuwButaDXZBxbUt9pWdAwRTP1wCdEYwW
fQ4KdwXk8eXec8dS/xa6Y/o=
=61lQ
-----END PGP SIGNATURE-----


Post a reply to this message

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