Jump to content

Better Diagonal Baking?


Chic Aeon
 Share

You are about to reply to a thread that has been inactive for 2329 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

This isn't a new issue for me and I have been "fixing" in my graphics program. But even if I bake at 800 resolution (I usually use 400 or 500) I have the same choppy diagonals both on outer and inner edges. Not everything can be 90 degree angles.

So have I missed something along the way? A setting that will fix this issue? 

Inquiring minds want to know -- or "I" do at least. 

Thanks.5a48254151ee6_diagonalbaking.thumb.PNG.409cd7f5b24504054694b9a0d63a7464.PNG

Link to comment
Share on other sites

28 minutes ago, Chic Aeon said:

LOL.  OK, I am going to take the silence as a "no" which honestly I expected.  It might be possible to bake at a much bigger size and then resize in a graphics program. I have done that before. It comes with different problems though.

There is no solution except making higher resolution textures and then... Using them in a platform that allows those oversised textures.

This has always been part of the problem for the Squid Ink Abuse AO-Fail crew, if you bake-fail at 4096x4096, and resize to 1024x1024 in an image butchery app, you will get blurred interpolated values, and your squid ink will then tend to spill around corners and over edges to places you didn't want it.

This isn't helped by the generally poor standard of UV map layout encouraged by the insistence on Squid Ink Abuse AO-Fail.

Ask the bald kid from the Matrix...

"Do not try to find the cure, try only to understand the truth... There is no cure!"
 

Link to comment
Share on other sites

Just so this thread will be "complete" :D. I did a bake at 2048 which is four times the resolution of my normal 1024. Issue is still there. I am thinking -- from the quality of the bakes I see done with Maya that this isn't an issue in ALL 3D software. I certainly could be wrong there. 

This has been resized to 1024 but even at full size it really wasn't much (if any) better.  By hand in post processing seems to be the bottom line. Luckily it isn't always needed.

2048test.PNG.4c6ae01a03912d5cebf0d4b32cf242bf.PNG

Link to comment
Share on other sites

I was looking for a setting in Blender's Cycle for anti-aliasing sampling. That problem is definitely in every software, but i can tell Maya deals with it and processes the image accordingly.

Since i don't use Blender anymore, i might have missed it in the interface, so i will list for you the type of features Maya has for this task, so that perhaps you can find out where this thing is hidden in Blender's interface. In Maya's settings, that's the AntiAliasing Sample rate, accompanied by a filter type, which usually is set to gaussian or blackman-harris by default in most 3D apps, followed also by a radius/size value, which means how many pixels will be involved in the sampling process for each sample: lower values lead to crisper looking results, at the expense of jaggedness; conversely, higher values will give smoother and more blurred results.

Another thing that, as Maya and Blender user, i see lacking in Blender is the ability to use an extended UV space. My workflow in Maya includes the making of a high resolution texture, up to 4096, bake it, then use another UVMap (or UVSet as it is called in Maya) where i reorganize my UVs across more UV tiles. These tiles represent the different materials i will use as texturable faces in SL. Then, i perform a image transfer from the HiRes texture created for the UVs in my first UVSet, to each single tile in my second UVSet. Once done, i just delete the first UVSet and keep the one for SL, with the same 4K texture, just automatically split into as many materials i want. Squeezing images to fit within a 4-times lower resolution will never produce nice results, regardless of Photoshop/The Gimp powerful tools. It's not working out really well for you, doing the squeeze from 2048 to 1024 (4 times lower), guess when you have a 4k texture atlas sheet for a set of objects. With my method, i can texture all the objects mapped on such HiRes sheet in one go (easier to keep things seamless too) and THEN split as needed, and transfer just that to one or a set of textures. I might also transfer the textures to a UV that has *all* faces on my object separated into single islands and things would still work fine.

  • Thanks 1
Link to comment
Share on other sites

I don't use Blender myself but it sounds like you need to tweak your texture filtering, interpolation and/or anti-aliasing options in your render settings?

Blender Image Options

Blender Anti-aliasing Options

Apparently if you're using Cycles then you shouldn't need anti-aliasing but you could perhaps try increasing the pixel filter width as mentioned here.

There's also some info that you may find useful on this page Improving AA in Cycles / Removing jaggies.

