Author Topic: What is the best way to mirror an animated object?  (Read 2324 times)

Offline iagofg

  • byte
  • *
  • Posts: 12
    • View Profile
What is the best way to mirror an animated object?
« on: October 03, 2011, 12:25:37 am »
Hello,

I want to mirror an animated object in the axis X, but it is there no scale(x,y,z) (with three parameters) function.

I saw I can change the rotation matrix so I'll try that way, but I'd like to ask anyway because the object is animated so I don't know if there is some better-way to do it :D

If I understood ok the rotation matrix is applied to the object and then the transformation one... is this correct?

Thx a lot!

P.D.: Soon we will post the project information :D

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: What is the best way to mirror an animated object?
« Reply #1 on: October 03, 2011, 11:38:27 am »
You can mirror it by tweaking the rotation matrix and inverting the culling. I did this to create the reflections of the dragon in the An3DBenchXL-benchmark. However, this will affect lighting in a way that the mirrored scene will be lit in a way as it would if it weren't mirrored, i.e. not like a mirrored view of the object above but like a second object living underneath the floor. If that is a problem, you would have to modify the light source location too. I didn't do that in the mentioned scene, because i though that nobody will notice it anyway.