Menu

How to export texture

consultit
2017-02-07
2017-02-07
  • consultit

    consultit - 2017-02-07

    Hello, I'm trying to use Geomorph to create heightfields to be used in games; because I know very little of povray, I wonder if there is a simple procedure to export texture (with the same dimensions of the field) once applied to the heightfield as explained in the documentation.
    Thanks

     
  • Patrice St-Gelais

    Hello,

    The textures I speak about in the documentation are generated by Povray. Geomorph launches independent Povray scripts with parameters exported in variables, there is no texture generation inside Geomorph.

    So if I understand what you want, the most obvious way to do it would be to use Povray to output a square rendered image, with the camera at noon and looking down, on a flat terrain with the texture you want. If the texture is slope-dependent, you'll have to use your terrain to generate it. Maybe you can get a square rendered image of this texture without shadows by using only ambient light. In any way you may have to modify some Povray scripts, but you can probably get your results without writing them from scratch. But for a quick proof of concept, you can place the camera and adjust the output image ratio inside Geomorph, without editing a Povray script.

    I hope this will help.

    Thanks for your interest in Geomorph,

    Patrice

     
  • consultit

    consultit - 2017-02-08

    Thanks to these indications and by following the Povray documentation, I was able to export the texture.
    Using canyon.pov file for tests, I have overriden the following definitions for camera, light_source and hf object:

    object {hf translate y0 texture {slope_rock_bushes translate y-0.05 scale 0.7} no_shadow }
    light_source
    {
    <0,2.6,0>,<1,1,1>
    shadowless
    }
    camera
    {
    orthographic
    location <0,1,0>
    look_at <0,0,0>
    up <0,1,0>
    right <1,0,0>
    }

    Afterwards I created the texture with the following command:

    povray +W512 +H512 canyon-ortho.pov

    Thanks

     
  • Patrice St-Gelais

    Hi!
    I haven't noticed the shadowless option before :-)
    I am glad that you were able to work out a solution.
    Have a good day
    Patrice

     

Log in to post a comment.