Thursday, 29 September 2011

Day 19

I opened up the motion capture files in Maya to just see what happens. All the files seemed to work okay in Maya, the joints were not rotating in place, it was normal, though there's a lot of garbage data, like locators scattered around,but that's nothing drastic. I guess the FBX files and Houdini don't agree with each other.

Mr Leong said that Mr Douglas said that the rotating of the bones was a normal thing in Houdini, and the files were okay for Mr Douglas. I guess i didn't import the files the right way or something.

I figured out that while the particles are on a slide collision with the ground, another collision won't happen if i put an obstacle in the way. If the particles are off the ground, well they will collide properlly. I tried making a collision group and using that group with the next collision, but that didn't work too.

Mr Leong called us to help set-up more cameras in the mocap studio. So right now, we'll be capturing with 18 cameras, instead of the previous 12. It did show some improvements, I thought it'd improve more actually. We managed to get like a few more feet of stable capture area. The actors will have to walk diagonally and not linearly, to get the best capture for walking or marching. Spent quite some time setting the cameras up.

Wednesday, 28 September 2011

Day 18

Mr Leong told me to process 5 files for Mr Douglas since the batch render we did yesterday didn't work. I processed the 5 files, it took pretty fast to process them. I then exported them to fbx. I transferred the files t my hard disk. I later found out that there was a virus in my hard disk. Using my 1337 virus hunting skills, i obliterated the vile virus from my hard disk. The mocap computer has a virus -_-.

I tried out the files that I processed by importing them into Houdini. I was pretty let down. Some files when loaded, don't have the bones there, although I could see in the network the bones and stuff were there. Some files, the bones appeared, but when I play the animation, nothing happened. The "normal" ones, which had working animations looked weird to me. The bones seemed to be rotating in place a lot while the animation was playing. There was also some moving bones, but that's due to the motion capture. I guess we'll have to make sure all the points are captured clearly. I'm still not sure how to do clean up in Vicon Blade though. Anyways, I emailed the FBX files to Mr Douglas.

                                                          The skeleton when brought in


I took a look at this tutorial today. It's about VOPSOPs. I kind of see why it seems advanced, with all the mathematical functions and nodes I've never even heard of. It hurts my head thinking how the guy who made that particle kill crowd simulation thought of that.

I wanted to see if I could make particles get to a certain point , through a maze. I first tried using a follow node with collisions, but the particles just go straight to the leader while colliding with everything.I didn't want to use a curve at first, but then I just made a curve with a whole lot of points and added an attractor node to it, that didn't work out great too, the particles just seemed to fly around in a mess. I then used a creep node and linked it to my curve. Well, the particles did follow the curve, but they all moved at the same times, seemed to only look  like 1 particle was there.


                                                         Using the curve as an attractor


                                                      Using the curve with creep node

Tuesday, 27 September 2011

Day 17

Well, I was in the motion capture room doing mocap the whole day. Pictures are with Edmund, I don't have them with me right now, so i'll update more on this post some other day.

We used Edmund and Lu Sheng as our actors, much thanks to them both. Mr Douglas was here today to supervise and direct the shoot. I learned significantly more on the software, had some hands on use on it today. The software(Vicon Blade) seems more unpredictable and unstable, compared to Vicon IQ.

Monday, 26 September 2011

Day 16

I made a simple setup to test the $LIFE and $AGE  expressions. I made particles birth from a grid and added a color node to them. I used a ramp with a gradient of warm colours, red,orange,yellow and white. $LIFE seems to have a gradual change in the color white $AGE seems to be changing color really fast.


                                                             Simple Test

                                                            Colour Changed



I found an fbx of a mocapped walking animation online and decided to see if I could use it on my particles. I couldn't figure out how to do it though.
I made 3 different types of geometry with the reference model. The first one is just one model alone, second one is two models facing each other and the third one is three models facing each other. I wanted to try to randomly distribute the models onto the particles,since we're going to use different groups of actions on a particle. I tried to use a switch node and added a random expression onto it. It didn't distribute the geometry randomly, but they changed randomly during playback. Well, that's kinda obvious since I'm using a switch. I guess it has something to do with the particles IDs. I think we'll probably do a different method anyways, using the BGEOs.


                                                             Single Model

                                                          Two Models

                                                          Three Models

