Forum: Vue


Subject: Can you choose the direction an ecosystem instance will face?

Paloth opened this issue on Jul 24, 2009 · 30 posts


ArtPearl posted Sun, 26 July 2009 at 10:16 PM

Well, I thought about it a bit:) The bottom line is there just isnt the information in vue or PS about the directionality. (I'm not that knowledgeable about PS - if someone knows how to define a line/path so that it's possible to know the order of the points - let me know).But I have an algorithm in mind which will address the problem, but it will require writing a utility (python?), so it might take a while. At the moment, if you can break up your areas according to orientation ranges it is possible to get reasonable results. I tried it for a group of houses all facing a central point. My angle ranges are based on 8 ranges  of 45 degrees each. I made a bitmap which serves 2 purposes - it defines where the houses go and which direction they face. Each segment has one of the eight grey values 0,12.5, 25, 37.5, 50,......,87.5. (In my example I only used 6 out of the 8 ranges because I'm too lazy) In the attached image I show the density and the scale&orientation tabs, the function editor, and the final image. (The central structure has nothing to do with the issue, just looked nicer:) ) In the density tab, the filter function defines that anything that isnt white will be populated. I used regular spacing. (You cant use 'avoid overlap' if you have regular spacing, instead  if they overlap you need to decrease the density). In the scale &rotation tab the 'maximum angle' is driven by a function. Also only 'up axis' is used. The function editor shows the grey bitmap is connected to the density and to the angle of rotation. Note the 'no repeat' is chosen. (Mapping is object parametric) And the image shows it works well - all house face the centre. I think intervals of 45degrees should be a good enough approximation. Whether you have the patience to define all the regions like that - I dont know. I wouldnt have, but I certainly wouldnt do it by painting:) Eventually my plan is to just define the roads in PS using a one pixel pencil tool. From that my utility will assign directions to each road pixel, and than assign directions to off road pixels (up to a defined distance) according to the closest road point. The directions will be assigned a grey value as in my example above, and write it out as a bitmap. Easy -peasy - except I never programed in python and its been a decade since I programed in c/c++ . So again, dont hold your breath:) I hope this helps a bit, if not you Paloth, perhaps it will help someone with a project with a smaller scope.

I admire you for undertaken such an ambitious project!

PS if your houses have a diferent front and back you need to assign different regions on both sides of the road, and I dont know what you want to do about corners, perhaps it doesnt matter as long as they face one road or the other.

"I paint that which comes from the imagination or from dreams, or from an unconscious drive. I photograph the things that I do not wish to paint, the things which already have an existence."
Man Ray, modernist painter
http://artpearl.redbubble.com/