Layer Shading enhancement: 'Exclude layer from shading'

Discuss ideas for new features with other users. To submit feature requests to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
anigreator
Posts: 36
Joined: Tue Mar 22, 2005 11:47 am

Layer Shading enhancement: 'Exclude layer from shading'

Post by anigreator »

Hi folks!

I'm currently working on three music videos for release in the UK, and have pretty much decided that Moho is my tool of choice. I'm generally very impressed with the features contained in the software, especially as it does not cost £6000! Kudos to Lost Marble.

There is one realatively simple feature I would like to see implemented. Let me explain:

I've just cracked how to get decent looking layer shading on my actors. I've done this by applying the shading effect to the highest level group layer for that actor. Whilst this provides a much cleaner effect than trying to shade each individual layer, the layer shading algorithm is still showing certain artifacts. This image demonstrates the problem:

Image

As it stands, the shader simply (sort of (?)) shades the (in this case) lowest right edge according to the direction of the lighting. Whilst this can be worked around using different group layers, doing so makes it very difficult to bone the image correctly, and generally creates a logical hell.

This said, my feature request is: Can we have an 'Exclude layer from Shading' checkbox, which simply means the layer, in this case the body of my three-legged-dog, is ignored by any shading higher up in the hierarchy. Once this is achieved the layer in question can have it's shading settings applied manually, which would solve all of my problems. I've already tried shading the layer in addition to the group shading, but this, as you might expect, applies two lots of shading. Some feedback would be very much appreciated.

Many thanks in advance :)...

Chris

EDIT: Added more labels to image for increased clarity.
User avatar
Lost Marble
Site Admin
Posts: 2356
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

I understand the problem you're describing, but the solution is not nearly as simple as you might think. Moho's layer shadows work pretty much like "Inner shadows" in Photoshop. They don't know anything about actual lights and such - it's a simple image filter operation.

Without getting technical about how Moho renders a picture, to change things so that a layer could be exluded from a group shadow would require major changes to the underlying renderer and would end up requiring tons of memory.

Unfortunately, this isn't likely to happen anytime soon. However, here's a possible workaround: take a look at Tutorial 4.4. That tutorial is about using images as textures, but it applies equally well to creating hand-painted shadows. Not only would this get around the problem you described, but hand-painted shadows could look more interesting than the automatic layer shadow effect.
anigreator
Posts: 36
Joined: Tue Mar 22, 2005 11:47 am

Post by anigreator »

I was trying to emphasise the 'simplicity' of the shader operation. I also know full well that Moho does not regard lighting in the same context as a 3D renderer. Additionally, your forum has a search function, which I have used, and as such I didn't double post.

In fact, I find the tone of your post condescending.
Lost Marble wrote:I understand the problem you're describing, but the solution is not nearly as simple as you might think.
So whats wrong with this picture? :shock:

Image

The solution is so stunningly simple that it took 60 seconds to set up, dosen't use a single line of Lua and preserves all of the animation and bone properties of the actor. And yes, it does precisely what I asked for in the first place: Excludes a layer from shading!
Lost Marble wrote:Unfortunately, this isn't likely to happen anytime soon.
I'm sure Murphy had a law about saying things like this.
:wink:
Lost Marble wrote:Not only would this get around the problem you described, but hand-painted shadows could look more interesting than the automatic layer shadow effect.
True, but if that were the case, surely I would be hand-painting the shadows in the first place. Whats more, you run into man-hour issues if you want to have your actor, say, walking under a street lamp.

Oh well LM, what can I say? Good software, but 0 points for customer service and imagination.... so far.

Good day.
User avatar
Lost Marble
Site Admin
Posts: 2356
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

anigreator wrote:In fact, I find the tone of your post condescending.
How so? Seriously - I work very hard here trying to help people out. The last thing I want to do is offend someone. I'm sorry if that's how I came across.
anigreator wrote:The solution is so stunningly simple that it took 60 seconds to set up, dosen't use a single line of Lua and preserves all of the animation and bone properties of the actor. And yes, it does precisely what I asked for in the first place: Excludes a layer from shading!
There's a difference though. Your solution was to change the layer ordering, or which layers shading was applied to, or maybe some combination. What you were asking for in your first post was for an option to exclude a layer from shading. In other words, to have Moho change the way it does layer rendering and compositing.

It's a very different thing for a user to change some shading options in a project vs. us reprogramming the underlying compositing engine for Moho. (I'm sorry if this is the part were I seem condescending - I really don't mean to.) There are always different ways to achieve a particular goal - just because it's simple to change shading options on a set of layers does not equate to a simple change in the underlying compositing engine. A checkbox to exclude a single layer would not be a simple change.
anigreator wrote:Oh well LM, what can I say? Good software, but 0 points for customer service and imagination.... so far.
I'm sorry you feel that way...
nobudget
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm
Contact:

Post by nobudget »

"I find the tone of your post condescending"

I reread Lost Marble's post a couple of times to check but I don't see it. Maybe you were in a bad mood or misinterpreted the message, writing is harder than speech to judge the tone without resorting to smilies and stuff :D You see? But I suggest you read some more replies by LM and you'll probably find out his intentions are always good, his replies are very forthcoming and pleasant and he is always willing to help out (I don't agree with everything but with LM I can surely agree to disagree). I actually think the service rates higher than the program...and I really like the program most of the time.

So in conclusion, LM has nothing to apologise for in my humble opinion, and if you stick around you'll see how good this community it, thanks to Lost Marble!

Reindert.
www.nobudgetvideo.com
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Post by jahnocli »

With the noted exception of one 'flamer', I've not encountered any adverse posting or condescension here -- it's one of the politest and most supportive forums I've come across.

