Hard lesson learned (heads up)

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
Just a heads up for any other nubs. While working on my VN, I learned a hard lesson. Today I figured out that "Scene Optimizer" is great for objects that have simple textures. However don't use it on characters or clothing. It makes their skin textures have all kinds of anomalies.

Now I have to re-render about 20 images.
 
  • Like
Reactions: bas

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
I haven't tried it on hair. Unfortunately I've already deleted the ones that I need to re-render.

If you use it, on some characters it causes some texture distortion where the textures meet. Also on the shoulder, and anywhere that stretches, plus causes nipple pixilation.

To fix it, I just went back and reloaded the original textures in each scene, then re-rendered.

I can't say that it will cause a problem with all characters, but so far every character I've used it on ends up fucked.
 
  • Like
Reactions: rowsdower

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
@jerricho13
Yes! Luckily it was an easy fix though. I documented everything used to create a character. So I just select the character in the scene and re-apply the skin maps, then re-render.
 
  • Like
Reactions: Papa Ernie

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,565
7,376
Scene Optimizer is (in general) much more useful on props and background "stuff". As you found out the hard way, figures themselves have a lot of seams, and one of the tough jobs for the PA's who make them is making sure that all the seams come out, well, "seamlessly." (And even so, sometimes products are released with faults in this area.) You can use Scene Optimizer effectively on characters that are going to be in the background, either blurred out via camera DOF, or that are just small enough that the defects don't show. But it's much more effective, in general, to use it on things like buildings or props. In general, objects like that have pretty regular structure, and the "seams" in the texture tend to fall on edges, corners and the like where any blending issues are far less obvious.
 

Nottravis

Sci-fi Smutress
Donor
Game Developer
Jun 3, 2017
5,132
27,280
God this was timely. I was just thinking about using it too.

Sorry you learned the hard way but thanks for the heads up
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
I used Scene Optimizer on characters and clothing a lot because low VRAM.
Are you sure it's not related to bad values for Render Settings > Advanced > Engine: NVIDIA Iray - Texture Compression: Medium Threshold / High Threshold ? Because this can fuck up textures very bad ... similar to compressing a jpeg to 10% quality or something.
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
I'm by no means an expert on this stuff but here is how I understand it:

Assuming the defaults on my PC ... Medium Threshold = 512 / High Threshold = 1024

Before images get passed to the renderer they are compressed bases on these thresholds.
Image-size below 512x512 = uncompressed
Image-size between 512x512 to 1023x1023 = medium compression, low quality loss
Image-size above 1023x1023 = high compression, high quality loss
Especially the high compression is know to cause visible artifacts.

In other words, lowering these values to 256/512 will highly increase the chance the see compression artifacts. But it reduces the memory-consumption and more textures can fit into the precious VRAM.

On the other hand higher values like 1024/2048 will increase the memory-consumption but the images are higher quality due to less compression. On more complex scenes you could run out of VRAM and Iray would fall back to very slow CPU-rendering. Obviously something we want to avoid too.

So the perfect values depend on the amount of VRAM available and the scene. Oversimplified it is a balance between quality and speed in an attempt to squeeze all images into memory.
 

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
@f95zoneuser463
Thanks for the tip. I've never messed with those settings. As for the problems I've seen with Scene Optimizer, the problems only showed up when I used that script on characters, and went away when I reloaded their original skin textures.

That program is very useful, just not on characters. I have also noticed on some props, namely a bed in one of my scenes, some white sploches after using scene optimizer. The fix for that was one less reduction in texture resolution.
 

Evic

Member
May 25, 2018
205
2,067
I use scene optimizer frequently on characters (including clothing and hair) without issue.

A few basic "rules" that may help-

First, always test it on the subject alone. So try just the character and their skin, for example, not the character in a complete scene. Render it a few times with different lights if you need to. If you're feeling crafty, save this "optimized" subject as a separate scene which you can then later merge into your final scene of other optimized bits.

Second, don't just blindly adjust everything in one shot and hope for the best. I have a general rule of thumb for texture resolution optimization that works very well for me- try to get the final texture resolution close to the output render resolution for key elements (such as characters). So if I'm rendering in full HD and the character has 4k maps I'll reduce them to 1k maps but not below that. I also only optimize any element once, so from 4k to 1k is one shot, not two times of cutting the resolution in half each time although that shouldn't matter.

Finally, don't rely on a script to do all of your work. While scene optimizer is handy it isn't magic, it's just saving you the effort of opening up those files in another tool and reducing them yourself.

Here is an example of an optimized character without any visual flaws caused by the optimization. This scene rendered in 8 minutes and some change on my "OK" but not crazy PC. The biggest optimization that cut a ton of time off the render was to replace the wall textures with a basic black shader- no maps, no effects. The important element of the wall is the window, the window casing and wall material's bump and normal maps were visible originally but unimportant to the scene so they were easily optimized out but not by the script (this also works on lit surfaces, be creative). The laptop, table and chair are barely visible and look fine with a 512 map, normal maps were removed from most of the laptop and all of the chair and table surfaces. The lady now has 1k maps which works and the bulk of the detail comes from the HD mesh and shadows.

You don't have permission to view the spoiler content. Log in or register now.

Here she is with different lighting (emisive surface from the laptop screen is the only light source) but with the same optimizations to her and her clothes. This one doesn't even have a wall in the scene, just a solid black environment.

You don't have permission to view the spoiler content. Log in or register now.

These images aren't perfect since I was just playing around with an idea but they are free of any anomalies. Maybe just grab a base character, leave it in the base pose and mess with scene optimizer until you see what you did that caused the anomalies, I haven't had any problems but then I don't do anything really extreme with scene optimizer. If it will help I can probably do some simple side-by-side renders with an explanation of what was done in scene optimizer.
 
  • Like
Reactions: Nottravis

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
@Evic
Nice renders! And thank you for the tips. I'll try that. My renders are getting better and better with everything I learn. They started out looking like shit. They still arn't where I want them to be, but getting there.
 

Evic

Member
May 25, 2018
205
2,067
@Evic
Nice renders! And thank you for the tips. I'll try that. My renders are getting better and better with everything I learn. They started out looking like shit. They still arn't where I want them to be, but getting there.
Thank you and you're welcome :)

Most of the fun with CG art is trying new things and seeing what happens so don't give up. I try some pretty crazy stuff, sometimes it even works out, most of the time it doesn't or at least not like I wanted anyway.
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
I just came across the prime example for bad texture-compression. No size changes, just compression.
DAZ texture compression.png
Question for other DAZ users: Does your DAZ studio default to 512/1024 too? Seems so low for me.
(to be very clear: this not 'Scene Optimizer' related)
 

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
I just came across the prime example for bad texture-compression. No size changes, just compression.

Question for other DAZ users: Does your DAZ studio default to 512/1024 too? Seems so low for me.
(to be very clear: this not 'Scene Optimizer' related)
Yeah I get that on occasion when I use scene optimizer. If I get that I just reload the scene and don't reduce so much.
My DAZ studio defaults to 1024/1024. I haven't seen this issue yet from the compression settings.