Author Topic: Mirror, mirror... How?  (Read 559 times)

Legacy_3RavensMore

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +0/-0
Mirror, mirror... How?
« on: August 24, 2014, 08:44:21 pm »


               

Could someone tell me, step by step, how to mirror a mesh?  Forgive me if I don't know the proper terms, but I've gotten the mesh to mirror, and stay where I put it in game, but the surfaces seem flipped--inside is now out.  I'm stumped on this one...



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #1 on: August 24, 2014, 09:02:41 pm »


               

In gmax, simply use the mirror modifier. It will flip vertices and faces over the plane of your choice. It will not flip normals.


 


Ut1ar10.png


 


So basically, if you want to create a whole body out of a half a body, clone the half you have and mirror it over a plane (usually X) at a position equal to the edge closest to your chosen axis (usually the center of the sternum). If your half model is butted up against x=0, and all points do not cross into x<0, then your mirror should match up with the points on x=0 and you can easily weld them.


 


If you are using something other than gmax, and face normals are flipped, find a modifier which flips them back. Gmax has a face normals section right on the mesh rollout, or a modifier which does the same. To set the faces to the opposite, choose "flip", otherwise choose "unify", followed by "flip" if needed.


 


In Gmax, after you flip the object, you can select the first, and then choose to "attach" a mesh, then simply select the cloned part. It will then take the cloned section (as is with any modifiers on it) and add it as an element into the original. This will retain the rotation and position of the first object, not the clone.


 


If you need clarification on this, or pictures, I can do that, just ask.



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #2 on: August 24, 2014, 11:29:04 pm »


               

Dang, I thought this thread would answer a question that's bugged me since I played HotU for the first time (although I suspect the answer will be no). Is it possible to make mirrors that actually reflect in NwN and don't just look silvery?


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #3 on: August 24, 2014, 11:39:14 pm »


               

I think to do that, the mirror would have to be in front of a clone of the object, and that clone would have to mimic, exactly, and in real time, with the original object. I don't think that is impossible, but on a network game, that might be really hard to accomplish. It would take a butt-load of scripting, for very little return.


 


The alternative would be to create textures on the fly with some complex math by adding a new external layer to the engine, of which I have no idea who would bother.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #4 on: August 24, 2014, 11:43:21 pm »


               

I bet you could fake it by making a cube map which appeared similar to various characters. You could make an environment file for each scripted character that was going to look into the mirror (in like a cut scene), and then apply some NwnCx style real-time environment map switchers to that object.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #5 on: August 24, 2014, 11:44:52 pm »


               

Trying real hard to not just say "no". That tends to destroy creativity. The opposite may be extremely hard, daunting, etc., but is at least not impossible. '<img'>



               
               

               
            

Legacy_3RavensMore

  • Hero Member
  • *****
  • Posts: 1153
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #6 on: August 25, 2014, 02:14:20 am »


               

Oh jeez, I didn't see the mirror modifier.  Why I didn't see it, I've no idea.  Thanks again, MD. 



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #7 on: August 25, 2014, 02:49:24 am »


               

<giggles>



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #8 on: August 25, 2014, 10:21:55 am »


               

@MD So from what you said I am guessing that while a reflecting mirror is probably beyond the scope of the engine a magic mirror with a face in the glass (Mirror, mirror on the wall...) is doable by someone who knows what they are doing?


 


TR



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #9 on: August 25, 2014, 01:12:33 pm »


               

we could say that, yes. If that is all you really needed, you could rig a mirror to be a non-moving creature-placeable. Then you could script in F-type animation sequences which play a different multi-frame texture single-emitted from the model (I can think of some issues already), such as a face cut out from any video, even your own. You could build a fairly complex magic mirror, or even a Star Wars style holographic communicator system. You could do stuff like Xur's intrusive floating head from The Last Starfighter.



               
               

               
            

Legacy_NWN_baba yaga

  • Hero Member
  • *****
  • Posts: 1944
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #10 on: August 25, 2014, 02:15:22 pm »


               

As i tried out NWshader i had many bugs and one bug was a mirror effect. IT realy worked like a mirror shader even i had nothing ticked on in NWshader to create a mirror. Random walls of the city tileset mirrored everything and it was all just a buggy mess of mirrors... he. Some one from the old PQ Team did a cathedral tileset with a shiny floor that was basically transcluent and behind it he just duplicated the whole geometry. Looked great ! So a faked mirror works with static geometry thats for sure.



               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Mirror, mirror... How?
« Reply #11 on: August 25, 2014, 02:55:59 pm »


               

So then technically we already have something which could be modified to create that extra layer. If we could figure out what the error was that caused the mirroring on the other surfaces, we could use it to our advantage. Maybe code in additional uncompiled model keys which the layer could pick up. I would enjoy that immensely.


 


Of course I would also enjoy a way to make actual shadow clones, mirror image, and simulacrum objects without having to script them in. I hate all the work that went into those.