Results 1 to 10 of 10

Thread: POVRay and Height fields and resolution...

  1. #1

    Question POVRay and Height fields and resolution...

    Hiya
    Are there any other POVRay guys out there? Maybe the height field gurus can help?

    I've been trying to generate smooth rolling hills. None of your peaky mountains for me! However, despite all my efforts I still have vertical resolution issues. I'm using a self generated 4000x4000 pixel PNG file. I've resampled it through WIlbur, softened, blurred, Gaussian bludgeoned it to death and gamma stretched it's feet off. If there were a PNG Protection Agency, I'd be up on a charge.
    I still have rice paddy steps at the resolution I wanna use it at.

    On the POVRay front I've taken that PNG and scaled it x2000 horizontally, and x25 vertically. I want to be able to plot things on it in POVRay using 1 meter per POVRay unit. I also want to draw on it. Roads, mud, blended into one another.

    So, I have the 2 questions really.
    How do I get these slopes smoother? and
    How do I "paint" it - other than wacking another 4000x4000 image_map onto it? It'd be nice to be able to use map tiles (grass, dirt, and so forth) but so that they blend into each other rather than by using INTERSECTION{ } which gives me hard edges.

    Heres a bit of my last render

    Cheers!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	hills.jpg 
Views:	181 
Size:	315.1 KB 
ID:	26264  

  2. #2

    Default

    Are you only using 8 bit png files? If so, that is probably the best you will get...

    One way to minimize it is to dither the vales to make the edges less noticeable, but they will still be there.

    -Rob A>

  3. #3

    Default

    16 bit, I'm pretty sure. Also Wilbur confirms max value is "65535.0000" and lowest is "-0.0000".
    PSP likes the histogram - so do I. It just doesn't "look" like there are 65K steps in height over that small distance.
    It's one reason why I fancy using map tiles to "paint" the thing, the "grass" or "grit" or whatever masks the artefacts a bit too.

  4. #4
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,549

    Default

    That looks like a basic point-sampled height field. Smooth, rolling terrain from an image is very hard to get good ray-tracing results from because most of the area is flat shelf areas of constant values with a near-vertical step to the next value. The normal goes off an a very different direction at the step and that's what gives the dark area.

    Does the smooth heightfield modifier do any good?

  5. #5

    Default

    Ah, thanks both of you! (I think).
    The example render had the smooth modifier on, without that it's even worse. I've tried converting to a high res triangle mesh from a lower res image but basically I think I'm stuffed, as it were. Ho hum.
    Looks like the dither idea will suffice, it'll make the ground look sort of "mole-hilly" !!

    Thanks for the suggestions though guys! I might have something interesting to show you soon.

    cheers!

  6. #6

    Default

    Perhaps these steps are from the original png-file before using Wilbur on it. If the original file was only 8 bit deep even a lot of blurring and saving as 16bit png can leave shelfs in the heightfield.

    What happens when you create a heightfield in Wilbur from scratch (just some cosine hills) and render it? If the steps disappear they where from your original file, if they remain they are a Povray artifact.
    Last edited by cfds; 06-28-2010 at 06:05 AM.

  7. #7

    Default

    Egad! Zooks!
    You have it!
    I'm no expert with Wilbur - I only downloaded it the other day to fiddle with my original file. Anyway, the short version. I managed to create the default sinc function and if I render it to approximately the same sort of "rolling hills" effect when scaled - it is as smooth as the proverbial baby's bum.

    As a test I loaded and saved that sinc file from Wilbur into PSP X, and resaved from there and it produces the sort of fringing effects again. It would appear to be an issue with Paintshop Pro? It looks like I'll have to work out how to make a nice pseudo random hill terrain in Wilbur - or something!
    Excellent answer, many thanks indeed!

  8. #8

    Default

    I don't know if PSP supports 16bit files properly, I know that gimp for examle does not. But luckily Wilbur is just the program to create heightfields (if you want to know how to use it exactly just bug waldronate, he wrote that thing), alternativly you could write your own program, there is some support for png files and c++ around (I think the library is called png++, it is a wrapper for libpng).

  9. #9
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    Blog Entries
    8

    Default

    I know that imagemagick (free image script language) can handle PNG16 fairly well. You can have a play with my free (and very simple) terrain generator and terrain viewer. When you page through and find a terrain that you like then hit save and it will save out a pair of images in PNG8 greayscale format. One is 256x mag of the other. You can load the result into the viewer to see it and it will be smooth so I know it works.

    http://www.viewing.ltd.uk/cgi-bin/vi...nstant_islands
    http://www.viewing.ltd.uk/cgi-bin/vi...dragons_flight

  10. #10

    Default

    Thanks for those links!
    I'm looking for something like that but which works at about the 1km "scale" i.e. a height_field that can represent a 2km square of land for placing models at 1 meter "resolution" on - basically places and scales you'd expect to find a village, town or castle. Options for flatness adjustable to "rockiness" would be good. For particularly steep fields the ability to edit for "terracing" and embankments/cuttings would also be fun!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •