#ok tpo spam this channel with several

1 messages · Page 1 of 1 (latest)

honest bronze
#

You can do it here in a thread

stone flame
#

cool

#

ground before digginh

honest bronze
#

By "digging" do you mean modifying Unity's Terrain, or using something else like Digger?

stone flame
#

pick engaged ready to dig

stone flame
#

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

honest bronze
#

What type of decal is it
Projector component? Decal Projector component?

stone flame
#

and finally I turned around so the decal is not on the hole, and you can see the hole (depression) I made

stone flame
#

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

honest bronze
stone flame
#

DecalBuilder. DecalUtils, MeshBuilder, MeshUtils, PolygonUtils, TerrainUtils

#

those are the scripts and there was some sample decals

#

the decal itself is a sprite

honest bronze
stone flame
#

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?

honest bronze
#

Still, this decal system may work as well if you find a way to reset it when the terrain changes

stone flame
#

ok using BIP

honest bronze
#

Assuming you've confirmed that they do react to terrain's contours at all, at any rate

stone flame
#

seems they react to the contours as set at the start of the play game

#

but dont react to changes at runtime

honest bronze
#

It could be calling a recalculation method in Start

#

Or Awake, but have a method for it nonetheless

stone flame
#

the docs said it works dynamically at runtime

honest bronze
#

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

honest bronze
stone flame
#

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

honest bronze
#

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

stone flame
#

depending on the size of the terrain texture?

honest bronze
#

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

stone flame
#

oh, every time and they stack? thats scary there will be hundreds of these

honest bronze
#

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

stone flame
#

I play lots of games that have this type terrain texture modification, it shouldnt be too outrageous

honest bronze
#

Every game is different in this regard
Even Unity has many drastically different options for this

stone flame
#

well thanks for your time and patience, I will investigate projectors

honest bronze
#

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

stone flame
honest bronze
#

Modifying Terrain's splatmaps / control textures is another option, but another can of worms as well

stone flame
#

worms, always worms

honest bronze
stone flame
#

ok I better go, its late here

#

thanks again

#

I'll prob be back in a few days

#

see how it goes

#

byeee

stone flame
#

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 😃

honest bronze