-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Implement generic decal geometry placement over meshes #4053
Comments
I worked on a live decal system, currently using the camera as "projector": Front view: Back, good to see the wrapping: (the texture UV's don't look so good yet in the bottom/green part, because from the Point of View of the projector there is so little delta to calculate left/right) It works only on static models, searching all mesh instances in the scene and using their Currently it just generates a globally positioned mesh which is then drawn via Maybe two systems would be useful:
This would be amazing for better testing/debugging: #2904 |
Finally came around to make it work in the Playcanvas Editor: https://playcanvas.com/project/907728/overview/decals Thoughts/ideas/improvements are welcome, personally there are so many things I would like to add/change, but thats never-ending. Its at least a starting point. The editor doesn't seem to be able to set the material attributes Since the script currently regenerates all decals every frame (so you can move the camera in editor and see live results), normals/tangents calculation slows the scene a bit down: |
That runs nicely! |
The task is to implement a geometry generation for a decal, allowing a rectangular quad to be placed on a mesh (or an array of meshes), with wrapping around. Something similar to this: http://blog.wolfire.com/2009/06/how-to-project-decals/
The text was updated successfully, but these errors were encountered: