Subject:
|
Re: Adding an image_map
|
Newsgroups:
|
lugnet.cad.ray
|
Date:
|
Thu, 15 Mar 2001 18:14:27 GMT
|
Viewed:
|
1056 times
|
| |
| |
Hmmm, a mess of grey pixels isn't good, but at least something appeared
on the object so that's a start. I think the next step would be to check the
scaling and translation of the map. Here's a pertinent paragraph from the docs:
//
By default, the image is mapped onto the x-y-plane. The image is projected
onto the object as though there were a slide projector somewhere in the
-z-direction. The image exactly fills the square area from (x,y) coordinates
(0,0) to (1,1) regardless of the image's original size in pixels. If you
would like to change this default you may translate, rotate or scale the
pigment or texture to map it onto the object's surface as desired.
//
So what you have to do is scale the image to match the size of your
object (_screen_). Then rotate it so it's on the x/z plane instead of x/y.
Then translate it to its proper place on the screen object.
The final object might look something like this:
object { _screen_
pigment
{
image_map
{
gif "classicspacelogo.gif"
}
scale <3, 2, 1>
rotate x*90
translate <0, 0, 2>
}
}
Note that you might have to rotate by x*-90 instead since I think LDraw
uses positive y values to point down. Wacky!
Or maybe you'll have to rotate some other way or not at all, and of
course all the coordinates will be different -- It all depends on your
object. If you can't get it to work send me the screen object (POV code) and
the image and I'll try to figure it out.
In lugnet.cad.ray, Ryan Farrington writes:
> Thanks for the help, Coby!
>
> > object { _screen_
> > pigment
> > {
> > image_map
> > {
> > gif "classicspacelogo.gif"
> > }
> > }
> > }
>
> I put this into the pov file and got something to appear on the object.
> But when I render it, all that you can see of the bitmap is a mess of gray
> pixels.
>
> Cheers,
> --Ryan
|
|
Message has 1 Reply: | | Re: Adding an image_map
|
| Okay, I got it to work! I hadn't known that the picture was crammed into the 0,0/1,1 square. So the mass of gray pixels was in fact the picture, tiled beyond recognition. :) Thanks again, Coby! --Ryan (24 years ago, 16-Mar-01, to lugnet.cad.ray)
|
Message is in Reply To:
| | Re: Adding an image_map
|
| Thanks for the help, Coby! (...) I put this into the pov file and got something to appear on the object. But when I render it, all that you can see of the bitmap is a mess of gray pixels. Cheers, --Ryan (24 years ago, 15-Mar-01, to lugnet.cad.ray)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|