bigorangemachine / ksp-kronalutils

The Unlicense
19 stars 10 forks source link

White Line Rendering #7

Closed bigorangemachine closed 9 years ago

bigorangemachine commented 9 years ago

When a craft over about 4000 pixels (3780px no lines - 4720px lines) tall white horizontal lines appear.

deckblad commented 9 years ago

I can say it's not height that does it. Check out these two examples. Exact same craft, same render settings. Added those horizontal tanks and BAM.

I'm still at a loss... Perhaps a memory issue? Does the shader not scale to that size? I don't know anything about shaders outside of their existence

front_untitled space craft_1 front_untitled space craft_2

deckblad commented 9 years ago

A friend gave some very sage advice to me: "How do you think Unity likes textures over 4096px wide or tall?"

I don't get any artifacts if I clamp the output image to 4096! front_untitled space craft_3

bigorangemachine commented 9 years ago

ya we'll have to ping someone who knows more about this.

If the pixel distortion starts at 4096 then we know its definitely a memory/RAM related problem.

I still think these lines are appearing because maybe we're forcing too much down ksp/unity's throat.

We'll have to keep looking into it. Thanks for the ideas.

bigorangemachine commented 9 years ago

Implmented fix 2e29a62 as a temporary measure.

Will have to revisit this issue. There should be a way to get a much higher resolution.

Maybe for image sizes over 4096 we separate the target image into 9 sections. We just move the camera to focus in those 9 sections then reassemble the image (using GDLibrary or something). Assuming there is no camera distortion we could do this.

deckblad commented 9 years ago

If in Orthograhpic, translate camera up/down. If in perspective, rotate camera up/down. Would also need side-to-side. I wonder how aliasing would work on stitching the final image....

bigorangemachine commented 9 years ago

Issue is Blue Print Shader.

Will have to Phase out this shader. Maybe eventually replace it with bitmap pattern.