That is beautiful...time consuming, for the likes of me but beautiful (but not as time consuming as really thatching a roof).
If I make a bunch of houses will you thatch them for me using your magic script?
That is beautiful...time consuming, for the likes of me but beautiful (but not as time consuming as really thatching a roof).
If I make a bunch of houses will you thatch them for me using your magic script?
Last edited by ravells; 05-03-2008 at 06:33 AM.
Sure thing if I can use them in my co-op tile !
Just need a height map 8 bit greyscale or a model that I can render one out from. I can take almost any kind of model but at the mo I don't have a sketchup format converter. I should be ok with 3dsmax, obj, lightwave, vrml + lots more like that.
If your building it yourself then its not worth putting huge amounts of detail in as it seems that the thatch covers it up.
Heres a basic hut. I have loads of huts and this is the best one I have. It took just a few seconds to generate.
More cottage bits
I was so impressed I had to try to see if I could do something similar with Gimp:
Attachment 3442
I created a set layers of rotated thatch images, then set the layer mask for each as a bump mapped version of the heightfield with the light coming from the same direction as the thatch was rotated. I think I had the lighting elevation too low, and I only went with 45 degree rotations, cause I was just playing.
I realized afterward that I should have scaled the thatch down a bit, but I think the basics are there.
How did you blend the rotated layers to get the non-direction version?
I think this might be worth scripting...
-Rob A>
Last edited by RobA; 04-27-2010 at 03:47 PM.
My tutorials: Using GIMP to Create an Artistic Regional Map ~ All My Tutorials
My GIMP Scripts: Rotating Brush ~ Gradient from Image ~ Mosaic Tile Helper ~ Random Density Map ~ Subterranean Map Prettier ~ Tapered Stroke Path ~ Random Rotate Floating Layer ~ Batch Image to Pattern ~ Better Seamless Tiles ~ Tile Shuffle ~ Scale Pattern ~ Grid of Guides ~ Fractalize path ~ Label Points
My Maps: Finished Maps ~ Challenge Entries ~ My Portfolio: www.cartocopia.com
Well done for having a go. I'll note some more tech details...
What I ended up doing was to add a whole bunch of light sources in a line going vertical. Like a vertical fluorescent strip light in the direction of thatching and I created a single image render made from the brightest parts of those light renders. I used directional light sources not point or spot. Then I clamped the lighting so that only the very brightest parts of the image stayed white and all else went black. That basically made only the parts of the model which faced in the exact horizontal (X-Z plane) direction of the thatch white but at any vertical angle (Y angle). So for example a ball like an orange would have a segment lit white and all else black.
So I had 8 image masks and an extra non directional thatch texture. The masking and compositing is done with a compositor that I have as part of GTS but the order I used was as follows.
Start with an image which is all floor color - say black.
Mask in the non directional thatch where the object is not floor only. That is to say if the height map is not black then render the non directional thatch.
Then multiply LightMask7 (157.5deg) with Thatch7 and add in.
Then multiply LightMask6 (135.0deg) with Thatch6 and add in.
...
Then multiply LightMask0 (0.0deg) with Thatch0 and add in.
And that should be it. So Thatch at 0.0 deg is the highest priority and the non directional thatch is least. I tried doing odd angled first like 22.5, 67.5 and then the 45's and then the 90's and then 0 but that didn't come out as well as doing them in rotation order. You could end up with small patches of one angle where everything around it was another completely different. By doing them in rotation order it seems to blend the angles better but the down side is that if you get the light clamping wrong then the bits of thatch which would be 90deg and well lit by the 90deg light mask could be wiped out by the overlap from the 22.5 Then when you get the final render all the angles are a bit out.
I accept that this is not the easiest thing to set up but once you have it it seems to work time and time again.
To get the non directed thatch I merely took 0 & 90 deg and put it in two layers in the bitmap editor and blended 50:50. I was hoping that I wouldn't have too much of that showing really. You cant have thatch pointing straight up as it would let the water in ! I don't know what real thatching does on the top of houses. I guess they put some flat thatching across. Sometimes you see these great bits like topiary with a thatched peacock or something very clever.
Last edited by Redrobes; 05-05-2008 at 07:26 AM.
Great post Redrobes. I'm definately going to try to implement it in my next city map.
Torq
The internet! It\'ll never catch on.
Software Used: Terranoise, Wilbur, Terragen, The Gimp, Inkscape, Mojoworld