We're doing the motion capture tomorrow.

Friday, 23 September 2011

Day 15

3 weeks have gone by, that's pretty fast.

I added the flying particles in my crowd sim setup to see how it'd look like. I think it looks pretty cool, but there might just be too much activity going on, with all of them flying around and zipping by each other.

I realised that I don't know much about Expressions in Houdini, so, I spent the day following most of these tutorials from the sidefx website, so that I could understand more about the different expressions and what they are,or can be used for. I learned some simple expressions and various variables. I also learnt that the point sop can do alooooooooooooooooooooooooooooot of things. I already use it, but I didn't know it could be used for so many things. One of the tutorials was about standard particles variables, it refreshed my memory about certain variables like $LIFE and $NUMHIT, also the usage of particles IDs using the $ID variable. One of the tutorials also showed how to control the color of the particles based on the distance of the particles from a certain object, I found that pretty useful as I was actually wondering how to do that at first.

One of the tutorials which I thought was cool was splitting a torus into individual faces, then blasting them away, and also coloring the torus using a few expressions.







The one about particles had some usage of particle groups. It also used a bunch of point nodes to control the scale, color and transparency of the objects.






I saw a tutorial on VOPSOPs on the sidefx website and watched it. I still don't quite understand them yet. I think i'll just focus on particles first for now, but eventually I want to know how to use the VOPSOPs to my advantage. I feel more enlightened after learning more about the usage of expressions in Houdini.

Thursday, 22 September 2011

Day 14

It's nearly been 3 weeks since we started, time is moving really fast.

Like yesterday, spent the morning in the Motion Capture studio. I did learn a little more, on what to do to but it's still quite unfamiliar. Mr Chee Leong will be there during the first mocap shoot next week, so there'll be some supervision at least. We did some test ROMs today and a walking motion and exported them as FBX files. We gave Mr Douglas the FBX files so he could test them out in Houdini. The captures were not perfect though, I still haven't learnt how to clean them up in Vicon Blade. We will be starting the first mocap shoot next Tuesday.

I briefly showed Mr Douglas my progress. I asked him where I should start for the interactions and behaviors of the particles. He told me to learn about and play with the particle groups, such as utilising them to change the colors and such.

So i did play around and created a simple scene to test what I know. I made particles birth from a line. I added a group node at the start and enabled it with a rule " $AGE >= 5 ". I then added a color node with pink as the color and a force node pushing the particles down after the group node. I used the name of the group in both the color and force node. So soon after they birth, the particles do a sudden drop and change colours to pink at the same time. I then added a collision node to make the particles bounce on collision, followed by a split node. I made a birth group on the split node and then added a color node after that. I used the new birth group as the source group in the second colour node and changed that colour to blue. So in the end, the particles birth white, do a sudden drop and change to pink, then as they bounce they will split into other particles which turn blue.




I visualised the flying angels and demons to be fighting by zipping by each other like in Dragonball Z. I did a simple setup to test that out with 2 sources and a soft limit to keep them in the vicinity. I used the interact node after that, and the outcome was pretty nice. Kind of looks like a whole bunch of flies actually.

Wednesday, 21 September 2011

Day 13

I spent the whole morning in the motion capture studio. The school brought in a new software, Vicon Blade , since it will apparently make our work faster, and we could probably skip Motionbuilder. Well since it's a new software, even the lecturers were using it for the first time. We had problems using the software at first, since the interface is different (but the data management looks the same as Vicon IQ), and the steps we used to use in IQ can't all be used in Blade. Due to the difference in steps, the previous method of running the pipeline of processes after we've captured the raw motion capture data cannot be done in the new software. They had a fixed pipeline that could not be changed, to my knowledge so far. Due tot his we had to follow another marker placement type instead of the usual 46 markers we use on our actors when we were using Vicon IQ. We now have to use a 53 marker system, which had some differences in placement of the markers on the body. We faced a problem where we could not see the markers in real time in the 3D view, but we could see in the individual camera views. We did a test capture and ran the pipeline but the last process, calibrating the actor, took super long.


