|
Spaz
|
 |
« on: November 26, 2008, 04:06:51 PM » |
|
I've got a side-view mirror working in a viewport, but I'd like it to actually show in the side-view mirror because, as you can see, the viewport will rarely (if ever) line up with the actual side-view mirror. Anybody know if it's possible to do that? 
|
|
|
|
|
Logged
|
|
|
|
|
Ron
|
 |
« Reply #1 on: November 26, 2008, 06:34:13 PM » |
|
Could you use a real time reflection on the mirror surface? I am working with cars, and this is what I had planned, but not given it a try yet though. I have done reflective building glass and floors and that worked well.
|
|
|
|
|
Logged
|
|
|
|
|
Spaz
|
 |
« Reply #2 on: November 26, 2008, 06:42:39 PM » |
|
I wouldn't even know how to start doing that. Can you give me some instruction so I can try it?
|
|
|
|
|
Logged
|
|
|
|
|
Squat
|
 |
« Reply #3 on: November 26, 2008, 06:46:39 PM » |
|
Set the detail map of the mirror surface to "reflection" and then either "planar" or "cubic" and then increase the value. 1.0 will be mirror-like.
Planar looks much nicer than cubic, but doesn't allow for multiple reflective surfaces at different angles in the same scene.
Cubic does let you have multiple mirrors at multiple angles, but looks much more pixelated.
|
|
|
|
|
Logged
|
|
|
|
|
Spaz
|
 |
« Reply #4 on: December 01, 2008, 11:11:21 AM » |
|
Thanks Squat. Now to show my ignorance (it's been too long since I've done any modeling) - the detail map is something I'll set up in Milkshape or something, right?
|
|
|
|
|
Logged
|
|
|
|
|
Squat
|
 |
« Reply #5 on: December 01, 2008, 02:19:19 PM » |
|
No, actually that's right in the editor and can be applied right to any surface of any model. The # of surfaces depends on how you export your object. It's in the same place you set up your textures and normal maps. Near the bottom.
You can do this to an editable box in the engine right away, also the lego man and soldier work with it on. You also have to make sure that other objects are set to "visible in reflections" for both planar and cubic to work.
If you don't want to use the real-time method, place the camera in the middle of the area and render a custom cubic environment map and choose that in the detail map instead.
You can also render a custom env map and set it to be used as the global reflection image. That way, new surfaces that want the same reflection merely need the detail map increased beyond 0.0 and the type set to cubic environment map. The engine defaults to use the one that you set as the global. Pretty nice feature actaully.
|
|
|
|
|
Logged
|
|
|
|
|
Spaz
|
 |
« Reply #6 on: December 01, 2008, 05:21:31 PM » |
|
Thanks, Squat. I've got it working now, but I still don't think it looks as good as the actual rear-facing camera. It also seems slower with just a few objects being set to "visible in reflections." Well, I'm guessing that's what's causing the slow-down anyway. Is there really no way to project a viewport onto a specific surface? 
|
|
|
|
|
Logged
|
|
|
|
|
zknack
|
 |
« Reply #7 on: December 01, 2008, 06:04:20 PM » |
|
Spaz, Hopefully this isn't redundant- but, with the 'addViewport' function, in the docs it does give a example of a rearview mirror-
if it's not working properly, could you use a portal to block off all but what you want to be visible via a portalobject?
Many 'triple A' titles cheat, and use a secondary camera view all together, ignoring the side mirror...
I'd think that a rearview mirror should be easy tho...
Good Luck Spaz, hopefully I helped?
|
|
|
|
|
Logged
|
|
|
|
|
Spaz
|
 |
« Reply #8 on: December 02, 2008, 11:32:20 AM » |
|
Yeah, the version that looks the best is just a modification of the rearview mirror from the docs. The trouble is it can't be projected onto a specific surface. It will always show up in the same spot it's been scripted to. Looks kinda funny when the truck rocks side to side, but the rearview mirror image stays in the same place. The reflection thing works okay, but it really slows things down because it has to render everything twice.
I don't know anything about portals, but I'll check into it.
|
|
|
|
|
Logged
|
|
|
|
|
zknack
|
 |
« Reply #9 on: December 02, 2008, 11:53:35 AM » |
|
Understandably irritating, there was a sniper rifle with zoom example back on the beyond virtual forums, that may have helped, but- as we all know, it's now gone more or less since we still cant access them- much as the fire example, the ladder, and many others that are just gone now.
|
|
|
|
|
Logged
|
|
|
|
|
Squat
|
 |
« Reply #10 on: December 02, 2008, 01:29:02 PM » |
|
As far as I'm aware, GC actually can render a camera view to a texture and you can apply that texture to any surface, I think. That was the theory I understood. I never got anything to work with it because I didn't know how to access that generated texture. This may be something we need to set up by script. It may have also been removed as it might not work properly in all cases.
If that's true, I'd like to put up a feature request to re-add the functionality. I'd really like to explore the concept of llive security monitors.
|
|
|
|
|
Logged
|
|
|
|
|
gekido
Guest
|
 |
« Reply #11 on: December 03, 2008, 06:44:04 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
Spaz
|
 |
« Reply #12 on: December 04, 2008, 04:02:56 PM » |
|
Thanks for the link, Mike. It speaks of an attached file, though, that I don't see. Any way of getting that? Edit: Wasn't logged in, so it wasn't showing me the file. 
|
|
|
|
« Last Edit: December 04, 2008, 06:56:21 PM by Spaz »
|
Logged
|
|
|
|
|
zknack
|
 |
« Reply #13 on: December 04, 2008, 04:47:52 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
Ron
|
 |
« Reply #14 on: December 04, 2008, 06:15:49 PM » |
|
I tried the download and couldn't get it to work for the life of me. 
|
|
|
|
|
Logged
|
|
|
|
|