diff --git a/blogs/2024/1/1/a-tidy-room-is-a-happy-room.md b/blogs/2024/1/1/a-tidy-room-is-a-happy-room.md index 8c178ee..b32713b 100644 --- a/blogs/2024/1/1/a-tidy-room-is-a-happy-room.md +++ b/blogs/2024/1/1/a-tidy-room-is-a-happy-room.md @@ -1,6 +1,6 @@ # A Tidy Room is a Happy Room -[room-grass.jpg](./room-grass.jpg) +![room-grass.jpg](./room-grass.jpg) In mid-December I attended a hackathan on Meta's campus in central London. It was something of a novel experience, as I'm much more used to the kind ofevents put on by university student bodies. @@ -70,7 +70,7 @@ Our mechanic involved cutting the grass. Since the grass was not GameObjects, there was no object to destroy or transform to compare, so we needed another way to relate a position within the room to something the grass could understand. Moritz had created a an array of points covering the floor, taking into account raised parts of the scene mesh to determine where grass ought to be. -[free-spots.png](./free-spots.png) +![free-spots.png](./free-spots.png) We opted to use a render texture to communicate this information to the grass' vertex shader. This approach meant we could write in information about the pre-existing furniture at startup, and use the same technique to update the grass at runtime. @@ -79,8 +79,9 @@ Green points should have grass on startup, and so they write a white pixel into Everywhere else is initially black, which means the grass should be cut at that location. When points are collected, they write black into the texture, cutting the grass at that location. -[room-rt.png](./room-rt.png) -[grass-rt.png](./grass-rt.png) +![room-rt.png](./room-rt.png) + +![grass-rt.png](./grass-rt.png) The last step was to sample the render texture and use it to remove grass at a particular location. We can sample using the UV which was scaled to the room during position generation. @@ -100,4 +101,4 @@ That's it for the main moving parts we implemented on top of Acerola's grass for The final experience is available on [AppLab](https://www.oculus.com/experiences/7147643091959624/release-channels/386799520513932/?token=Ns1Z92Rx). Thanks for reading, and please [get in touch](mailto:me@ktyl.dev) if you have any questions! -[team.jpg](./team.jpg) \ No newline at end of file +![team.jpg](./team.jpg) diff --git a/blogs/2024/1/1/grass-rt.gif b/blogs/2024/1/1/grass-rt.gif deleted file mode 100644 index b2d6640..0000000 Binary files a/blogs/2024/1/1/grass-rt.gif and /dev/null differ diff --git a/blogs/2024/1/1/grass-rt.png b/blogs/2024/1/1/grass-rt.png new file mode 100644 index 0000000..a3a6e9e --- /dev/null +++ b/blogs/2024/1/1/grass-rt.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d30758cab573af18235ed1f5a1165db62995168947df008bdee63b81c35aae3 +size 165770