Played around with my setup. I copied on the reference model Mr Douglas gave us onto the particles, which made the playback real slow. So i added a poly reduce node after the geometry and it played a little faster. I noticed that the geometry intersects with each other when the particles are too close. I reduced the number of birthed particles, but then the distribution of the particles were kind of off. Instead of removing particles from the whole grid, the particles started disappearing from the left, so the right side had more. If I made the birth rate any lower, particles will only appear at one side, and not on the other.

                                                     Reference geometry on the particles

I wanted to put in a walking or running animation onto my particles to see how it'd look like. I tried searching for pre-animated walk cycles, but didn't find any. I remembered I had a running animation for a robot character that I created last term. I tried to render the sequence as a bgeo but the render came out wrong, it wasn't the animation. I guess it's due to the fact that I did not rig the geometry properly. I'm not good at rigging and when I rigged it (in Maya), I just parented the geometry onto the joints and animated the joints. I kind of spent some time figuring the bgeo thing out, but in the end i gave up, I'd rather get a better working animation then the mess I made.

                                                           My very simple robot model

                                                       The network that makes up the robot

                                                                          Lots of nulls

                                                       Notice the geometry under the joints

Tuesday, 20 September 2011

Day 12

I researched a little bit more on crowd simulation today. Read a few technical papers on crowd simulation. They really were technical.......but they talked about interactions between agents and stuff like that. I found the research papers here .

Found this video on youtube, pretty great work from the guy that made that.



Mr Ron came in today. Showed him my problem with the particles being too close to each other. He told me to tinker with the interact node. The particles seem to be avoiding better now. Well since I had the idea of having 2 particle systems, one moving across the battlefield and the other one kind of static...I need to make them avoid each other. As of now, they don't seem to be avoiding each other, they are just kind of "lucky" not to intersect each other, but we can't rely on luck. I need them to have movements of avoiding each other. I placed a collect node to merge them together, followed by an interact node to see if that could cause them to avoid each other, I don't see much difference though, might have to play around with it more.



I think we're going to start mocap soon, which is great since i'll have more stuff to do. Will be going down to the mocap studio to see the new Vicon Blade software we've acquired.

Mr Chee Leong gave me a Vicon Blade users guide printout near the end of the day, going to read more on that when I get home.

Monday, 19 September 2011

Day 11

Started the day off researching about battle scenes in the air. I couldn't really find references to characters with wings, flying and battling each other at the same time. I remember watching the movie "Legion", there were angels depicted in that movie. However, there wasn't any fight scenes that involved actual flying and combat at the same time. I then remembered that in Lord Of The Rings : Return Of The King, there was a scene whereby the eagles came in to fight the Nazguls. I guess a nice direction to go with the movement could be like the agents circling around each other and zipping into each other at certain instances, much like the typical mid air battles in Dragonball Z.

I was wondering how I would simulate their movements in mid air. I tried playing around with the Orbit particles node. It does seem to give a "flying" kind of effect, but I wasn't sure how to really control it to get what I want. I just played around with it, made a particle system orbit around another one.





We also attended a presentation today, by some people from Autodesk about motion capture and Motionbuilder.

I watched Peter Quint's video about time and how to use the timeshift node to vary animation, might be useful in varying the motions of all the characters, so things will not look monotonous. In the video he did mention that he used the interact node to make sure the particles move away from each other when they come in too close. I tried his method, but still, my particles seem to just go through each other and don't avoid each other. I'm sure the problem derives in the fact that i am using the sliding collision as a way for the particles to follow the terrain.

The particles that are scattered throughout the grid will be controlling groups of characters interacting. They will be fighting each other. I will probably make those particles stationary, and make another set of particles move through them, like in a battlefield. That way, there will be a little more movement in the scene. The problem will obviously be that as of now, my particles do not avoid each other even though i've tried many ways to do so.





Got to admit I was rather distracted today because of the Gears Of War 3 launch event, but that's just today. I won't be distracted anymore once I get hold of my copy, which will be today.I think...

Friday, 16 September 2011

Day 10

I was thinking about collisions this morning, until Mr Ron came in today. He told me that i didn't need the particles to collide with anything and that 1 particle would hold  a cluster of characters fighting.

