PROBLEM WITH DOOR IN A 3D ROOM

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
CHIO
Posts: 178
Joined: Sun Aug 15, 2004 5:00 pm
Location: CORDOBA-ARGENTINA

PROBLEM WITH DOOR IN A 3D ROOM

Post by CHIO »

Hi: :?

I would like if somebody can give me a help with 3d. I made a room in 3d with a door opening. The problem is the door is overlaping by the right door wall. The door´s position (x,y,z) is OK. Any suggestion ? I would like your help. :lol:

The moho´s file is here:

http://www.freepgs.com/chio/files/

click right click mouse over the file room.moho and save as in your PC.

CARLOS BERGOGLIO
CHIO ANIMATION
http://www.freepgs.com/chio
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

What I've found so far is that layer ordering in 3D space is determined by the distance of the layers origin from the camera. I did a test on the file, moving the floor layer origin back behind the door in the overhead view, the same for the wall the door is set in and the doorway opening in the left view. When you change the layer origins on layers that are already translated in 3D space the layers end up in unexpected places, so you have to re-translate them back into position. After I did this, it works fine, modified file here.

I figured this out assembling a number of different building exteriors. I set a number entire city blocks, with streets and sidewalks and front stoops, for my characters to be able to walk around in. I wanted to be able to see the buildings from just about any concievable angle (including looking down from over the rooftops, and it took me quite a while to figure out the trick with the layer origins. I kept having walls, the sides of the front steps, whatever, appear and disappear for no reason I could figure out. Until I did. The origin for the entire layer determines it's "distance" from the camera, so you have to plan your 3D construction and shots with that in mind. As an example, here is one of the buildings I did. If you use the "Orbit Workspace" tool, you'll see that you can look at it from just about any angle without wierd things happening. I've been meaning to put opening doors into them, so this was good timing. I also want to put in at least an interior hallway, but all in good time.

And just as a note, anyone can feel free to use the setup on the building if you like, as long as you change it enough to make it your own. Happy animating.

--Brian
User avatar
CHIO
Posts: 178
Joined: Sun Aug 15, 2004 5:00 pm
Location: CORDOBA-ARGENTINA

Post by CHIO »

7feet: thanks a lot !!! :D

You have finded the solution for my first 3d test.
The building 3d is very cool.

MOHO is great...

Thanks.

Carlos Bergoglio
www.freepgs.com/chio
CHIO ANIMATION
User avatar
CHIO
Posts: 178
Joined: Sun Aug 15, 2004 5:00 pm
Location: CORDOBA-ARGENTINA

Post by CHIO »

Hi:

With 7feet´s help finally I could open the door. But its posibble to
entry a character with the door, at the same time the door is opening ?

Thanks for your help. :D

Regards,

Carlos
CHIO ANIMATION
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

In this case, masking. But first, you have to make an opening in the wall shape. I copied the points in the "hueco" layer, and copied them into the "pared_izq" layer, making sure that the points were all inside the points for the wall. Then I deleted the Shape already on the "pared_izq" layer. Select all the points on the layer ( the 4 points for the wall, and the 4 points for the doorway just a little inside the wall, and create a new shape with the same settings as the old wall shape. This will make a new shape of the wall with a hole in it that you can see through.

The you have to make the mask. I made a copy of the "pared_izq" layer and deleted all the points. This was so I had a new layer in the the same place in 3D slpace as the wall. Then I drew a rectangle that covered the wall from top to bottom and started at the side of the doorway closest to the camera and going to the front of the room.

I set up the masking my setting all layers to "don't mask thid layer" except:
1. the group (cube) layer, to "Mask On - Reveal All"
2.The "pared_izq mask" layer, to "Subtract from mas, this layer will be invisible.
4. The character, to "Mask this layer"

I put in a character. I was bored. I also played with the "techo" layer so it had fills. I played with some of the 3D camera bits, and found that I had to adjust the Origin point of some layers or some part would disappear behind others when you moved position.

Here is the file HERE
.
User avatar
CHIO
Posts: 178
Joined: Sun Aug 15, 2004 5:00 pm
Location: CORDOBA-ARGENTINA

Post by CHIO »

Hi 7feet !!!

Thanks a lot for your time. I seen your solution yesterday, but I havent any time to reppy. It is wonderfull.

I am a hobbist, I am 35 years old. I learned all with this method: test and error, with a tutorial, etc. When I was a child (15 years) I have my first personal computer and I learned programation with this method, but now the forums are very important to share examples, experience, etc.

Thanks a lot,

Carlos Bergoglio
CHIO ANIMATION
Cordoba, Argentina
www.freepgs.com/chio
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I'm a hobbyist animator, too, at least in 2D. I've done some prfessional stop-motion animation. I'm 39, and this is the first time I've thought seriously about doing 2D animation, pretty much because of Moho. My first computer was a Timex-Sinclair, about the same age as you got your's, I think, and so slow and hard to use (saving onto tapes and the power would always cut out when you were typing, making all you're programming work go away), but still a computer. The scripting in Moho is making me learn to program again, which is a good thing.

I did lots of trial and error. I agree that forums like this are very important. I've learned a lot of things here, and can help people that I would probably never meet if it wasn't for this. Very Cool.

Glad I could help.

--Brian
User avatar
Barry Baker
Posts: 342
Joined: Fri Aug 27, 2004 6:58 am
Location: UK
Contact:

Post by Barry Baker »

This is really interesting, and it has suddenly become something I need to do. 7feet has really helped me with this. I'm still struggling with trying to order all the layer origins so that they render properly, and now I've found a new puzzle.

I want to have an opening door with a knob. Trouble is, I want to set the knob a little in front of the door, and rotate to always face camera so that it looks spherical from any angle. I have moved the origin of the knob to its centre, and put both door and knob into a group layer called door. I moved the origin of this layer to where the door's hinge would be, and now I can animate it opening and the knob will stay with the door.

However, the knob does something strange: it seems to rotate about an unknown centre, shifting itself through and away from the door as it opens.

I have uploaded a test file which you can download to see what I mean. It's at: http://www.barrybaker.uk.com/moho/door_test1.moho

And here is a still image from it:
Image

This door has two identical knobs - identical except that one rotates to face camera, and the other doesn't. You can see it open just by moving along the timeline. The second knob stays with the door, but looks flat, while the first goes its own way, but looks solid. Any answers? (I know, I could use an actual 3D knob, but I'd like to solve it in 2D if possible
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 »

Barry, this does seem to be a bug in Moho. We'll have to look into it and figure out the problem.

However, in the meantime there is a workaround. Unless your door is going to be opening and closing many, many times, it would be pretty easy to just manually rotate the doorknob to face the camera. No need to use a 3D model for this.

And if the door is supposed to open and close a lot, you could set that up as an action that includes both the door's movement and the knob's rotation.
User avatar
Barry Baker
Posts: 342
Joined: Fri Aug 27, 2004 6:58 am
Location: UK
Contact:

Post by Barry Baker »

OK, I'll get around it. Thanks.
Post Reply