Page 1 of 1

flickering 3D layers

Posted: Sun Sep 13, 2015 1:08 pm
by Lúthien
hi,

I'm trying to create a background for a traffic street scene, as seen from the pov of someone riding a motorbike.
To accomplish the visual perspective of moving through the street I thought it might work to draw blocks of houses, extrude them to 3D layers and rotating them 90 degrees so they would extend into the Z direction. Using one such series of 'house block layers' to the left and another to the right of the centre, plus another layer for the horizontal street surface would result in a 3D model of the street:

Image

which I could then move as a whole to give the illusion of riding through the street.

My first attempt used just the 3D layers; but it turns out that extruding a 2D layer containing shapes stacked on top of other shapes - in this case, the windows and doors in the houses - results in z-fighting:

Image

I tried to work around this by keeping a copy of the original 2D layer and putting it in front of the 3D layer by way of a facade:

Image

which looked like that might work indeed. But when I rendered the animation of the whole street moving towards the camera some of the layers exhibit a kind of blinking or flickering, especially obvious at the top edge and in the distance:


(best visible in fullscreen)

I wonder what causes this? I first thought it might be related to the stroke width, for the rendering engine might have some trouble figuring out how deal with that. But I removed all the strokes at the left side of the street at one point and the problem persists.
Could it be that it is related to the 3D extrude settings? I've checked "materials" in the Edges section of the 3D Options tab of the Layer properties, and "extruded side colour" under the Shading section.

This is how I have organised the layers:
Image

Does anyone know what is causing that flickering behaviour?
Or is there maybe an easier way to accomplish what I want?
(I've though about doing this scene in Blender, since that's specifically tailored to 3D - but if I can do it within AS that would be great.)

Any help / suggestion is much appreciated!

Anime Studio Pro 11.1 / OSX Yosemite 10.10.5

Re: flickering 3D layers

Posted: Mon Sep 14, 2015 4:46 pm
by jezjones29
You could try this:
File > Export Animation > uncheck 'Enable multi-threaded rendering"
You could test with a few frames of your animation as it will take longer, but this has fixed this issue for me in the past.

Apart from the stuff on the roof, I'm not sure you need to make it all 3D like you have. 2D layers rotated correctly would have achieved the same look.

Here are some files that may help:
http://www.animestudiotutor.com/search?q=city&shared=1

Re: flickering 3D layers

Posted: Mon Sep 14, 2015 5:25 pm
by slowtiger
Disabling multithreading only helps in the case of linked images flickering (one processor gets the link, another one not). I can't say anything about 3D since I don't use it. As for the windows: I'd render the whole street facade as an image and re-import this, then build the 3D part.

Re: flickering 3D layers

Posted: Mon Sep 14, 2015 11:12 pm
by Maestral
It`s been a while since I went for a 3D ride in AS, but if I recall it properly - extruding is done by adding depth to the shape, where object`s depth goes both Z ways, above and under the layer`s/shape`s Z coordinates. It becomes very importan when you try to fit extruded objects of different depth.

I can`t try it out now, but I`ll check how are the windows placed on Z, in comparison with other extruded elements/objects.

Re: flickering 3D layers

Posted: Tue Sep 15, 2015 12:40 am
by sbtamu
I ran into this a lot and about the only way to get rid of it is to make the windows a tad "wider" than the buildings.

Re: flickering 3D layers

Posted: Tue Sep 15, 2015 12:18 pm
by Lúthien
Thanks everyone! I'll follow your suggestions and report back.

Re: flickering 3D layers