Well , that makes my job easier. Rather than having a bunch of individual particles interacting with each other, i'd have a few particles generating a fight scene, but i find it hard to visualize how to do that.

I stripped my setup to just the grid and the particles. I scattered the particles around the grid as I saw fit and also reduced the number of particles being generated down to half of what it was. This resulted in a few particles across the grid. I did find however, that the particles didn't appear in certain areas that I painted. I also found out that if I concentrated some paint in a certain area apart from the  scattered paint, the particles would appear at the more concentrated area, rather than each and every place that i had painted. Well obviously all of the areas I paint should be more concentrated so that they will register, so I fixed that problem easily enough.....or so i thought..........dun Dun DUN! Turns out, even though I equally painted the different areas, the particles only appear on one side. Then I remembered, I was only using one source, which has a low impulse birth rate *facepalm*.I increase the birth rate and the particles appeared where they didn't before.  Well this just shows how such a seemingly big problem has such an easy solution.....and I wasted time trying to figure it out, when it's so easy.

I also took a gander at the storyboard today to see how I would place the crowds. I personally think that this method of painting the particles in is a pretty good method, seeing as how we can control where the particles should start at and where they should stay. I still don't really have good particle interaction yet. The particles just seem to move off the grid instead of around each other. I played around with a position node with a noise function "noise($FF*0.02,1.1,4.5)*5" but it didn't give what I wanted. I made a torus,sphere and box into a group to represent the cluster of characters.

                                                             Painting on different areas


                                                              Particles on painted areas


                                                                  Clusters of geometry


                                                                         What a mess

I also made a rough production schedule today, it's really rough. I've only truly scheduled when we would finish our RnD, so far.


Thursday, 15 September 2011

Day 09

Started the day off messing around with my scene. Collisions still don't work.

Mr Douglas came in today and reviewed with us about what we have done so far. He reminded us about the reference model he gave us, I totally forgot about that. I had to remake another one of my setups because the one I was working on was way too large against the model he gave us. Mr Douglas told me to make the particles move like how the army would move; not too fast. I added a drag node in my new setup to slow the particles down a little. My new setup also has collisions (apart from colliding with the ground) that do not work. They also don't seem to avoid the repelling attractors that i've set up. Also tried to use soft limits, but they didnt work either.


                                                          Overall network

                                                          Model on the terrain

                                                              Closer shot of the model

                                                  POP network, with new drag node (scrapped softlimit is FOREVER ALONE)



Mr Douglas also told me to learn more about the particle nodes and learn a lot more about the POP network to the point that I can accurately control the particles. I guess by the end of this FYPJ, i'll be a master of particles XD.

Wednesday, 14 September 2011

Day 08

So I came in today and found that I did not save the setup i did in the licensed version -_-.... Fortunately, i remembered how to do it and set it up real fast. After I set it up, i realised that the particles branched out again. I then further realised the problem lies in the geometry. Since i sculpted it, the deformations reverts the path of the particles, so i made the starting area of the particles flat so that they'll go straight initially. Well the problem still lies with the middle of the geometry.

                                                       
                                                        "New & Improved" Network





I changed the geometry to something much more simple. The initial geometry "concaved" in certain areas and I guess that affected the particles. Turns out I was right, the particles go on a much more stable path.


                                                                   Simpler Terrain

 The attractors I set up seem to work actually. I made another set of particles at the opposite end in another POP network( in the same SOP net). The particles slow down when they reach the attractors and "squeeze through" where they are supposed to go. Some particles go straight into the particles and get pushed back in the opposite direction, Some also just go straight through the attractors and just don't give a damn. I set up some boxes in the middle as a representation of where they are supposed to go through, the particles aren't supposed to collide with them.

                                                                  Particles at one end


                                                             Particles at the other end




I tried implementing the DOP network in my setup, no reason actually, I just wanted to test if it works.. I made a DOP network node in my SOP net and placed in 2 RBD object nodes and linked them to the 2 particles systems respectively. I found out that the particle movements did not register at all after that. I gave one group of particles an initial velocity for a crash course into the other group. Instead of acting like particles and dispersing wildly on impact, it just acted like a single solid object, spinning clumsily on impact, and then other one merely moving away like one object. I guess i'm not supposed to use the RBD object node for this kind of thing.

                                                                       DOP net test