Technically the outer edges being pixelated shouldn't matter since they fall outside the UV edges and will never be seen, although you may want to leave a little more room between each UV island as it looks as though the padding is almost bleeding into the neighbouring island in that first screenshot.

  • Thanks 1
Link to comment
Share on other sites

Thanks @OptimoMaximo and @Fluffy Sharkfin  (glad the @ feature is working again).

I had already come to the conclusion that Maya baked better than Blender LOL (long ago actually LOL, but we work with what we know and what we can afford :D).  I can't find the anti-alias checkbox in cycles so if there is one and someone knows a hint would be helpful. Thanks.

I DID find a volume sampling that looks like it could be of some help. The default is 512 maximum steps and having that maximum SEEMS to suggest that the higher baking options would be "clamped" by that maximum which is what seems to be happening. 

I have  a VERY busy day today but will look into that more. For others and for myself so I don't forget -- this is in the Bake menu under Geometry. 

5a4a6aa7e9886_volumesampling.PNG.66eff6599f9e93635794b32aa2832d6a.PNG

There is also a sampling presets menu which I have never fooled with (and possibly should) up top of the Bake menu. So looking at the changes that those presets make might give a hint. 

Link to comment
Share on other sites

@Chic Aeon unfortunately that's not it. What you framed there is the Volumetrics samples, a shading effect for things like fog, clouds and similar. What Fluffy mentioned is Blender Render's docs, instead, and can't apply to Cycles. In Cycles, the only thing that resembles what i mentioned is shown in the picture down here. I don't have anything to test within Blender as i don't use it, try if this might be beneficial to you :)

Screenshot_1.png

EDIT: However, always consider that all the features in the Render settings are primarily intended to render images for videos and animations, just a few of them really affects the bake process though as baking isn't a priority for the main use people does of a 3D software. Baking for games is something that just a minority of users does and needs support for.

Edited by OptimoMaximo
Link to comment
Share on other sites

1 hour ago, OptimoMaximo said:

@Chic Aeon unfortunately that's not it. What you framed there is the Volumetrics samples, a shading effect for things like fog, clouds and similar. What Fluffy mentioned is Blender Render's docs, instead, and can't apply to Cycles. In Cycles, the only thing that resembles what i mentioned is shown in the picture down here. I don't have anything to test within Blender as i don't use it, try if this might be beneficial to you :)

Screenshot_1.png

EDIT: However, always consider that all the features in the Render settings are primarily intended to render images for videos and animations, just a few of them really affects the bake process though as baking isn't a priority for the main use people does of a 3D software. Baking for games is something that just a minority of users does and needs support for.

OK. Well thanks for saving me some time LOL.

And yes, I am in Cycles, but perhaps some of this info will help someone in Blender Render :D.  

Meanwhile I can try not to make too many LIGHT WOOD items *wink* where the problem is very noticeable -- at least to me. 

Thanks again. 

 

PS. Thought I should mention that I am in Blender 2.78c as 2.79 was a disaster for me (and others). 

There IS a possibility that this has been improved in later versions. IF SO -- PLEASE let us know!

Edited by Chic Aeon
Link to comment
Share on other sites

1 hour ago, Chic Aeon said:

PS. Thought I should mention that I am in Blender 2.78c as 2.79 was a disaster for me (and others). 

There IS a possibility that this has been improved in later versions. IF SO -- PLEASE let us know!

I should have mentioned myself that, as i don't use Blender, I downloaded the current version just to check this out. Blender 2.79 as of Jan 1st 2018

 

Link to comment
Share on other sites

14 minutes ago, OptimoMaximo said:

@Chic AeonWell well, look what i found by chance on the internet

sQ6Wg.png

Here is what you need to switch from the default in order to access AA Samples. I would suggest also to zero out Transmission, Subsurface and Volume to avoid computational resources waste on features you most likely aren't using.