J
You can't have everything. Where would you put it?
anigreator
Posts: 36
Joined: Tue Mar 22, 2005 11:47 am

Post by anigreator »

Ok, to clear the air, I don't wish to piss anyone off here :). The part of the original response I found frustrating was what I percieved as a no-can-do attitude. At times I might be helpful to provide as much information as possible to the userbase with the eventual goal of providing a well-rounded knowledgebase for future enhancements to the product.

In this case it took my reading a chunk the Lua scripts provided with moho to come up with a method for achieving the required effect. Whislt I'm fine with doing so, I'm not sure how many of your users are capable of this method of gleaning information that could be answered by LM in a far more concise fashion.

The solution to the original probem involved copying the actor's group layer post-boning and animation, then turning off the problem layers in the original group. These layers could then be rendered independently in the new (copy) group layer. Using a combination of this technique and the perspective shadow effect (which initially dosen't work properly btw) I've managed to create a look that has my artists saying 'Wow!'.

When I have time, which will probably be after I've finished this video, I will attempt to write a Lua script to automate this process. This bring me neatly on to my next question:

I see fron the Lua documentation that Lua supports using the C language. Does the Moho implementation of this support this fully, and if so, do LM or any Moho users have any experience with this?

The goals of this work would be to:
  • (Lua) Provide an easy method to define a 'floor' in Moho's 2.5D space. I've tried doing this and drawing in planes other than that of the camera is wierd at the mo.
    (Lua) Provide a method to place actors on said floor (think a 'ground object' button).
    (C) Provide real perspective shadows using a matrix transform, for traditional 'key' lighting i.e. lights that are behind and to one side of the camera. This might be done per-object or per-layer, whichever is the path of least resistance.
Possible? Waste of time? Get a life? What do you think?
nobudget
Posts: 412
Joined: Wed Aug 04, 2004 5:01 pm
Contact:

Post by nobudget »

User "7feet" has created quite a few Lua scripts, if anyone knows here I guess it would be him. Maybe you should ask him directly, the more people creating useful add-ons the better. This can help us non-technical folks...

Good luck,


Reindert.
www.nobudgetvideo.com
anigreator
Posts: 36
Joined: Tue Mar 22, 2005 11:47 am

Post by anigreator »

Cheers! Will do when I get a mo.
User avatar
Lost Marble
Site Admin
Posts: 2356
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

anigreator wrote:The part of the original response I found frustrating was what I percieved as a no-can-do attitude. At times I might be helpful to provide as much information as possible to the userbase with the eventual goal of providing a well-rounded knowledgebase for future enhancements to the product.
I think a lot of times, people don't necessarily want a lot of details about how Moho works behind the scenes. My intention was not to be abrupt - I was more trying to say that it isn't likely to happen in the next few days (sometimes feature requests do get implemented that quickly). Anyway, no hard feelings :D

As far as Lua supporting C extensions: Lua does support this, and technically the feature is turned on in Moho. However, I don't think anyone has tried to write a Moho/Lua extension as a C library, including us. (Well, all the Moho Lua commands are C extensions of Lua, but they're built into the host program, not as separate libraries.)

So, to address the goals:

* A floor. You could draw a floor as a regular layer, and then rotate it 90 degrees around the X axis to position it as a floor. Drawing at extreme angles can be awkward, but you could use the Orbit Workspace tool to view the scene from above so that's you're drawing the floor straight-on.

* Placing actors on the floor. If you include the restriction that the character's layer origin must be at their lowest point, then it would be quite easy for a Lua script to move the character so that the origin lines up with the floor. If you don't want to force the origin to be in a specific place, then the Lua script could examine all the vector points in the character to find the lowest one and use that for the "bottom" of the character.

* Rendering perspective shadows with a C extension. I don't think a C extension is going to help here. Moho's scripting interface doesn't allow you to tap into the rendering stage, so I don't think rendering your own shadows is possible. A regular Lua script might be possible that improves on the current Perspective Shadow script, but it would have to be done by creating vector shapes in Moho, not by rendering the shadows yourself.

Another option for more realistic shadows if you don't mind writing your own custom C code: After animating, you could export various objects and characters as separate movie files with alpha channels. Then, write a custom compositor to combine these layers with perspective shadows or other effects you might want. Sort of a mini After Effects.
anigreator
Posts: 36
Joined: Tue Mar 22, 2005 11:47 am

Post by anigreator »

Lost Marble wrote: * Rendering perspective shadows with a C extension. I don't think a C extension is going to help here. Moho's scripting interface doesn't allow you to tap into the rendering stage, so I don't think rendering your own shadows is possible. A regular Lua script might be possible that improves on the current Perspective Shadow script, but it would have to be done by creating vector shapes in Moho, not by rendering the shadows yourself.
I wasn't thinking of tapping the rendering pipeline. I got the idea from the existing perspective shadow script, where it creates a new mask layer with a pseudo-perscpective transform. (Doh, just re-read what you said... exactly that!) I've done lots of work with stereoscopic imaging and novel perspective transforms in the past using C, and was hoping I could apply some of that work to Moho. Lets hope Moho/Lua will allow it! The other Lua scripts were intended more as macro-like wrappers for doing the things you mentioned.
Lost Marble wrote: Another option for more realistic shadows if you don't mind writing your own custom C code: After animating, you could export various objects and characters as separate movie files with alpha channels. Then, write a custom compositor to combine these layers with perspective shadows or other effects you might want. Sort of a mini After Effects.
Lol! AE is my current backup plan. It works quite well, however I have characters moving along the Z axis, which pretty much kills that lighting system, unless I want to spend the rest of my life in AE that is ;) Bummer eh?
Lost Marble wrote:Anyway, no hard feelings
Likewise! :D

Cheers,

Chris
Post Reply