Giter Club home page Giter Club logo

Comments (3)

Anatta336 avatar Anatta336 commented on June 30, 2024 1

Aha, okay. By default the decal looks for nearby meshes that are on objects flagged as "static" (the checkbox on top-right of the inspector when the mesh's object is selected.) If the meshes you're testing with aren't static then the decal will normally not try to project against them.

If you want a decal to project against non-static mesh objects you can untick "All static meshes" on the Decal Mesh and add whatever MeshFilters you wish to the "Target meshes" list.

Here is a decal projecting against the example mesh, with the mesh itself still being non-static:
projectedOnMeshB

Hopefully that helps.

from driven-decals.

Anatta336 avatar Anatta336 commented on June 30, 2024

Hello, thanks for the report.

It looks like the problem is that it doesn't recognise Unity's Terrain as being a mesh that it can project against. This issue is reproducible, the decal projection system completely doesn't work with Unity's Terrain.

I think it would be a lot of work to get this type of decal system to work in a satisfactory way with Unity's Terrain. Although we cannot directly access the meshes generated by Terrain, we could still build a decal mesh by looking up height data from the Terrain. The bigger problem is that the Terrain swaps between different resolution meshes as the camera moves. To avoid visually clipping through the terrain, the generated decal mesh would need to also swap between matching meshes under the exact same conditions.

That would be possible to do, but it feels to me like something that would better be done by a dedicated Terrain-based system, or a decal system that does the projection at render-time and so doesn't need to access mesh data at all.

from driven-decals.

zwcloud avatar zwcloud commented on June 30, 2024

It looks like the problem is that it doesn't recognise Unity's Terrain as being a mesh that it can project against.

That's a terrain-like mesh, not a Unity terrain: MeshB.zip

I have also tried regular meshes like sphere, plane and box, it doesn't work either.

from driven-decals.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.