Mirrors ...
by Melv May · in Torque Game Engine · 05/21/2002 (12:35 pm) · 46 replies
Hi Folks,
I've been going through the SceneTraversal stuff with a view to getting reflections working within Torque.
I want to get portals working and make them more readily available to everyone. As far as I can tell, there is only a single entity that uses transform portals currently, namely the 'MirrorSubObject', a class of entity related to interiors but it is currently broken I believe.
There was a previous thread www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=2512 led by Desmond Fletcher where he was trying to get 'MirrorSubObjects' working. I believe he was partially successful. From this thread it seems that someone else, namely John Folliard has this working but the code has not come to light yet.
I think I'm now armed with enough information to tackle this problem. All I need now is an interior with a MirrorEntity defined. Now, I've not done any Worldcraft work before so I got it installed and setup and the damn thing keeps locking my system.
I don't want to fight with this thing so I would ask anyone, could you please supply me with a basic interior that has this entity within it. A couple would be preferable.
When I've got this working I can then mess with it with a view to getting scene-reflections working elsewhere.
Can anyone help me here?
- Melv.
I've been going through the SceneTraversal stuff with a view to getting reflections working within Torque.
I want to get portals working and make them more readily available to everyone. As far as I can tell, there is only a single entity that uses transform portals currently, namely the 'MirrorSubObject', a class of entity related to interiors but it is currently broken I believe.
There was a previous thread www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=2512 led by Desmond Fletcher where he was trying to get 'MirrorSubObjects' working. I believe he was partially successful. From this thread it seems that someone else, namely John Folliard has this working but the code has not come to light yet.
I think I'm now armed with enough information to tackle this problem. All I need now is an interior with a MirrorEntity defined. Now, I've not done any Worldcraft work before so I got it installed and setup and the damn thing keeps locking my system.
I don't want to fight with this thing so I would ask anyone, could you please supply me with a basic interior that has this entity within it. A couple would be preferable.
When I've got this working I can then mess with it with a view to getting scene-reflections working elsewhere.
Can anyone help me here?
- Melv.
About the author
#2
Stefan
05/21/2002 (12:57 pm)
Melv, a simple house with 3 MirrorSurfaces should be in your mailbox soon... check it out!Stefan
#3
You are correct in the sense that the MirrorSubObject inserts a Transform Portal into the scenegraph during traversal with a different transform configured in the direction of the mirror-plane surface normal.
I understand the code here, it's just that I want to be able to tweak it to enable me to learn a little faster. The main purpose here is for me to master transform portals for my future projects but if I can fix the MirrorSubObject at the same time then cool.
Also, whilst I've got my sleeves rolled up I might as well do it myself, god knows, GG have enough work on their plates as it is. :)
- Melv.
05/21/2002 (12:59 pm)
David,You are correct in the sense that the MirrorSubObject inserts a Transform Portal into the scenegraph during traversal with a different transform configured in the direction of the mirror-plane surface normal.
I understand the code here, it's just that I want to be able to tweak it to enable me to learn a little faster. The main purpose here is for me to master transform portals for my future projects but if I can fix the MirrorSubObject at the same time then cool.
Also, whilst I've got my sleeves rolled up I might as well do it myself, god knows, GG have enough work on their plates as it is. :)
- Melv.
#5
Cool beans!
Ok , Ill make one Right now and email it to ya.
Ive played with the mirror's already, and its quit easy.
there is one problem I found as it unbalance's the matrix stack somehow.
but to make one you just make a brush, then apply the point entity (Mirror) to a "Corner" of the brush.
This will turn the face the point entity is on closest proximity to, into a Mirror.
Ill make one now and email it to ya.
...
Edit:
err when I wrote this..
I swear there was only one post after yours :)
Ok I wont worry about it then.
05/21/2002 (1:03 pm)
Melv:Cool beans!
Ok , Ill make one Right now and email it to ya.
Ive played with the mirror's already, and its quit easy.
there is one problem I found as it unbalance's the matrix stack somehow.
but to make one you just make a brush, then apply the point entity (Mirror) to a "Corner" of the brush.
This will turn the face the point entity is on closest proximity to, into a Mirror.
Ill make one now and email it to ya.
...
Edit:
err when I wrote this..
I swear there was only one post after yours :)
Ok I wont worry about it then.
#6
05/21/2002 (1:06 pm)
Upps, I've simply added some mirror entities, without the brush... so probably it won't work... sorry, Melv!
#7
give it a try or should I send them to him?
05/21/2002 (1:10 pm)
Oh, do you see how to make em tho Stefan?give it a try or should I send them to him?
#8
05/21/2002 (1:11 pm)
I try to correct it, but it can't hurt if you send one, too... just in case... ;-)
#9
Some crossed posts here .... :)
If one of you guys could send me one of these things that would be great.
- Melv.
05/21/2002 (1:12 pm)
BadGuy/Stefan,Some crossed posts here .... :)
If one of you guys could send me one of these things that would be great.
- Melv.
#10
05/21/2002 (1:12 pm)
Ok, Ill send one now. :)
#12
Should be all good :)
Edit:
Dont Ever try to install 2 copies of worlcraft..
Man have I payed and Payed...
see.. I figured I got two copies of torque going..
and I wanted to make buildings for both..
and I had a custom fgd too ..
so I thought no problem ..
Ill just install an Extra Worldcraft..
Boy was I mistaking .. sure it installed ,
but it nuked the other config as the registry seems to hold Everything.
Now whenever I use it, (either copy)
It now and then freaks out and locks up my whole system :(
(hasnt happened since I needed to make a door for the door post, then again now for this)
heh..
05/21/2002 (1:34 pm)
Ok, ive sent it from my hotmail acc.Should be all good :)
Edit:
Dont Ever try to install 2 copies of worlcraft..
Man have I payed and Payed...
see.. I figured I got two copies of torque going..
and I wanted to make buildings for both..
and I had a custom fgd too ..
so I thought no problem ..
Ill just install an Extra Worldcraft..
Boy was I mistaking .. sure it installed ,
but it nuked the other config as the registry seems to hold Everything.
Now whenever I use it, (either copy)
It now and then freaks out and locks up my whole system :(
(hasnt happened since I needed to make a door for the door post, then again now for this)
heh..
#13
That's probably what's happened to me.
BadGuy: I've got your file but when I try to add it I get an bizare error "Invalid Connection ObjectID" when I try to plonk it in the level.
Stefan: I've got your file and it's a cool building but it doesn't contain any mirror subobjects. I can tell this as the resource load skips past the subobject load part. BadGuys' loads this bit but I get a crash.
Sorry to be a pain guys, an ideas?
BadGuy: You mentioned that I might need to rebuild the DIF?
- Melv.
05/21/2002 (1:42 pm)
Thanks BadGuy,That's probably what's happened to me.
BadGuy: I've got your file but when I try to add it I get an bizare error "Invalid Connection ObjectID" when I try to plonk it in the level.
Stefan: I've got your file and it's a cool building but it doesn't contain any mirror subobjects. I can tell this as the resource load skips past the subobject load part. BadGuys' loads this bit but I get a crash.
Sorry to be a pain guys, an ideas?
BadGuy: You mentioned that I might need to rebuild the DIF?
- Melv.
#14
is Does not like the fact that my map2diff made it..
I tested it and had no problem.
My map2diff has the door code in it ..
and that might have messed it up?
so simply recompile it with your map2diff
map2dif_DEBUG.exe -t ../wheremytesare -o ../whereitgoes ../wheremymapis
05/21/2002 (1:45 pm)
Ok recompile mine ..is Does not like the fact that my map2diff made it..
I tested it and had no problem.
My map2diff has the door code in it ..
and that might have messed it up?
so simply recompile it with your map2diff
map2dif_DEBUG.exe -t ../wheremytesare -o ../whereitgoes ../wheremymapis
#15
{
"classname" "MirrorSurface"
"origin" "776 -1055 166"
}
{
"classname" "MirrorSurface"
"origin" "778 -921 227"
}
{
"classname" "MirrorSurface"
"origin" "777 -866 166"
}
I guess I didn't tie them correctly to the solid brushes... maybe you could explain that again, Badguy?
How do I append these entities to the brushes correctly? Do they have to intersect? At the edges, corners, whereever? Thanks!
05/21/2002 (1:46 pm)
Melv, the objects should be there, this is from the map file...{
"classname" "MirrorSurface"
"origin" "776 -1055 166"
}
{
"classname" "MirrorSurface"
"origin" "778 -921 227"
}
{
"classname" "MirrorSurface"
"origin" "777 -866 166"
}
I guess I didn't tie them correctly to the solid brushes... maybe you could explain that again, Badguy?
How do I append these entities to the brushes correctly? Do they have to intersect? At the edges, corners, whereever? Thanks!
#16
you only have to have the mirror point intersect with the face you wish the be the mirror.
05/21/2002 (1:50 pm)
After playing around I seeyou only have to have the mirror point intersect with the face you wish the be the mirror.
#17
I recompiled the DIFF and it worked a treat. I get a plain ol' magenta face ... yum!
Thanks for you efforts guys.
- Melv.
05/21/2002 (1:57 pm)
BadGuy,I recompiled the DIFF and it worked a treat. I get a plain ol' magenta face ... yum!
Thanks for you efforts guys.
- Melv.
#18
05/21/2002 (1:59 pm)
So at least one of the 3 mirrors in my DIF should work.. the left one intersects the front face of the first brush, the middle "mirror" intersects with the upper left edge of the second brush and the right one intersects with the front right edge of the right brush... or do the brushes have to have some alpha channel or whatnot?
#19
good stuff ..
see now you need to add that door resource to your stuff :)
..
I would love for you to take a look at it.
There are two function there with your name on them :)
.. er yours or Joel Baxter, im not sure which.
*snicker*
Stefan:
nothing else is required at all..
place the center of the Point entity stradling the brush face you wish to make a mirror.
05/21/2002 (1:59 pm)
Np :)good stuff ..
see now you need to add that door resource to your stuff :)
..
I would love for you to take a look at it.
There are two function there with your name on them :)
.. er yours or Joel Baxter, im not sure which.
*snicker*
Stefan:
nothing else is required at all..
place the center of the Point entity stradling the brush face you wish to make a mirror.
#20
05/21/2002 (2:00 pm)
Melv, could you send me the working DIF, too? I'm really curious now how to set up these suckas ;-)
Torque Owner David Dougher
Pariah Games
I think that mirrors are a special case of portals (i.e. it's a camera screen looking at you.) I think the GG guys have it on their list of things to do to implement a more powerful portal rendering system and it is on as an additon to that.
You might check with them to see what their think is on the subject.