flickering 3D layers

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Lúthien
Posts: 30
Joined: Tue Apr 21, 2015 12:36 pm
Location: Unquendor
Contact:

flickering 3D layers

Post 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
reniad nu elin luin
User avatar
jezjones29
Posts: 339
Joined: Tue Jan 31, 2006 9:43 pm
Location: Wales, UK
Contact:

Re: flickering 3D layers

Post 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
Last edited by jezjones29 on Mon Sep 14, 2015 6:30 pm, edited 1 time in total.
User avatar
slowtiger
Posts: 6177
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: flickering 3D layers

Post 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.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
User avatar
Maestral
Posts: 561
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: flickering 3D layers

Post 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.
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Re: flickering 3D layers

Post 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.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
Lúthien
Posts: 30
Joined: Tue Apr 21, 2015 12:36 pm
Location: Unquendor
Contact:

Re: flickering 3D layers

Post by Lúthien »

Thanks everyone! I'll follow your suggestions and report back.
reniad nu elin luin
User avatar
Lúthien
Posts: 30
Joined: Tue Apr 21, 2015 12:36 pm
Location: Unquendor
Contact:

Re: flickering 3D layers

Post 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!
reniad nu elin luin
User avatar
slowtiger
Posts: 6177
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: flickering 3D layers

Post by slowtiger »

Have you tried to rotate the chimneys 90°? It's just a guess, but maybe the direction of extrusion matters.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
User avatar
jezjones29
Posts: 339
Joined: Tue Jan 31, 2006 9:43 pm
Location: Wales, UK
Contact:

Re: flickering 3D layers

Post 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)
Last edited by jezjones29 on Wed Sep 16, 2015 10:13 pm, edited 1 time in total.
User avatar
jezjones29
Posts: 339
Joined: Tue Jan 31, 2006 9:43 pm
Location: Wales, UK
Contact:

Re: flickering 3D layers

Post 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.
User avatar
Lúthien
Posts: 30
Joined: Tue Apr 21, 2015 12:36 pm
Location: Unquendor
Contact:

Re: flickering 3D layers

Post 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!
reniad nu elin luin
User avatar
Lúthien
Posts: 30
Joined: Tue Apr 21, 2015 12:36 pm
Location: Unquendor
Contact:

Re: flickering 3D layers

Post 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
reniad nu elin luin
User avatar
Lúthien
Posts: 30
Joined: Tue Apr 21, 2015 12:36 pm
Location: Unquendor
Contact:

Re: flickering 3D layers

Post 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! :)
reniad nu elin luin
User avatar
Lúthien
Posts: 30
Joined: Tue Apr 21, 2015 12:36 pm
Location: Unquendor
Contact:

Re: flickering 3D layers

Post 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
reniad nu elin luin
Post Reply