Tracing an image

   4035   3   2
User Avatar
Member
3 posts
Joined: July 2012
Offline
Hey all!

I'm working on a project where I want to take an image of a layout of a city and use each block to populate it with what I want.

What i'm having trouble with is being able to separate out the shapes the trace gives me into something I can use. I've been trying to mess with the foreach node and putting transforms in it to test but it's not quite working out. When I go inside i see one of the traced shapes transformed, but rotated as if it's still part of the whole image (wrong pivot).

Ultimately i'd like to extrude each one out at a random height and use it as a sort of bounding box to fill with assets

A little help would be greatly appreciated

Attachments:
layout_four.jpg (52.7 KB)
testing_02.hipnc (57.0 KB)

User Avatar
Member
49 posts
Joined: Jan. 2007
Offline
Like so? This is using foreach. Also, from the poly extrude help page:

“For example you can use fit01(rand($PR), 0.2, 0.6) in the Translate Z field to create random extrusion heights for each input polygon face.”

Attachments:
testing_02_111_v02.hipnc (69.6 KB)
extruded.jpg (175.5 KB)

User Avatar
Member
3 posts
Joined: July 2012
Offline
Thanks! Wasn't using the foreach node correctly.

Now I have a problem that doesn't seem to be usage related as far as I can tell.

I'm pointFromVolume'ing each building and populating it with boxes, but for some reason the point cloud isn't completely filling up all the buildings.


I also had a sort of method question. After I get all the buildings filled in, I don't need the points in the middle. I think there could also be another way to build them up in the first place, but what would be a good way to clear out the middle?

Attachments:
testing_04.hipnc (100.7 KB)

User Avatar
Member
3 posts
Joined: July 2012
Offline
Ok, another question here.

I've used what I had before to fill each building with points and then i'm copying my own building ‘module’ to each point to make modular buildings.

What i've been trying to do now is get my modules to align properly to each side.

I found this thread, and was using the bounding box method jeff posted to get normals that face outwards: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=101058&sid=cc067eb61ad85867a84917392712a9d4 [sidefx.com]

My problem is now that half my building gets flipped on the negative z axis. I included pics of one of the buildings with the point normals and then what the modules look like on it.

Any help is appreciated once again

Uploading the file but I can't seem to upload OBJ's

Attachments:
testing_14.hipnc (134.4 KB)
normals_points.jpg (56.6 KB)
normals_modules.jpg (73.9 KB)

  • Quick Links