Jump to content

Procedural Castle help


Recommended Posts

Dear Houdini users,

I'm new to this forum, I'm a third years 3d student in the netherlands and I'm currently busy with a houdini assignment for school. While I find the things you can do with houdini amazing I haven't really gotten the hang of it so far :P

For my assignment I have to make the basic layout of a castle. So far I have the walls and towers. Walls are placed after a curve is drawn on the terrain. This automaticly flattens the ground on those spots within a small range in order to place the walls correctly and it smooths everything within the castle walls to make sure all the buildings have a (semi) flat surface to stand upon. The towers are spawned on the cv's of the curve you used to place the wall.

Oke so far so good but now I'm stuck. The walls are fine (for now) so I started with the keep. However I want the keep to spawn on the highest point within the castle walls without touching these walls, and I have no idea how I would go about doing that. I tried spawning it on bounding boxes but so far no succes.

I have the ray's I used to select the surface within the walls and I figured that I have to get an average of those points in order to get the spawnpoint (or at least that wasthe only thing I could come up with) but so far I haven't found anything.

The castle doesn't have to be to fancy, it is just to prove you can do some basic stuff with houdini.

Attatched is a screenshot of how it looks so far. Also a screenshot of another student who already delivered hers which was a sufficient grade so you can see to what standard it needs to be build (not that high so no extreme complicated sollutions are needed ;) )

Any help would be much appreciated!

My apologies if this should be moved to modeling, didn't know in which subforum this topic would suit best :)

post-8215-134114404627_thumb.jpg

post-8215-134114410672_thumb.jpg

Edited by Pluisje
Link to comment
Share on other sites

If my problem isn't properly explained in my first post (which I can imagine, props if you can follow along ;) ) I can upload my file if anyone is willing to help. However the file is kind of a mess with everything I tried so I hope you'll be able to find your way in it .

Right now my problem is getting to spawn the keep in the middle of the walls (like on the second picture) preferably on the highest point within the castle ground without touching the walls (which will be a problem on it own since I want to be able to vary the size of the keep if possible)

Link to comment
Share on other sites

There are of course several solutions but here is one of them)

Add edge force and up attrib with Point SOP to your wall's curve. Then shift every point of the curve by normalize(up x edge_dir) * distance_from_wall in vops. This way you scale down your curve.

Project curve on the ground, trim (keep inside option), convert to poly or scatter bunch of points and sort them in up direction. Delete all except $PT == $N in Delete SOP. Here is your point.

Edited by bloomendale
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...