Posted: Tue Sep 15, 2015 1:28 pm
by Lúthien
I copied one of the 3D extruded blocks to a new file to see if the problem would show up more clearly.
It does; it shows up only in the final render - not in a frame preview nor an animation preview.
The rendered animation shows (besides the z-fighting, but that's not what puzzles me ...) how some of the shapes alternate between how they show up in AS's workspace (i.e. no stroke and the colour I assigned to them) and having a clearly visible stroke and a while fill (?). The repeating patterns seems to be: one frame that shows everything correctly, followed by three frames that show the weird versions with the strokes.
Here's the final render (on half format) of the test:



and the preview, which doesn't exhibit this behaviour:



As Stan Laurel would say: well, bend my brow :shock: - I carefully examined the layer in question: disabled the 3D extrusion, looked at the individual shapes to check if there were some hidden alternate versions with strokes and white fills lurking underneath - but no, nothing strange there.
jezjones29 wrote:Apart from the stuff on the roof, I'm not sure you need to make it all 3D like you have. 2D layers rotated correctly would have achieved the same look.
Indeed, you're right. The only places where the 3D matters is at the roof edges, the chimneys etcetera.
But from what I see it wouldn't help isolating them in the current set-up that I have, because this flickering behaviour is also visible in those parts ... but Iooking at the link you gave, it looks very helpful. Will check that out next!

Re: flickering 3D layers

Posted: Tue Sep 15, 2015 1:43 pm
by slowtiger
Have you tried to rotate the chimneys 90°? It's just a guess, but maybe the direction of extrusion matters.

Re: flickering 3D layers

Posted: Tue Sep 15, 2015 1:53 pm
by jezjones29
Did you test with one core?
Also, if you want 3D windows in your buildings, the shape of the building should exclude the windows. (The windows should be holes, with a new shape for the windows - if that makes sense)

Re: flickering 3D layers

Posted: Tue Sep 15, 2015 3:22 pm
by jezjones29
http://www.animestudiotutor.com/shared_files?id=223
Included are two small renders that show single and multi-core renders.
I hope this helps.

Re: flickering 3D layers

Posted: Sat Sep 19, 2015 9:06 pm
by Lúthien
jezjones29 wrote:Did you test with one core?
Hi Jezjones,

I just did, and indeed! Rendering with one core solves the problem.
It seems the problem only affects the 3D extruded layer, not the 2D one. I also noticed that only one every four frames looks right - multithreaded rendering seems to deploy four threads on my machine.
I'll report the issue, maybe it's of some use?
jezjones29 wrote:Also, if you want 3D windows in your buildings, the shape of the building should exclude the windows. (The windows should be holes, with a new shape for the windows - if that makes sense)
Oh yes, you're right - but in this case I kept it a bit simple. Also, these houses in The Hague (on which the street is inspired more or less) have a pretty flat facade; the windows aren't set very deep nor to the sills stick out much.

Great, thanks for your help!

Re: flickering 3D layers

Posted: Sat Sep 19, 2015 9:19 pm
by Lúthien
Maestral wrote:I can`t try it out now, but I`ll check how are the windows placed on Z, in comparison with other extruded elements/objects.
Hi Meastral,
I think they are placed on the same Z depth: the whole house block is originally a 2D layer which is 3D-extruded as a whole.
The 2D-version that I placed in front of it (to mask the Z-fighting seen in the windows) is a copy of that layer placed at such a distance before the 3-D layer that it just sits before the extruded bit that's closest to the camera:

Image

Re: flickering 3D layers

Posted: Sat Sep 19, 2015 9:22 pm
by Lúthien
slowtiger wrote:Have you tried to rotate the chimneys 90°? It's just a guess, but maybe the direction of extrusion matters.
I wouldn't know how to do that because the chimneys are on the same layer as the rest of the house ... I think I can only the layer as a whole in 3D.
Anyhow, it seems to be the multithreading that caused the problem.

Thanks again all for your thoughts! :)

Re: flickering 3D layers

Posted: Mon Jan 11, 2016 5:40 pm
by Lúthien
I just saw the new update 11.2 - and the very first thing I tried was to test if this bug was fixed. But, alas, nope :(

As before, multi-core flickers, single-core works fine.

Can I ask if there is any plan to fix this at all?

https://support.smithmicro.com/customer ... es/1245365