Week 13

New method, satisfied results 


I came across this tutorial for achieving the drawing function in BiliBili (basically YouTube for China).
https://www.bilibili.com/video/BV1UT4y187rJ/?spm_id_from=333.337.search-card.all.click&vd_source=6eb1d10345d622ca23bd846b3cab5238

His method involved utilizing the Line Renderer component instead. He explained by creating an additional collider around the tip of the marker pen, which served as the trigger for the Line Renderer. This setup allowed the collider at the marker tip to detect contact with other colliders. When the marker tip's collider touched another surface, it activated the Line Renderer, capturing the position of the marker tip. The Line Renderer then continuously updated to reflect these points, effectively constructing a line on the surface of the touched collider. This approach enabled precise and dynamic drawing interactions.

The creator was very generous in providing the prefab for the marker pen. All I needed to do was import the custom package to our scene, add the XR grab Interactable to the marker pen, and change the movement type to Velocity Tracking for more realistic physics.

Since this method is working with colliders, this means I can literally draw on any objects with colliders in the VR scene, was not expecting this but I was really surprised when I found out.



Here's a screenshot of the amazing result

The brush trial above was actually floating in mid-air because the collider of the whiteboard was thicker than the board itself, so I scaled down the z-axis of the collider to achieve a more believable result.

Example of floating brush trail

Try changing the drawing material to a different color, worked flawlessly

Conclusion


I think we are successful in capturing the visual style of Gosho Aoyama, the whole scene looks very close to the style in our vision. If I have to picture myself going to the same school with Conan, this scene is super close to what's in my mind.

It surprised me how well the drawing interactable turned out. It's a huge plus in my opinion. I've totally changed my point of view about Unity when compared to Unreal. Unity is really optimized for making stylized projects like ours, while Unreal focuses more on real-time realistic renderings. I'll definitely explore further the potential of what Unity could bring to my work.

Overall, I was pretty satisfied with the VR experience we've constructed using Unity. And I believe my group will say the same.






Comments