5.03 shading

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Squeakydave
Posts: 328
Joined: Tue Aug 03, 2004 9:44 pm
Location: UK - London-ish
Contact:

5.03 shading

Post by Squeakydave »

Wehey! scale compensation now effects shading on an object....kind of.
When you zoom in on a shaded object the shading cuts off at the edges of the screen.

example:
A simple circle with default shading.

Zoom in on it untill it starts to go out of frame.

Render and you will see the shading treats the edge of frame as if it is part of the shape.

:(
PhilR2004
Posts: 14
Joined: Mon Nov 22, 2004 4:42 pm
Location: USA

Hmmm...

Post by PhilR2004 »

Well, I just tried what you just said & I don't see any problems. You might be shading the outside of the circle instead of the inside of it. Other than that, everything seems to work fine.
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

This is a problem affecting layer shadows/shading that has been around for a long time. It isn't really connected to scale compensation.

Basically, if you have a layer that extends outside of the visible region of your final output, these offscreen areas are not taken into account when generating the shadow/shading.

You can reproduce the same limitation in Photoshop: create a blank document. Add a new layer. Draw a large circle that is mostly off-screen. Add a drop shadow effect to the layer with the circle. You'll get this:

Image

The same thing is happening in Moho. In order to get the correct shadow, Moho needs to actually render a portion of the scene that is off-screen, in case it needs to be used to generate a shadow. The problem is, the amount of off-screen data needed depends on how big the shadow is (how much offset and blur you use), and this can be different for each layer.

Architecturally, it's kind of a complex change to make Moho render layers with this extra off-screen stuff. We know what needs to be done, but it's not at all a quick fix to change the way Moho renders.
[/img]
User avatar
Squeakydave
Posts: 328
Joined: Tue Aug 03, 2004 9:44 pm
Location: UK - London-ish
Contact:

Post by Squeakydave »

I guessed that would be the case or you would have fixed it allready.
Still it is pretty vital in my opinion so when ever you could get it done would be welcomed with open arms.

Until then I think I'll explore painting my shading on or use masking.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

The other option is to render oversize and then crop the final output. For example, say you want your final output to be 640 x 480. If you turn on the "NTSC Safe Zones" in the view menu, you can multiply each of your dimensions in the project settings by 1.25. In this case the project becomes 800 x 600, but if you use the innermost NTSC guide as your "frame", that is 640 x 480. You'll need to crop you're final render down to size, but unless you are using some mighty extrerme settings that should completely overcome this problem.

Which might be a reasonably stopgap solution for within Moho. Couldn't you make it render oversize and then crop the image internally before it's sent to the output file? It should do the trick for almost all cases of this problem, and I'd think it would be a lot easier than rewriting the render engine. It'd slow down the rendering somewhat, so maybe a "oversize and crop" checkbox in the Project Settings? Might do the trick without a whole lot of pain.

--Brian
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

Rendering oversize would work as sort of a workaround, but i fyou do that, then your camera zoom (or field of view) is no longer what it claims to be.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Hmmm, those pesky details. I guess you'd have to tweak the initial field of view a bit to get it to look the same. Workarounds aren't gonna be perfect, but whatever gets the job done. In my example, it looks like a camera zoom of 71.6 (what a nice round number) should give you the same results as if you started with the default 60 zoom in full frame. Clunky, but workable.

--Brian
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

Brian: I think a problem with having Moho do what you said, internally, is that you're making an assumption about how much extra area needs to be rendered. For someone using no shadow effects at all, this will needlessly waste processing power. For someone using a ridiculously huge shadow offset, this guessed-at amount will be insufficient. So Moho would actually need to be a little more "intelligent" about how much extra area it renders, and even in what direction (if all your shadows are off to the right, then you don't need to render anything extra to the right).
-Keith
PhilR2004
Posts: 14
Joined: Mon Nov 22, 2004 4:42 pm
Location: USA

Hmmm..again...

Post by PhilR2004 »

Well, from reading this conversation, it seems that this MAY be a bug or it MAY be somebody's own screw up in rendering.

