Jump to content

Decal artifacts


photo

Recommended Posts

When creating a large decal (in this case 128x128 units) we are getting artifacts as shown in the attached picture.

post-225-0-79419700-1318335752_thumb.png

This gets worse when I increase the size to 128x128 (the mesh that receives the decal is also 128x128)

post-225-0-22672800-1318335896_thumb.png

 

This does not happen if we create a smaller decal (say upto 100x100) and move it around, can't see any visible artifacts.

 

Thanks,

Ashwin.

Link to comment

Yes, that's what I intended to say, sorry. Offset (in the Material settings) is to render decal polygons above the terrain, Order is for the rendering order.

 

BTW, in your sample I see you set Nodes -> Decal -> Offset to 1 unit. In this case a spacing between the terrain and the decal will be rendered. Decal->Offset=0 and Materials->Offset=1 (or higher value if the size is bigger) will render the decal "glued" to the surface without z-fighting.

Link to comment
  • 3 months later...

As unigine does not provide logarithmic z-buffer implementation you will run with these large decals most probably always into problems on zoom-out. If not due to increased offset chances are good that you encounter visible offset on zoom-in...rule thumb from my bad experiences: only use small decals and use fading option for hiding them on zoom-out before z-precision ruins your day

Link to comment

As unigine does not provide logarithmic z-buffer implementation you will run with these large decals most probably always into problems on zoom-out. If not due to increased offset chances are good that you encounter visible offset on zoom-in...rule thumb from my bad experiences: only use small decals and use fading option for hiding them on zoom-out before z-precision ruins your day

 

Well I am testing a decal of 2x2 untis and it looks terrible when zoomed in and when im a bit further away from it all of a sudden the clipping is gone,

so if I cant even use a 2x2 decal then I dont know what to do...is it possible the decals have issues with terrains that have a large height vallue?

 

Here is a screenshot of the issue, the orthographic decal is the decal with the least clipping

post-509-0-53660200-1328858299_thumb.jpg

Link to comment

Try terrain relax tool to flatten height map.

 

That would solve the issue as it flattens a lot of polygons but still in areas with a lot of variation in elevation the problem would be back again

Imo the decals need to be a lot more flexible as atm it seems to have a major problem

 

I just did a small test as you can see in the screenshot, the decal works on static meshes, even when the faces are not facing right up

but not on the terrain, so it must be a problem with the terrain, this really should be fixed because we cant just flatten every area for a decal

 

Another thing I noticed when applying a decal on the terrain, it would have clipping issues, then I would use the erode brush on the terrain on the area where the decal is

now the decal would be fixed and the decal would not have any clipping issues but as soon as I select the decal node it would be clipped again and I had to erode the terrain again

post-509-0-45067400-1328867809_thumb.jpg

Link to comment

as for me, decals need lot of improvements.. i.e. right now storing decal in a .node file and adding it to the world can lead to random disappearing or z-fighing artefacts. Entering edit mode for this node solves the issue temporary but on some distance decals on terrain can disappear when LOD changes.. Also making a road or something similar is a nightmare with decals cause of limited shape variation - we need something like 'ObjectDecalSpline' for this.

Link to comment

as for me, decals need lot of improvements.. i.e. right now storing decal in a .node file and adding it to the world can lead to random disappearing or z-fighing artefacts. Entering edit mode for this node solves the issue temporary but on some distance decals on terrain can disappear when LOD changes.. Also making a road or something similar is a nightmare with decals cause of limited shape variation - we need something like 'ObjectDecalSpline' for this.

 

I read on some roadmap post that there would be a road spline iirc

 

*Edit*

Found the topic:

https://developer.unigine.com/forum/topic/1054-roadmap-2012/

Link to comment

Jep, long requested feature. Nevertheless it will be interesting how to solve dynamic terrain morphing and road decals z-fighting issues. Don't know how other engines handle this robustly. I think CryEngine just introduced deferred decals for this

Link to comment
Jep, long requested feature. Nevertheless it will be interesting how to solve dynamic terrain morphing and road decals z-fighting issues. Don't know how other engines handle this robustly. I think CryEngine just introduced deferred decals for this

 

Decal system form the UDK wasnt bad either, it had its issues but in most cases it would appear without any Z-fighting issues

Link to comment

I just did a small test as you can see in the screenshot, the decal works on static meshes, even when the faces are not facing right up

but not on the terrain, so it must be a problem with the terrain, this really should be fixed because we cant just flatten every area for a decal

 

Recommendation to use TerrainRelax does not mean that terrain should be flat and otherwise projecting decals on it would not work. It's just for cases when you want to use decals and 'Flatness' terrain optimization at the same time. It would just allow to properly intersect with this new flattened relief. (Actually, TerrainRelax helps in all cases when intersection with terrain is used, for example, WorldClutter and grass.)

 

 

Another thing I noticed when applying a decal on the terrain, it would have clipping issues, then I would use the erode brush on the terrain on the area where the decal is

now the decal would be fixed and the decal would not have any clipping issues but as soon as I select the decal node it would be clipped again and I had to erode the terrain again

as for me, decals need lot of improvements.. i.e. right now storing decal in a .node file and adding it to the world can lead to random disappearing or z-fighing artefacts. Entering edit mode for this node solves the issue temporary but on some distance decals on terrain can disappear when LOD changes..

It is planned to check all issues with decals on terrain when the terrain is refactored (which will be quite soon). We are testing things out on Valley and will try to fix all of them at once.

 

 

Also making a road or something similar is a nightmare with decals cause of limited shape variation - we need something like 'ObjectDecalSpline' for this.

There's going to be a special tool for that as the development plan goes.

Link to comment
  • 1 month later...
  • 2 weeks later...

It wasn't. Until the current implementation of decals is rewritten (which means rewriting the whole rendering pipeline), no great improvements can be introduced, sorry.

Link to comment
×
×
  • Create New...