So as of now, the 2 particles systems just pass by each other, and that's it.

Tuesday, 13 September 2011

Day 07

We relocated to the visual effects FYP room today, so I had to rebuild the current system I have.

Everything seemed to be working fine, fine as in, the collisions still don't work right.

I decided to skip away from POPs for awhile and learn something else in the mean time. I used the book, " The Magic Of Houdini" as a guideline to learn a bit about DOPs. I did a few exercises in the DOP chapter. Since the book is based on an older version of Houdini a few nodes are different, but i managed to figure that out.


Beginning exercise

In this exercise I made a simple setup for applying RBD. Made 2 RBD objects, applied gravity and a ground plane. Made them collide with the plane and each other.

                                                                       RBD Exercise



Volume Representation & Constraints

For this exercise I had to firstly play around with the collision guide geometry. It made me remember that I learnt about it before last year in Procedural Effects class. I then had to put constraints onto the object.



                                                                 Constraints Exercise


Multiple Constraints & Limits

In this exercise I had to make a door and have an object hit it to "open" it. Used 2 pin constraints on the door to act as its hinges. A RBD object was added as the object that hits the door. Added a small cube near the door as a doorstopper that limits the swivel movement of the door.

                                                             Multiple constraints exercise




Affector Matrix

In this exercise, I learnt about the affector matrix.

                                                               Affector Matrix exercise



Multiple Objects

In this exercise I learnt how to create multiple dobjects in the RBD Object DOP. Another way is to use the Copy Objects DOP.

                                           Creating multiple dobjects with RBD Object DOP

                             Creating multiple dobjects with Copy Objects DOP (objects in detail panel)

Monday, 12 September 2011

Day 06

I started the day off by looking at my crowd sim file. I tried relocating the second collision node onto the start of the network. The collisions seemed to work, but they jump to the object straight away at the first frame. Also, for some reason, playing the sim lags the software. When the second collision node isnt at the top, it plays smoothly, but when it is, it lags.


                                            Particles already colliding with pillars at the start



Well maybe the particles don't need to collide into things, and just avoid it. Since the agents we're using are angels and demons, they'd be smart enough not to run into things, and just avoid them, however the fact that they cant simply collide with the obstacles annoy me.

The attractors somehow work. The particles change in path when they hit the attractors, but they still go straight through the obstacles. The particles also seem to branch out real far at a certain point. I tried placing a single point as a leader at the opposite end of the grid, sort of like a place mark of where the particles should go. However the particles squeeze in to where the single particle is, and still some particles fly away in other directions. I put a soft limit in the vicinity of where the particles are but they still act weird.


                                               Some particles flying in other directions


                                          POP network, a little messy, trying a few things out


My network's kind of messy right now, I'll need to reorganize it.

I also read some stuff about VEX and VOPs in " The Magic Of Houdini" today. Can't say I completely understand what they do, but it gave me a little insight. But I'm still slightly confused with the POP network -_-.

Friday, 9 September 2011

Day 05

The first week's nearing the end.

I started the day off watching battle scenes with crowd simulations the the LOTR movies, for motivation. They did it really well.

I opened the crowd sim setup I made yesterday to try to fix some problems. I firstly managed to get the oddly shaped spheres to be normal spheres. The problem laid in the copy node i used. I unchecked the "Transform Using Point Attributes" box and the deformed spheres changed into normal spheres.


                               As you can see, the spheres are alright, just the particles are to close to each other


Mr Douglas gave me another crowd sim hip file to study. The person who made it seemed to use various soft limits on his obstacles. I tried that out, but my particles still ignore the fact that it's there and just plow through it. I think that the problem has something to do with my first collision node. The particles are set to collide with the grid and slide on collision, there's also a state node with the sliding check box ticked. I think the soft limit and 2nd collision node after those nodes don't compute.


                                                                  The Collision Node


                                                                     The State Node


                                         The points used as attractors and various soft limits