Lol, If you check the last link I posted (Improving AA in Cycles / Removing jaggiesyou'll find that image is from the top rated answer. ;) 

Link to comment
Share on other sites

58 minutes ago, Fluffy Sharkfin said:

Lol, If you check the last link I posted (Improving AA in Cycles / Removing jaggiesyou'll find that image is from the top rated answer. ;) 

I see that now. I-ve been googling this myself and crossed that. Sorry, i didn't check all the links in your post, just shallowly seen the first 2 pointing to Blender Render then skipped. Thanks for pointing it out, that reminds me to check all links i see twice :)

Link to comment
Share on other sites

11 hours ago, Fluffy Sharkfin said:

Technically the outer edges being pixelated shouldn't matter since they fall outside the UV edges and will never be seen, although you may want to leave a little more room between each UV island as it looks as though the padding is almost bleeding into the neighbouring island in that first screenshot.

OK. Thanks to both of you and I will try that but not today as it is past quitting time and I am trying to be good about that. 

 

MEANWHILE I just wanted to note that it very much DOES matter as those jagged edges happen INSIDE the connected faces on the UV whenever there is a diagonal (this includes circles :D).   Adding padding doesn't help at all in this case. 

 

I am going to paste in my photo again with the area I am worried about in yellow. So it looks like we all missed something LOL. Too much information; too few brain cells = at least in my case.

Hopefully this is be a good source of info for the future. Will report tomorrow before I hit the road -- literally as I am road building at LEA6 LOL.

THANKS AGAIN TO YOU BOTH.

I realize that I could make the islands separate but in some pieces of this project that would have made a TON of islands and I am not really big on scattered UV maps :D. So finding a way to fix the bake was my aim!  

5a4adcab9f918_jaggedinterioredge.jpg.b0cd915fbe623aff4c528c4f3de28474.jpg

Edited by Chic Aeon
Link to comment
Share on other sites

5 hours ago, OptimoMaximo said:

Here is what you need to switch from the default in order to access AA Samples. I would suggest also to zero out Transmission, Subsurface and Volume to avoid computational resources waste on features you most likely aren't using.

The zeroing out isn't an option; 1 is the minimum.  I read through Fluffy's suggestion thread quickly and doing a bake now (at least with wine and caftan so that isn't EXACTLY working).  

That thread is about baking a render rather than a UV map so not sure how that might differ since I never baked a render. My first test went very quickly and didn't show any improvement. Somehow the second one is taking a LONG time so we'll see if it is better. I can reread that thread CAREFULLY manana. 

 

OK. THIS TOOK FOR-E-VER and I have a hefty machine. So for a ton of folks it would not even be an option. This is with the defaults. If there was a lovely smooth line I might say "woot" but I am not seeing that. I will read the info in that forum post tomorrow when not so tired.

5a4ae7bbb25b4_branchpathtracing.PNG.e534abeaa69cc3624a29b0a0d6e00c14.PNG

Link to comment
Share on other sites

7 hours ago, Chic Aeon said:

MEANWHILE I just wanted to note that it very much DOES matter as those jagged edges happen INSIDE the connected faces on the UV whenever there is a diagonal (this includes circles :D).   Adding padding doesn't help at all in this case.

Sorry I just assumed that you were referring to the pixelation on the edges outside the UV islands as well since you mentioned in your first post that "I have the same choppy diagonals both on outer and inner edges".

  

7 hours ago, Chic Aeon said:

I realize that I could make the islands separate but in some pieces of this project that would have made a TON of islands and I am not really big on scattered UV maps :D. So finding a way to fix the bake was my aim!

Not to mention that the more scattered and broken up your UV map is the more UVs/vertices the model will have which can sometimes result in higher download weights in the LI calculation.

 

Since the amount of cleanup that will be needed is going to vary on a texture by texture basis it seems likely that your ideal solution will also vary accordingly.  On textures that have a lot of problem areas it may be quicker to use a combination of adding some anti-aliasing during the baking process (assuming you can find settings that work for you), baking at a higher resolution and then resampling/scaling down the image, whereas for textures with fewer pixelated areas fixing them manually in photoshop will probably be the quicker solution.  In the end it boils down to effective time management, i.e. how many problem areas there are on the texture in question and how long baking at a higher resolution with anti-aliasing takes vs how fast you are at bitmap editing.

Link to comment
Share on other sites

8 hours ago, Chic Aeon said:

OK. THIS TOOK FOR-E-VER and I have a hefty machine. So for a ton of folks it would not even be an option. This is with the defaults. If there was a lovely smooth line I might say "woot" but I am not seeing that. I will read the info in that forum post tomorrow when not so tired.

AntiAliasing always adds up on render time... But from the look of it, it seems similar to Arnold's render samples, where the AA Samples are a general multiplier for the other channels sample settings (Diffuse, Glossy etc) . You first set the number of samples per channel, THEN the AA samples. I show here a pic from Arnold Render Settings

On the top left it also gives calculations about the final number of samples. It seems complicated, but it's easier than it looks. I suggest to look up the docs for this feature in Blender to understand and estimate its working order. Always assuming that the total image resolution would allow major improvements (if there aren't enough pixels, at some point it won't make any difference anyway)

Screenshot_2.png

Link to comment
Share on other sites

I just looked this thing up for you

https://blender.stackexchange.com/questions/3256/what-is-branched-path-tracing-and-how-is-it-useful

There are a few links in this page to more explanations that i haven't read yet, but one came up to the eye, so i just opened Blender and something similar to Arnold shows up

Screenshot_3.png.6913d5d77caea783c61cbbeffe27d396.png

Now, the number of samples is being split into each component (or channel) for each single sample ray used. This helps avoiding overcalulations for channels that don't need more samples. Too bad the values can't be zeroed out though. Consider that Path tracing (the default) set at 250, here equals to AASample = 10 Diffuse and all the others = 25. I think you can use this option to optimize the time, by setting the unused properties (like Volume) to 1, Set your AA sample to say 5 to begin with and test how pumping up Diffuse/Glossy&Co affects quality and bake time. Once Diffuse and glossy show good results individually (test on one channel at a time), increase the AA sample by 1, and decrease all channels by 1 too. The AA samples work as a multiplier to the other channels AND cleans up noise while removing the jagginess. 

 

Screenshot_4.png.334d1d4f56146804d5e530135f3ba8a8.png

Say that the previous image showed a good setting for me for the Diffuse channel and all the others but there still is some jagginess and a very slightly noticeable noise,  i need the last push to remove the residual noise and get better AA, i pulled the AA up by 1, while pulling down the Diffuse by the same amount. This way I get more AA and a similar Diffuse number of samples, which were good already. I hope this makes sense and helps with better results in a reasonable time, then compare it to the time needed for similar fixes in PS

Link to comment
Share on other sites

I did see this info from you both in that linked forum thread and I did notice the sample info at the bottom.  Will need to take some time (I am baking at 1024 (usually 400 or 500 resolution the "traditional" bake method) and I swear that last bake took close to half an hour rather than maybe five minutes so this IS a time consuming "feature" LOL and not terribly sure if it is worth it except in a few circumstances.

But I REALLY DO APPRECIATE all the work you both went to and hopefully this will be a great thread for others too. 

If I come up with any more relevant info I will of course add here. 

I think that stack exchange article might be good for folks interested to read. Honestly, from what I see I am not sure too many folks really care about those tiny jagged lines and as said one COULD map so that there were only a very few INTERIOR diagonals within the islands. For most folks that would likely be the best method.  But KNOWLEDGE is always important, that's why I read forum posts that I don't imagine I will even need to know about -- sometimes years later, I DO!  :D. 

I should also note that I haven't noticed any of these jagged lines on Maya bakes (others,  as I don't have Maya) but that could possibly mean that the Maya user too do post processing work. I am thinking NOT however as those Maya bakes are something to behold LOL.    

 

Cheers!

@OptimoMaximo

@Fluffy Sharkfin

Link to comment
Share on other sites

Glad you found it useful. Yes, Maya whips out images with almost no jagginess BUT it takes way longer than the render times you expect to get. I'm currently doing a bake in Maya using Arnold on 3 objects, each one has a 2K set of 6 material textures AND i'm baking at 2K. Well, after a lot of optimization in the render settings, it takes around 45 minutes per object to complete the bake (as opposed to the 2 minutes to render an image XD) because Arnold admittedly is not designed for texture baking, and the feature is quite rudimentary (in comparison to the regular render features). The results are outstanding though, here's a screen of one of the bakes' section, it's the top shell of a spaceship i'm making for fun

Next will be the remapping of these images into more UV tiles so to keep the total number of pixels the same although spread out across multiple textures. In the process, i'll try to perfom a slight reduction: instead of having, say, 4 tiles/materials x 1024 to equal my initial 2K bake, i'll squeeze all UVs just a little so to make them fit into 3 tiles/materials each object. The little downsampling that this will cause won't be excessive and will help reduce some noise/jagginess. I know it's a little longer than it could be, but to me it's worthwhile :) 

I hope all inputs will help you improve your workflow to address your jagginess issue =)

Screenshot_1.png

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2329 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...