Uhhh..whoever posted this bug deal...there is a thing called a tutorial..READ IT!

I am only trying to clear this thing up, because I did exactly what he did & everything turned out ok, for me.
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

It is a bug Phil. Or more accurately (to make us feel a little better), a design limitation.

For many cases, layer shadows and shading work just fine. However, if you have a large object (or zoom in close on a small one) such that part of it is offscreen, Moho has to guess about what the rest of the shadow/shading should look like. If you weren't able to reproduce it, it's probably just that your sample shape didn't go offscreen in just the right (wrong) way.

I'm sure Squeakydave doesn't need to read the tutorials - he's got a very good grasp of Moho, and has used it for quite a bit of professional broadcast work.
User avatar
Lost Marble
Site Admin
Posts: 2347
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

OK, I said it was going to be complex to fix this shadow issue, but here's an improvement. (This isn't a true fix, but more like wrapping some duct tape around the problem. It will improve layer shadows in more cases.)

Download the following update for Moho to try the shadow fix. This update is not an official update, and it's Windows-only. You should only download this update if you want to try out the shadow/shading improvement.

http://www.lostmarble.com/misc/moho_shadow_update.zip

When exporting an animation, if you still see the problem, try turning on the "Extra-smooth images" rendering option to improve things even more (but also slow down rendering).

Let me know how it works. If this seems to help significantly, we'll roll it into the next official update.
User avatar
Squeakydave
Posts: 328
Joined: Tue Aug 03, 2004 9:44 pm
Location: UK - London-ish
Contact:

Post by Squeakydave »

Yes!
That helps very much indeed. Just what kind of duct tape are you using and where can I get some? :D

Phil:
Sorry It may well have been my rubbish discriptions. I've got to stop being lazy and learn to post images on this forum. As you can see here it is a known bug.
PhilR2004
Posts: 14
Joined: Mon Nov 22, 2004 4:42 pm
Location: USA

Post by PhilR2004 »

Lost Marble wrote:It is a bug Phil. Or more accurately (to make us feel a little better), a design limitation.

For many cases, layer shadows and shading work just fine. However, if you have a large object (or zoom in close on a small one) such that part of it is offscreen, Moho has to guess about what the rest of the shadow/shading should look like. If you weren't able to reproduce it, it's probably just that your sample shape didn't go offscreen in just the right (wrong) way.

I'm sure Squeakydave doesn't need to read the tutorials - he's got a very good grasp of Moho, and has used it for quite a bit of professional broadcast work.
Well, Squeakydave, I am sorry for being so rude & all. When I went to try what you were having trouble with, everything came out fine for me, but then when I went to try something else, or as Lost Marble, put it, zoom in on something that was shaded & stuff..I seen where the error was, & didn't realize it. So, it's good that this bug was given some "duct tape" until the next official update..luckily, now..I won't have the same trouble you did, Sueakydave..but then again, if I catch another bug similar to the one that was corrected, I'll let you guys know about it.

But, anyways..sorry for being rude..I didn't catch the problem until earlier this morning.

Thx.
User avatar
Squeakydave
Posts: 328
Joined: Tue Aug 03, 2004 9:44 pm
Location: UK - London-ish
Contact:

Post by Squeakydave »

No problems mate :D
User avatar
Rai López
Posts: 2242
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

...WOW! :D It works!! Really BRILLIANT! Thanks again LM, I only hope that finally you can include this in the next update, I've been asking for it during long time and I can't believe it yet, see you my face :D ...Ejem, well Only one thing (bug), when you applied Shadow/Shading effect in one layer and you put it inside a Group with Shading/Shadow effect applied too, when you render, the objects in this layer seem move arround and appear in diferent position that you see in editing view... But I still be so :)

NOTE: Drop and Internal Shadow (Shading) in Abobe Photoshop works perfectly (at least in 8.0.1) in the LM example picture, the circle must be cuted beyond image limits, if parts of circle beyond the limits exist (you create a circle in center and move LAYER then, or use a trace form), both Shadows effects work FINE.
Post Reply