Ruth went over with me the crowd simulation pipeline that they've developed, i think its pretty cool. It's organized and would save us time. I'll just have to modify her crowd simulation setup to incorporate the movements of the angels and demons.

Truthfully I didn't do much today other than trying to fix my simulation and studying other crowd simulation files.

Thursday, 8 September 2011

Day 04

I met Mr Douglas in the morning today. He gave me a few materials to look at and study like hip files with crowd simulation and interesting pop networks.

I started the day off watching Peter Quint's tutorials, namely the ones titled, "Millions Of Particles". Mr Douglas recommended me to watch that because it touches a little bit about the delayed node.

One of the hip files Mr Douglas showed me was an interesting crowd simulation done with particles, which was significantly easier to understand compared to the previous crowd simulation file I found on odforce. I studied the file he gave me and tried my best to replicate what was done, and ofcourse, understanding it.

One of the nice things of the simulation is that the particles don't just travel straight, they travel according to the terrain, which is great. I managed to make the particles do this and it works pretty well. I had to paint the terrain black and painted the area where I wanted my particles to spawn red. I then had to use the $CR variable in the birth probability inputs on the source node, that made the particles spawn there.I just used a sphere as geometry for the particles outside of the POP network.


                                                            Overall look of the setup

                                        The grid was sculpted so that it wouldn't be a flat plane

                                Painted part of it black, and part of it red for the particles to spawn

                                                        Overall network in geometry level

                                                                   Overall POP network



I tried to make obstacles and tried to make the particles avoid the obstacles, but the method I used in my previous collision test did not work. The particles just pass through the set obstacles. Another problem is that when I copied the sphere onto the particles, certain particles ,instead of turning into spheres, turn into an odd stick-like shape, kinda look like normals.

                                                The particles pass through the obstacles.

Wednesday, 7 September 2011

Day 03

Before I went home yesterday, I set up a simple setup to test collisions since I wasn't satisfied with the collisions I had with the steup I had yesterday.


                                                           Very Simple Initial Setup

                                                     The POP network of the first setup


I wanted the particles to seem "smart", as in they would avoid whatever obstacle that's in their way and still continue on course. I went around odforce and found a thread about crowd simulations. One of the forums users there "Deecue" posted a hip file with what I kind of wanted. The thread is here.

I referenced the method to get the particles to avoid some pillars I placed in the middle.


                                                            Added pillars in the middle

                                                            POP network of 2nd setup
 


I went to see the presentations made by Tanner, Jia Bao, Lu Sheng and Bryan on their SESI work. Great work by all of them!

After all of that, I went back with the collision setup i've been working with. I looked around about how to collide particles with other particles in houdini, turns out, you can't. I then went around to find out how to convert particles into geometry. I suddenly remembered about the copy node and used that after my pop network to map some simple primitives onto my particles. I made a switch to switch around between different primitives like spheres and boxes. I made a soft limit node in the pop network too, to kinda keep all the particles in the vicinity of the grid.


                                                         Added geometry onto particles


                                                            POP network of 3rd setup



I dug around my hard disk to find files with info on Houdini. Found a folder with various documents about Houdini shortcuts, extension lists, attributes and more importantly, commonly used variables in Houdini with definitions of what they do. The folder was from the Procedural effects class we had last year.  It sure came in handy, thanks Mr Ron!

I wanted to color the particles from the two different sources differently to see their movements clearly. I thought that it would be pretty simple to assign the particles into groups initially, but in the end, i could not put my head around it, it didn't work however I did it. So in the end, i settled with a pretty ghetto setup of using two pop networks and two switches. It'll suffice for now, i'll probably think of a way to make it neater. I also added an extra torus as an obstacle just to see what happens. The particles still move a little weird around the obstacles. I also don't really like how the particles advance, their not in a uniformed formation.


                                              My messy setup for colors and added obstacle

                                         One of the POP networks, both are exactly the same
 
                                                      Weird movements of the particles


I want to improve this system further so that the particles react to each other when they collide, I probably want them to randomly die on collision no matter which color they are. Right now I understand way more about the POP network and how the various POP operators work, compared to 2 days ago. I'll probably move on to understanding and researching other things after this.