POV-Ray : Newsgroups : povray.binaries.images : Bronze Alien Fighter : Re: Bronze Alien Fighter Server Time
3 Oct 2024 17:17:10 EDT (-0400)
  Re: Bronze Alien Fighter  
From: John VanSickle
Date: 26 Jan 2000 10:33:47
Message: <388F15CD.7766652F@erols.com>
H.E. Day wrote:
> 
> Make a model, any model.  Say it's a spaceship and you want to texture
> it's top surface.  What you need to do is make a box that looks like
> this:
>
>   box {<-100,0,-100>,<100,0,100> pigment {rgb 10}}
>
> You'll need to adust this so the edges of the box line up with the
> edges of the model (or are close).  Now,  render a good quality image
> with the camera placed like this:
>
>   camera {
>     location <0,1000,0>
>     direction 10
>     look_at 0
>   }
>
> The idea is to get a nearly orthographic projection.
>
> Once this has rendered, open the file in Photoshop.  Select the edges
> of the white box and crop.  Draw your texture map!  It's just like
> painting on the hull!  Save the file when you are done, and load up
> povray.
>
> The texture statement  should look like this:
> 
>   texture {pigment {image_map {filetype "filename"}}
>     scale <200,200,1>
>     rotate 90*x
>     translate <-100,0,-100>
>   }
>
> This assumes that the image map was made looking down from the y
> direction.
>
> Hope this helps!

You could also set the background to white and forget the box.
You can use an orthographic camera, and scale the vectors so that the
entire object is pictured.

// sample code:

  camera { orthographic
    location ObjectCenter-z*1000
    right x*ObjectWidth
    up y*ObjectHeight
    direction z
  }

  background { rgb 1 } // full white background

  object { MyObject
    pigment { rgb .5 } // to provide good contrast
    finish { ambient 1 diffuse 0 } // gives good outline
  }

// end of sample code

Set the render size to the level of detail you want.  Make sure that
the height/width ratio of the image is the same as that of the camera
setting above.

Then proceed with the PhotoLab step above.  No need to crop.  Make
sure you paint beyond the edge between the grey and the white so that
you completely cover the object.

You can also make a bump_map while you're at it.

Then to texture the object,

// second sample code piece

object { MyObject
  texture {
    pigment { image_map { tga "myobjpig.tga" } }
    normal { bump_map { tga "myobjnor.tga" } }
    translate -.5
    scale <ObjectWidth,ObjectSizeY,1>
  }
}

// end of code sample two

You might want to supply values for ObjectWidth and ObjectHeight
that are slightly larger than the object, just to keep the drawing
away from the edges of the object.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

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