Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Adding movies and replacing/hiding parts of a mesh/object  (Read 12194 times)

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Adding movies and replacing/hiding parts of a mesh/object
« on: November 30, 2008, 12:20:40 pm »

Uhm... this is sort of aetherial subject... more than speaking of avi materials, this is another workaround. I'll try to be as clear as possible, but the idea itself is cloudy, I hope I'll be able to explain it right.

So assume you want to add some kind of monitor to your a8r scene, and that you want it to display the frames of a movie. You would use avi materials if you could, otherwise you could do the trick using several materials and single frames from the movie.

In the attached zip there is the project and the pictures used to make the small gif animation attached separately.

The upper animation is made by sliding the "tape" in scene mode, the lower one is made with a morph target and a controller (by the way, once you set a controller for a morph target anim8or won't allow you editing it any more, at least it does so for me - clicking on its track doesn't pop up the edit key dialog).

So this approach has several negative sides.
- needs separate frames;
- needs a material for each frame;
- the tape that exceeds the viewport must be hidden by something else.

Variations of this technique can be made using an extruded regular polygon and sticking the frames to its faces, finally animating it by turning it about its center. Another variation could be to use single objects (simple planes) to store each image and then adding them all to a figure where, using one bone for each image, you can make each image to stand in front of all the others during each different frame.

The last approach is the most expensive as number of different things you need to set up in the project, but if you can automate a bit the process of manually editing a .an8 project file, this all becomes really fast. The most important advantage of using the last variation is that you don't need to hide the rest of the tape (the frames hide each other). In other words you can fit the animation in a flat plasma monitor inside of your scene ;)

Here I come to the most interesting issue for me. The blue boxes sideways in the animation should hide the rest of the tape.

What if I could tell it that everything falling inside of that blue boxes must not be displayed/rendered?

It would need something like a material attribute tagging it as "empty space", "transparentizer" or whatever, and its result would be to ignore everything that falls inside of it. I think that this check could be done using the same "odd/even" test used when raster-filling an irregular poligon.

More or less in the same way, it would be a very useful animation feature to be able to set a material as an object exchanger.

Once again this is not so easy to explain, but I'll try.

Take the disc cutter I put in the WIP forum as example, and imagine the same work made in this way:

- object1: one object representing the white block.
- object2: one object (a figure or a morphed object) representing the hollow block and the disc.
- object3: one object, eventually a simple plane, set with a material tagged "changer" or whatever.

I put object1 in the scene and I put object3 between object1 and the camera.
I set a property of object3 telling it that object1 must become object2.

Now, when the renderer scans the lines of the viewport, it can tell if it is intersecting object3. If it does, it simply replaces object01 with object02 and renders that pixel as if the objects were actually exchanged.

I thought that this could lead to several problems. First of all, if object2 is not truly into the scene, it would share and use the tracks of object1. Fine until you don't want to use two figures and different animations.

I went to imagine this variation. Both object1 and object2 are put in the scene, and in the same spot of the scene. Object3 has two different special materials, one tagged A and the other tagged B. When the scanline intersect material A it displays only object1 and visaversa, crossing B only object2 will be visible. This is sort of adding a special kind of object to the whole system, as you'd need to tie object1 to material A *inside of object3 properties*.

I hope I've made it clear enough even for those who are not so accustomed to anim8or finesses and coding in general. I could make it all more transparent with some diagrams if needed.

« Last Edit: November 30, 2008, 12:24:33 pm by Francesco »
Logged

NickE

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #1 on: November 30, 2008, 07:41:55 pm »

Quote
The upper animation is made by sliding the "tape" in scene mode, the lower one is made with a morph target and a controller (by the way, once you set a controller for a morph target anim8or won't allow you editing it any more, at least it does so for me - clicking on its track doesn't pop up the edit key dialog).

To be able to edit the morph controller, you can click on the track for the controller, then bring up the key graph editor (the icon that looks like a graph) and double-click on the name.  That will bring up the "Key Value Editor" dialog box that you are referencing above.

I hope that helps.

Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #2 on: November 30, 2008, 09:33:29 pm »

Yes that worked NickE, thanks for the indication.

I've made another little thing that might come useful. It's a three digits framecounter, already textured, set up and attached to the lower-right side of the camera's viewport.

I made it with rotation controllers and three 10-sided discs just like car's milecounters. To take less space on the screen I packed the three discs horizontally - even if it isn't physically possible it does the trick, I think that nobody will argue ;) I've also given it a light green emissive color, useful if used in a dark scene.

Always looking forward for your comments, I'd like to know if you think the features imagined above could be of use or - more important - if you find them handy as solutions.

Cheers,
Francesco

Project and textures in the zip file.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #3 on: December 16, 2008, 08:22:12 pm »

Very clever!
Logged

headwax

  • Sr. Member
  • ****
  • Posts: 600
    • View Profile
    • Headwax's Website
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #4 on: December 17, 2008, 05:16:49 am »

Great idea francesco.

Nice lateral thinking. :) The framecounter is handy occasionally for critting avis.

Cheers
Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #5 on: December 19, 2008, 01:12:40 pm »

Thank you guys, although I'm not sure about what you are speaking about.

It is half of my fault, because here in this thread I've presented two things:
- some ways to get around the missing animated materials;
- an idea about a new feature (the "exchange objects" view-portals made with special objects/materials);

The thing that interests me the most is the latter, although I find the former to be useful too.

Well, in any case, the idea is there.
Logged

headwax

  • Sr. Member
  • ****
  • Posts: 600
    • View Profile
    • Headwax's Website
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #6 on: December 19, 2008, 10:10:56 pm »

I like it all :)

After your suggestion I made a circular object with a series of flat faces, dteached all the faces so they were seperate meshes, applied a series of jpgs which represented a simple animation, put the mesh behind a screen so that only one face showed at a time, revolved it in scene mode, and presto. Works fine for an interesting animated background effect.

http://en.wikipedia.org/wiki/Praxinoscope

above for when anim8or gets light through transparency

you could also use a flip book technique

Logged

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #7 on: December 20, 2008, 02:16:18 pm »

It's nice to see workarounds implemented, glad to see that you had a try at that.

The praxinoscope is cool, and, would you guess? It reharsed another old idea in my mind, thank you for the pointer once again!
Logged

Boywonda1

  • Jr. Member
  • **
  • Posts: 83
  • “Imagination is everything."
    • View Profile
Re: Adding movies and replacing/hiding parts of a mesh/object
« Reply #8 on: December 29, 2008, 08:01:06 pm »

The hiding thing would be coo :)l.
My idea is placing an animatable black and white linear gradient on a material to create an alpha mask on the material and hence hiding part/half of the object.
« Last Edit: January 14, 2009, 06:39:01 pm by Boywonda1 »
Logged
"When I examine myself and my methods of thought, I come to the conclusion that the gift of fantasy has meant more to me than any talent for abstract, positive thinking.” -Albert Einstein