Thursday, September 4, 2014

Houdini Great War Frontline v0.6



Another update as tomorrow is my deadline and tonight I managed to, with a gut wrenching nerve in my stomach, create a working digital asset which actually worked the first time around. I made it in a test library but as it did exactly what I wanted I think I'm going to keep it. Tomorrow I'll spend the day adding a metric ton of parameters so the tool is actually usable.

Also, because I'm really tired and don't feel like writing much I'll post a gallery of screenshots I took during the past few days with some explanations in the same format as I used in the previous blogpost.
These two images show that I've created a locator using a box geo to randomly change the location and shape of barracks. Additional parameters manipulate the size of the placement shape and the density of barracks placed on the terrain. To make sure the barracks don't go everywhere I've restricted their spread to between two trenches.


Although spoiled in the first two images, here I take a group selection and use a color attribute to alter the color of that color attribute. After this I transfer the color attribute of just the group selection to the terrain. Purely cosmetic change for presentation.


A quick layout to explain to friends what exactly is going on in the terrain. I think it looks nice and clear enough to post it here as well. The blue lines are the basic trenches, defined by a set of curves. The yellow area is No Man's Land, the piece of land between opposed front lines. The red's are trenches that are dependent on the blue ones. The white is one that is dependent on the red trenches and the the red one in the background wasn't supposed to be red because it's not dependent on anything. The headquarters can be placed independently.



The above two images are intended for comic relief. I accidentally created a loop and saved the file. Instead of using a foreach node I have become accustomed to using a delete node and a copy node with a stamp expression. Unfortunately I made a small mistake and had the copy node refer to a scatter node that spawned 10.000 points. Not cool.


This is how my network looked this afternoon after finishing a clean up. I am using a LOT of object merge nodes to avoid having really long pipes. Also, I like how it looks like a clown network, though I assure you, all colors have meaning. For example, light blue indicates a "prep"-network, dark blue indicates an "edit"-box, purple "selection"-networks and red is either a "necessary evil" or "cleanup"-network.


This is a zoomed in image of the input nodes from the network featured in the image above. These are all the inputs necessary for the digital asset I wanted to make. This worried me to no end. How will I ever make a subnet with more than 10 inputs I wondered. This apparently wasn't an issue as a digital asset can have an infinite amount of inputs. Which is absolutely great.


The working system! I cleaned it a little bit and this is how it worked out. All the nodes in the white box are necessary inputs and the ones in the red box are -as mentioned before- "a necessary evil". I also added a little read me node with important information about curve direction, input hierarchy information as having 11 inputs can be fairly confusing and some information concerning build times on my machine.


The result of a build time of 3 minutes and 15 seconds. I've tried various different curve setups and they all manage to work so far. Cooking the geometry takes a long time in my opinion but I'm not sure how to optimize this. In total I think the entire network is close to 4000 nodes of which some extremely heavy subdivide and polyReduce nodes.

  
I think this is a pretty acceptable memory usage. I hope my teach has a similar rig to what I have... or better.

I think tomorrow I'll add some images with different trench shapes. Right now I haven't changed it up much as cooking the geometry every time takes so much time.

Thanks for reading,
Pim

ps. delivery is complete. I managed to get all the parameters in and fixed some other small issues related to radius matching and the likes. If I get a major passing grade I'll think about releasing it to the public. Otherwise nope.

Monday, September 1, 2014

Houdini Great War Frontline v0.5

A little update again as the pressure is now getting to me. The deadline went from unclear to next Friday so I'm working hard to finish this tool. Oorah. In the past few days I managed to pull off the following things; each of which I will precede with an image. I also figured out I could tear off panels in Houdini and work on a dual monitor setup. Silly me.

In this instance I was in the process of duplicating the existing trench network and rotating it at it's core. Changing up group names wasn't an issue, though some weird exceptions appeared in a few of the operators. I have also yet to figure out how to make the funk-hole trenches procedural as an exception appears somewhere at the creation of the name spaces.


Here I have sweeped a short line across the trenches and combined the result with the funk-hole circles. The best result presents itself when I extrude the whole shape upward and combine the shapes with a boolean operation called 'cookie'. At this point the downside is, I have to apply this operation to each curve individually -so many different operations- as this cookie node doesn't operate on self-intersecting geometry. 


The non-procedural way of ray casting the trench into the terrain. It works fairly well, though somewhere along the line the smooth node's color selection tends to be too small and I get the same effect as a bad filter for when contrast is being added to an image. Both values on each end get pushed; just on the edge of each side a thin line of opposing values gets pushed into the wrong direction, exactly countering what you're trying to achieve.


The procedural way of ray casting the trench into the terrain, though you can see it brings it's own issues. The ray cast is very accurate and on it's own doesn't bring a whole lot of problems with it but when a facet-node is added to recompute the normals I get shading errors. Most likely these are caused by mesh errors. In the image below the shading errors are more apparent.


Clearly very ugly meshing errors. Not sure how I am going to fix this yet.

That was it again. Thanks for reading.
Pim