#ok tpo spam this channel with several
1 messages · Page 1 of 1 (latest)
By "digging" do you mean modifying Unity's Terrain, or using something else like Digger?
pick engaged ready to dig
modifying the unity terrain
like ingame you dig for gold or something
one swing, decal seems to work, but is flat
here is another angle so you can see the decal is flat
this is about 6 swings and there is about a 2 foot deep hole (depression) in the terrain
What type of decal is it
Projector component? Decal Projector component?
and finally I turned around so the decal is not on the hole, and you can see the hole (depression) I made
umm let me check
I cant remember where I got it now, its a package of about 6 scripts
Ill h ave to check the asset store to see which one I got
If you select the decal, what components does it have?
this is the asset https://assetstore.unity.com/packages/tools/particles-effects/simple-decal-system-13889
DecalBuilder. DecalUtils, MeshBuilder, MeshUtils, PolygonUtils, TerrainUtils
those are the scripts and there was some sample decals
the decal itself is a sprite
As far as I can tell this decal system generates a new mesh with the decal material, contouring the mesh geometry that it hits
This is different from unity's Projectors and Decal Projectors which work entirely on shader level and don't generate any mesh data
That to me implies that this decal system might not respond to changes, without discretely "regenerating" the decal geometry
I did understand it produces a mesh thats why they suggest delete the decal as you go or you end up with hundreds of these things bloating the scene, but I couldnt find enough info about Unitys system to make that work
I also saw some people suggesting splatmaps I think they were which is basically another whole terrain texture that is allowed to show thru at discrete places, but I couldnt find enough info about that either
do you suggest Unitys projectors?
They would be my first option
Projectors on Built-in Render Pipeline
Decal Projectors on URP and HDRP
Still, this decal system may work as well if you find a way to reset it when the terrain changes
ok using BIP
Assuming you've confirmed that they do react to terrain's contours at all, at any rate
seems they react to the contours as set at the start of the play game
but dont react to changes at runtime
It could be calling a recalculation method in Start
Or Awake, but have a method for it nonetheless
the docs said it works dynamically at runtime
These generated mesh decals are in many cases the cheapest type of projector, even if you have hundreds of them since modern computers can handle some hundreds of simple meshes
They would do no calculations at all after you initially generate them, or force them to change
That is if they are generated mesh decals as I assume
This could mean they work at runtime when you spawn one, not necessarily that it reacts to changes in environment
but I only assume that means it registers changes in the terrain heightmap at runtime, maybe it doesnt, mayber they just mean it will stamp at runtime as opposed to some systems which are just terrain stamps that only work at build time
thats what I am thinking now
BiRP Projectors from what I understand re-render the entire mesh they hit
Which means each Projector would have as much polygons as your whole terrain
so that will cause a small lag spike?
depending on the size of the terrain texture?
Not a spike, and maybe not small
A constant rise in rendering cost
Imagine duplicating the whole Terrain whenever a decal appears
Or so I've heard, anyway
It'd duplicate the geometry, not the material
The material comes from the Projector
oh, every time and they stack? thats scary there will be hundreds of these
It is scary, but it's worth confirming that theory by profiling
URP and HDRP Decal Projectors on the other hand could project against depth buffer so they are quite cheap if the GPU is good, and even cheaper if they're not in view
But those render pipelines are probably not an option
I play lots of games that have this type terrain texture modification, it shouldnt be too outrageous
Every game is different in this regard
Even Unity has many drastically different options for this
I've tried the URP and it cause all kinds of significant issues wit the whole project, so I stuck with BIRP
well thanks for your time and patience, I will investigate projectors
Most other games also have engine programmers and graphics engineers who know precisely the costs and how to optimize this stuff, so you can't draw direct comparisons
yeah, I have me and my limited knowledge
Modifying Terrain's splatmaps / control textures is another option, but another can of worms as well
worms, always worms
That's what digging got you, in this case ^^
ahh I see what you did there 🪱
ok I better go, its late here
thanks again
I'll prob be back in a few days
see how it goes
byeee
HI, Thought I would let you know, I found the issue. I had put an invisible plane on the surface for something else, I forgot about it, and this surface was what the decal was stamping on which is why it was flat and not following the hole. I added a layer mask, now everything I dont want the decal to appear on gets assigned to this layer mask. It works 😃
So the particular asset does react to runtime changes to terrain without requiring any reset method?