Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joyce Chen and Katherine Li Design Doc #6

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
230 changes: 127 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,117 +1,141 @@
# Final Project!
# Joyce Chen and Katherine Li Final Project!

This is it! The culmination of your procedural graphics experience this semester. For your final project, we'd like to give you the time and space to explore a topic of your choosing. You may choose any topic you please, so long as you vet the topic and scope with an instructor or TA. We've provided some suggestions below. The scope of your project should be roughly 1.5 homework assignments). To help structure your time, we're breaking down the project into 4 milestones:

## Project planning: Design Doc (due 11/6)
Before submitting your first milestone, _you must get your project idea and scope approved by Rachel, Adam or a TA._
## Project planning: Design Doc

### Design Doc
Start off by forking this repository. In your README, write a design doc to outline your project goals and implementation plan. It must include the following sections:
https://docs.google.com/document/d/1waQ40CT8vVwmg2EtrsiP1IPtTGzJkQFuOkwuBFhcMmw/edit?usp=sharing

#### Introduction
- What motivates your project?

Food 🙂

#### Goal
- What do you intend to achieve with this project?
- Develop a procedural generator in Houdini that creates 3D bento boxes with randomized layouts and food items.

#### Inspiration/reference:
- You must have some form of reference material for your final project. Your reference may be a research paper, a blog post, some artwork, a video, another class at Penn, etc.
- Include in your design doc links to and images of your reference material.
![image](https://github.com/user-attachments/assets/415a4965-8016-48a6-8cc8-d39ceb2ff2a2)
![image](https://github.com/user-attachments/assets/92466a5b-820e-42c3-87ad-dbe3ccc4d4e2)

#### Specification:
- Outline the main features of your project.

#### Techniques:
- What are the main technical/algorithmic tools you’ll be using? Give an overview, citing specific papers/articles.
#### Specification:
A generator that creates randomized layouts for bento boxes, with ability to specify number of compartments, etc.
Procedural models of food items such as rice, vegetables, sushi, fruits, and garnishes.
Variability in food arrangement and bento box to give each bento box a unique appearance.

#### Design:
- How will your program fit together? Make a simple free-body diagram illustrating the pieces.

#### Timeline:
- Create a week-by-week set of milestones for each person in your group. Make sure you explicitly outline what each group member's duties will be.

Submit your Design doc as usual via pull request against this repository.
## Milestone 1: Implementation part 1 (due 11/13)
Begin implementing your engine! Don't worry too much about polish or parameter tuning -- this week is about getting together the bulk of your generator implemented. By the end of the week, even if your visuals are crude, the majority of your generator's functionality should be done.

Put all your code in your forked repository.

Submission: Add a new section to your README titled: Milestone #1, which should include
- written description of progress on your project goals. If you haven't hit all your goals, what's giving you trouble?
- Examples of your generators output so far
We'll check your repository for updates. No need to create a new pull request.
## Milestone 2: Implementation part 2 (due 11/25)
We're over halfway there! This week should be about fixing bugs and extending the core of your generator. Make sure by the end of this week _your generator works and is feature complete._ Any core engine features that don't make it in this week should be cut! Don't worry if you haven't managed to exactly hit your goals. We're more interested in seeing proof of your development effort than knowing your planned everything perfectly.

Put all your code in your forked repository.

Submission: Add a new section to your README titled: Milestone #3, which should include
- written description of progress on your project goals. If you haven't hit all your goals, what did you have to cut and why?
- Detailed output from your generator, images, video, etc.
We'll check your repository for updates. No need to create a new pull request.

Come to class on the due date with a WORKING COPY of your project. We'll be spending time in class critiquing and reviewing your work so far.

## Final submission (due 12/2)
Time to polish! Spen this last week of your project using your generator to produce beautiful output. Add textures, tune parameters, play with colors, play with camera animation. Take the feedback from class critques and use it to take your project to the next level.

Submission:
- Push all your code / files to your repository
- Come to class ready to present your finished project
- Update your README with two sections
- final results with images and a live demo if possible
- post mortem: how did your project go overall? Did you accomplish your goals? Did you have to pivot?

## Topic Suggestions

### Create a generator in Houdini

### A CLASSIC 4K DEMO
- In the spirit of the demo scene, create an animation that fits into a 4k executable that runs in real-time. Feel free to take inspiration from the many existing demos. Focus on efficiency and elegance in your implementation.
- Example:
- [cdak by Quite & orange](https://www.youtube.com/watch?v=RCh3Q08HMfs&list=PLA5E2FF8E143DA58C)

### A RE-IMPLEMENTATION
- Take an academic paper or other pre-existing project and implement it, or a portion of it.
- Examples:
- [2D Wavefunction Collapse Pokémon Town](https://gurtd.github.io/566-final-project/)
- [3D Wavefunction Collapse Dungeon Generator](https://github.com/whaoran0718/3dDungeonGeneration)
- [Reaction Diffusion](https://github.com/charlesliwang/Reaction-Diffusion)
- [WebGL Erosion](https://github.com/LanLou123/Webgl-Erosion)
- [Particle Waterfall](https://github.com/chloele33/particle-waterfall)
- [Voxelized Bread](https://github.com/ChiantiYZY/566-final)

### A FORGERY
Taking inspiration from a particular natural phenomenon or distinctive set of visuals, implement a detailed, procedural recreation of that aesthetic. This includes modeling, texturing and object placement within your scene. Does not need to be real-time. Focus on detail and visual accuracy in your implementation.
- Examples:
- [The Shrines](https://github.com/byumjin/The-Shrines)
- [Watercolor Shader](https://github.com/gracelgilbert/watercolor-stylization)
- [Sunset Beach](https://github.com/HanmingZhang/homework-final)
- [Sky Whales](https://github.com/WanruZhao/CIS566FinalProject)
- [Snail](https://www.shadertoy.com/view/ld3Gz2)
- [Journey](https://www.shadertoy.com/view/ldlcRf)
- [Big Hero 6 Wormhole](https://2.bp.blogspot.com/-R-6AN2cWjwg/VTyIzIQSQfI/AAAAAAAABLA/GC0yzzz4wHw/s1600/big-hero-6-disneyscreencaps.com-10092.jpg)

### A GAME LEVEL
- Like generations of game makers before us, create a game which generates an navigable environment (eg. a roguelike dungeon, platforms) and some sort of goal or conflict (eg. enemy agents to avoid or items to collect). Aim to create an experience that will challenge players and vary noticeably in different playthroughs, whether that means procedural dungeon generation, careful resource management or an interesting AI model. Focus on designing a system that is capable of generating complex challenges and goals.
- Examples:
- [Rhythm-based Mario Platformer](https://github.com/sgalban/platformer-gen-2D)
- [Pokémon Ice Puzzle Generator](https://github.com/jwang5675/Ice-Puzzle-Generator)
- [Abstract Exploratory Game](https://github.com/MauKMu/procedural-final-project)
- [Tiny Wings](https://github.com/irovira/TinyWings)
- Spore
- Dwarf Fortress
- Minecraft
- Rogue

### AN ANIMATED ENVIRONMENT / MUSIC VISUALIZER
- Create an environment full of interactive procedural animation. The goal of this project is to create an environment that feels responsive and alive. Whether or not animations are musically-driven, sound should be an important component. Focus on user interactions, motion design and experimental interfaces.
- Examples:
- [The Darkside](https://github.com/morganherrmann/thedarkside)
- [Music Visualizer](https://yuruwang.github.io/MusicVisualizer/)
- [Abstract Mesh Animation](https://github.com/mgriley/cis566_finalproj)
- [Panoramical](https://www.youtube.com/watch?v=gBTTMNFXHTk)
- [Bound](https://www.youtube.com/watch?v=aE37l6RvF-c)

### YOUR OWN PROPOSAL
- You are of course welcome to propose your own topic . Regardless of what you choose, you and your team must research your topic and relevant techniques and come up with a detailed plan of execution. You will meet with some subset of the procedural staff before starting implementation for approval.
<img width="373" alt="Screenshot 2024-12-04 at 10 16 04 AM" src="https://github.com/user-attachments/assets/8fbeb1fd-ca80-427d-8e6e-2157cbc2aaa1">

## Milestone 1:

We first started by following the box stacking workflow from the buildings homework

https://github.com/user-attachments/assets/b372a8b8-b69d-4759-af01-740604cf8738

We then made our procedurally generated partitions using the Lot Subdivision node. We had a lot of issues with getting only the inside edges (partitions) to show up, but we ended up figuring it out by creating a bounding box-ish around the border to group the outside points, converted them into edges, and used group combine to only select the inner edges.

From before it was working fully:

https://github.com/user-attachments/assets/ebdb3f25-51f9-419a-b597-80a5afe1be00

Then we started inserting our food assets as basic boxes into the partitions. We sorted the partition areas and placed the rice in the biggest and the salad in the smallest. We are still in the process of placing our sashimi and roll assets, which we plan to do by modifying the building homework.

https://github.com/user-attachments/assets/0f904178-50c0-40ca-99ab-3f107c803773

Some things we want to fix in future milestones:
- Add handles on the sides
- Bevel the bottom
- Bigger bento = more partitions
- Fix divisions visible on sides
- Height of partitions not scaling with bento height
- Additional customizations(no rice/no sushi/etc.)

Enjoy us struggling ft. the world's biggest monitor:

https://github.com/user-attachments/assets/bb231604-093b-4d5a-9fcd-270ecc0513c4

<img width="696" alt="Screenshot 2024-11-14 at 12 05 31 AM" src="https://github.com/user-attachments/assets/863bdf38-0a0f-4b04-878c-267610cc7f6f">

## Milestone 2:

### Creating Rice
Used scatter node to create points, and attribute randomize to randomize the normals, and then copy to points to place individual rice grains.



### Filling Largest and Smallest Partitions
Filled largest partition with rice, and smallest partition with soup using mountain node.
![Screen Recording 2024-12-04 at 10 18 13 AM](https://github.com/user-attachments/assets/efdf4eb8-d52b-46de-a082-6890772ba326)

Placing the sushi rolls and sashimi:
- Lots of trial and error with trying to place the roll and sashimi, but we ended up using the Lot Subdivision node again to divide each partition, and then we separated these divisions into their own primitives and iterated through them with a for each loop. Within the loop we used a matchSize node to match either the roll or the sashimi to the size of the division. We randomized which roll or sashimi was placed within the switch node


## Milestone 3:

### Final Models of Sushi and Sashimi
All modeled within Houdini. Reused rice logic and used Vellum Cloth Solver node for the seaweed to wrap around sashimi.
![Screen Recording 2024-12-04 at 10 08 06 AM](https://github.com/user-attachments/assets/18138a1a-762a-4f91-b010-4f5f135467e2)

![Screenshot 2024-12-04 at 9 53 58 AM](https://github.com/user-attachments/assets/50a353f3-97ec-422f-8e6e-abecca3e4614)
![Screenshot 2024-12-04 at 9 54 09 AM](https://github.com/user-attachments/assets/8cd7b1b6-bd80-4f85-b0cc-0bb726070649)
![Screenshot 2024-12-04 at 9 54 15 AM](https://github.com/user-attachments/assets/233e67f5-7d8f-446f-9f53-1d9b01d1199a)
![Screenshot 2024-12-04 at 9 54 24 AM](https://github.com/user-attachments/assets/e3fdecd3-6da3-441d-b12e-8789f431337a)
![Screenshot 2024-12-04 at 9 54 27 AM](https://github.com/user-attachments/assets/e91941fd-6566-4a6f-b4f9-ac1da74dd9fe)
![Screenshot 2024-12-04 at 9 54 31 AM](https://github.com/user-attachments/assets/b249cc0e-1a88-473e-8cda-c3ec2a15a1ea)


### Random Coloring of Bento
Used attribute wrangle node to write a function defining color set, generating a single random index and setting points to that color index.
![Screenshot 2024-12-04 at 10 10 01 AM](https://github.com/user-attachments/assets/b84121b9-d5aa-484a-88c0-8a9382e2e14c)

### Additional Random Toppings
Created toppings for soup and rice. For soup toppings, used a grid to scatter five kinds of toppings at random angles. For rice toppings, created three different toppings to place in center of rice randomly.
![Screenshot 2024-12-04 at 10 10 32 AM](https://github.com/user-attachments/assets/c2a50ebe-8f4e-42ca-b2c7-bea60c00e244)
![Screenshot 2024-12-04 at 10 10 54 AM](https://github.com/user-attachments/assets/35f82acb-f196-48b4-8d7e-319ad60f25e5)
![Screenshot 2024-12-04 at 10 11 09 AM](https://github.com/user-attachments/assets/84734077-068e-4e70-b55d-45ea137c4112)


Optimizations:
- Thanks to the critique, we realized the inside of our box shape from before didn’t have any faces because of how we were extruding, so we changed the logic so that the box has thickness
- Added outer box and handles and beveled the bottom to match our reference images better
- Our previous logic for rice was slowing down our file considerably, so we changed it so that we were only generating rice on the top face of the rice box and created a white box directly under so any gaps between rice pieces would still appear white
- Changed the logic so that the partitions to get the faces that we put the food geometry on are now made from the boolean of bottom face and the inner partitions so they’re exactly the same
- The density of the rice scales with the dimensions of the bento box so that it doesn’t become too sparse when the box is larger
- Rotated each sashimi piece so that its longest edge aligned with the longest edge of the sashimi box

We then prepared for our final output by adding a camera and lighting (area light, ambient light, and sky light) to match our reference images as closely as possible.


Finally, we rendered our final images using Mantra!

References:
- https://www.youtube.com/watch?v=BClgCh_w3lo
- Blast node: https://www.sidefx.com/docs/houdini/nodes/sop/blast.html
- How to make partitions different every iteration:
- https://www.reddit.com/r/Houdini/comments/1et5z2p/how_to_use_a_different_seed_for_every_iteration/
- Lot subdivision outer edges: https://www.sidefx.com/forum/xtopic/68602/?page=1#post-291672

- https://www.youtube.com/watch?v=ewXiWafJ4PE
- https://www.youtube.com/watch?v=sO-mDdJBaVI
- https://www.sidefx.com/forum/topic/75649/?page=1#post-323614
- https://www.youtube.com/watch?v=HVFcjxk71Yo&t=49s

## Final Renders:
![untitled0001](https://github.com/user-attachments/assets/a3d129d0-20dd-48cc-b946-7e281c5f53a3)
![untitled30001](https://github.com/user-attachments/assets/9509e899-8ea1-4465-adec-a657af545ec3)
![untitled20001](https://github.com/user-attachments/assets/52dd16c6-e237-40dd-8149-46d736ab82ff)
![untitled50001](https://github.com/user-attachments/assets/d7c80140-0990-45a2-89da-790dc964f89d)


## Closing Thoughts:

Overall, we think the project went well! There was a lot of back and forth where we were trying different ways to implement parts, especially like when we were trying to get the inner edges of the lot subdivision to show up for the partitions, but that just meant we got to familiarize ourselves with more of Houdini’s functionalities! Shoutout Simon Houdini.

Did you accomplish your goals? Did you have to pivot?
- Accomplished our goal of a bento box generator
- Although we wanted our final product to be an animation originally, we struggled with figuring out what exactly to animate, so we chose to render stills instead, but we're still happy with this output!
- Things we could add in future: textures, more user control over bento box customization (choose which sushi goes where, etc.)



1 change: 1 addition & 0 deletions bento_generator.hipnc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@