Jump to content
3DCoat Forums

[Solved] Smart Material fill - creates Normal edges on islands.


GimbalLock
 Share

Recommended Posts

  • Member

Hi forum,

I've had this happen occasionally, and I'd like to know how to avoid it. When filling a surface with a smart material, it creates sharp edges in the normal map that become visible on the model as jagged seams. I see no logical reason for this to happen, as the surface should rather continue about it's business beyond the island edges instead of marking it with a pixel line. This even happens with some of the default materials.

Untitled-1.jpg

Link to comment
Share on other sites

  • Member

Hi Carlosan,

I have the same setting: "Take interpolated color". The texture is 8k. With a lower res texture the jagged edge will be even more visible.

It only happens on edges shared by two different surface materials. I don't make my models with just one UV map/surface texture. They become too low res. I import my meshes from other software, UV map in 3d Coat and paint textures. This problem doesn't happen on edges of islands inside the same surface ID, only on edges between two different ones. It makes no difference if the vertices are merged or unmerged.

Untitled-1.jpg

Edited by GimbalLock
Link to comment
Share on other sites

  • Member

I understand that if you paint one material with alot of depth into one surface and one with zero depth into the joining material, there will be a line in the normal map because of the height difference. But in this screenshot I have painted the same material over both surfaces (default first material) with depth set to zero, and the line doesn't go away, although they should be flat and have no Normal map information.

Untitled-1.jpg

Link to comment
Share on other sites

  • Member

I did a test from scratch and noticed that it happens when I fill a Surface Material from the Paint Bucket option menu - NOT if I use the Paint Bucket manually to click on a part. Once a surface has been filled this way and the edge has appeared, there's no way to paint it out again. No options have been changed between the two methods.

1.jpg

2.jpg

Link to comment
Share on other sites

  • Member

Hi Digman,

Thank you for the offer to look at it. The file size is massive, so I made a new scene with a fragment from it, importing the piece into a fresh 3dc scene and was able to recreate the problem easily. There are two surfaces of interest in this test: m001 and m002. If one is filled with standard default Smart Material "plastic shabby" and the other with "steel" from the same default folder, the jagged edges appear like in the ref image below. Actually in this case it was "steel" that caused the bleeding, creating pixel lines in the normal map. If it is filled with a depth of zero, there will still be a visible dark line.

In this scene it made no difference whether I used one type of Fill approach or the other (contrary to above). Also in the attached example scene the jagged edges appear in the same one of the two surfaces (m002), NEVER the other. This is regardless of which of the two surfaces that is filled with "steel".

Included in the zip is also the raw model piece as lwo.

JaggedEdges.zip

ref1.jpg

Edited by GimbalLock
Link to comment
Share on other sites

  • Member

Now I imported the object again, but allowed 3dCoat to override material stuff and UVs with Auto-mapping on import. So the whole object is just one surface, UV mapped by 3dCoat. Now, if I click the Fill Tool on a UV island in the Texture Editor, to fill one piece with "steel", this is what it looks like:

new.jpg

I would like that filling an island with a material fills the polygons it is assigned to completely, not stopping half a pixel from the edge. So that the mesh edge itself becomes the seam.

Edited by GimbalLock
Link to comment
Share on other sites

  • Member

Hi Emi, thank you for your reply.

Unfortunately I can't make all islands straight horizontal or vertical when shapes are anything other than square. My sample shape is impossible to align this way. Even if it was possible, it would be a time-killing task. All I would like 3dCoat to do is add a little padding when I fill the island - this jagged look is much worse than having a clean polygon edge between surfaces. I use edge shaders in rendering to deal with that.

Also if 3dCoat didn't make the jagged edge, I could use somewhat low res texture maps for an overall look, and use advanced shaders on top to create sharp microdetails for rendering. To avoid the jagged look I have to use massive amounts of high-res maps everywhere.

Link to comment
Share on other sites

  • Member
22 minutes ago, GimbalLock said:

Hi Emi, thank you for your reply.

Unfortunately I can't make all islands straight horizontal or vertical when shapes are anything other than square. My sample shape is impossible to align this way. Even if it was possible, it would be a time-killing task. All I would like 3dCoat to do is add a little padding when I fill the island - this jagged look is much worse than having a clean polygon edge between surfaces. I use edge shaders in rendering to deal with that.

Also if 3dCoat didn't make the jagged edge, I could use somewhat low res texture maps for an overall look, and use advanced shaders on top to create sharp microdetails for rendering. To avoid the jagged look I have to use massive amounts of high-res maps everywhere.

Yeah it was more general recommendation to improve theUVs, hide more seams and stuff like that, but I know sometimes it might be hard to do.

But the problem is not the padding itself but more the interpolated mode of the padding, you have to understand "interpolated" means it will blend 50% one color and 50% the other color, so it will blend in this case jagged edges. so the only way to avoid the issue in 3DCoat is by changing Realtime Padding mode from Take interpolated color to Naïve padding. did you try that for the jagged edges fills? because to me that worked and I avoided the jagged edges. 

Link to comment
Share on other sites

  • Member

Hi Emi,

Yeah, interpolated makes really good sense between islands of a similar material, and when painting freely across seams. If only the padding on the texture map itself could extend out a few more pixels, this would still work as intended (because the excess pixels will be invisible on the model) and not cause problems on surface borders like they do in my case, because they become half a pixel short. Naive padding helps the problem for the most part, so thank you for that suggestion. It still leaves some errors here and there (3dCoat seems to make little jumps here and there), like shown below.

There are options for setting padding spacing, but they don't seem to extend the application of materials? At least not Normal maps? The hard lines on the normal maps are the biggest issue.

Untitled-1.jpg

Link to comment
Share on other sites

  • Reputable Contributor

The below is my method, It is up to you of course if you find it acceptable.

I used the opengl version of 3DC for the test. DX should work as well.

This test is the model with hard edges. Your photos of the model seem to be hard edges.  Use Auto smoothing set to 30 degrees.

1. First, I removed the ngons that were in the mesh. I manually added some edges.

2. The texel density, I got as close as I could between the 2 UV sets.  The uv islands occupying the same amount of uv space. I use the complex checker with letters.

3. Used at a 2k map instead of 1k for the two uv sets. If you need a 1k map, you can down sample in 3DC or an external paint editor. 

4. Baked the curvature map with 4x anti-aliasing. The curvature map is good in most areas... Has some slight jaggies but not at the seam line in some areas shown in picture.  Yes I do believe some improvement could be done for those top jaggies. Maybe a post calculation smoothing we could adjust in the panel before baking the curvature map. 

5. Clrl-P to invoke Photoshop from with 3DC. Use Gaussian Blur at 1 pixel to fix the jaggies. Save the file and it is updated in 3DC.  Gaussian Blur works best, the reason I use Photoshop.

6. Padding was set to Naive Padding for painting. This is because of two very different smart materials. 

First picture before Gaussian Blur

2nd picture after Gaussian Blur set to one pixel.

Last picture model painted.

One last side note: The top jaggies in some areas of the curvature map seem only to appear on hard edge models so far...

----------------------------------------------------------------------------------------------------------------------------------------------------

I also did a test, importing the model into the sculpt room to have more bevel edges in the model from the baked normal map. I did not use auto smoothing set to 30 degrees but let the normal map do all the work to produce more bevel edges than strictly a polygon hard edge.  I have not shown any pictures or information from this test.

 

edges.PNG

blur.PNG

done.PNG

  • Like 1
Link to comment
Share on other sites

  • Carlosan changed the title to [Solved] Smart Material fill - creates Normal edges on islands.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...