Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / A perfect mirror.

Author
Message
The Cubist
21
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 29th Nov 2003 00:33
Use the arrows to move the ball around. I tried to use set camera to image but it distorts the image too much. Hope you guys like it.
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 29th Nov 2003 22:16
thats very cool, might be a bit hard to implement in a big 3d world though if you need 2 of everything


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 30th Nov 2003 01:15
Very interesting.



A book? I hate book. Book is stupid.
genius
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: Utah, USA
Posted: 30th Nov 2003 04:17
Good Job!

Be happy, tomorrow is another day
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Nov 2003 04:44
Quote: " thats very cool, might be a bit hard to implement in a big 3d world though if you need 2 of everything"


For us, yes. In DirectX you would just flip the world geometry. This is what the reflection shading command does (roughly speaking) btw.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]
Jaze
21
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 5th Dec 2003 22:13
Nice Now a Mirror Fun House PRoject is bound to come next

-=/Jaze/=-
The Dark Padawan
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: USA!
Posted: 6th Dec 2003 19:01
can you make an exe cuzz it doesn't work in DBC

"Nintendo GameCube is the best"
Current project: Xtreme RC racing
Current progress: 15% done
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 12th Dec 2003 07:45 Edited at: 12th Dec 2003 08:16
Mirrors are more fun then Television!

Wait, did you say you got the "Set Camera to Image" to work? I keep getting a "Cannot grab image due to illegal area" error. I Don't suppose you still have the code?


"Computers are useless they can only give you answers."
The Cubist
21
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 15th Dec 2003 01:29
This is one of my first rendering camera to image progs. It's a bit slow but it gets the job done>
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 15th Dec 2003 02:25
did you perfect our old one mate ?

http://darkbasic.thegamecreators.com/?m=forum_view&t=10046&b=6
HZence
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 15th Dec 2003 04:27
Nice job, very cool


Team EOD :: Programmer/Storyboard Assistant
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 15th Dec 2003 14:03
Doesn't look distorted to me. Looks really, really good.


"Computers are useless they can only give you answers."
The Cubist
21
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 16th Dec 2003 00:11
Distorted may not be the correct terminology. Let me explain, as an object gets closer to the camera the image that is reflected gets larger so it doesn't make for a good mirror. In order to get an accurate reflection from a camera image, the camera used for the reflection has to be the exact distance from the mirror as the primary camera(the viewer) but behind it. This poses a problem because you cannot make the camera see through objects. If anyone else has any ideas let me know this is as far as I got with this before I gave up using set camera to image.
orv
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Chicago, IL
Posted: 19th Dec 2003 19:06
@The Cubist - what if the mirror is on a plain object that's culled? You could put the camera behind the plain object on the culled side. also, if the mirror is on a wall, the walls could be culled plains too! thus if your camera is in front of the wall/mirror, you see the wall/mirror. If a camera is behind the wall mirror facing back, it won't see the wall/mirror but just the rest of the "room."

I hope I make sense and this helps.

If you aim at nothing you'll hit it every time. 806mhz AMD Athlon Processor. 384MB memory.
Windows XP Home Edition. RADEON 9700 Pro graphics card. - editor.exe=1.0.6.1 - DBPCompiler.exe=V1.05
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 20th Dec 2003 13:16
That's what I thought as well except what happens if it's a wall you can walk behind? I guess you could uncull it because then you don't need to see the mirror.


"Computers are useless they can only give you answers."
orv
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: Chicago, IL
Posted: 20th Dec 2003 17:40 Edited at: 20th Dec 2003 22:14
when you walk through the area to get to the area "behind" the wall, you could unhide a wall facing towards you.

another possibility is to create an exact copy of the room somewhere way out in the 3d space that will never be visited and not have the wall where the mirror is at all. have the mirror camera there. So you think your looking at the same room but your looking at a camera image of a room that looks exactly the same!

If you aim at nothing you'll hit it every time. 806mhz AMD Athlon Processor. 384MB memory.
Windows XP Home Edition. RADEON 9700 Pro graphics card. - editor.exe=1.0.6.1 - DBPCompiler.exe=V1.05

Login to post a reply

Server time is: 2024-11-27 17:13:52
Your offset time is: 2024-11-27 17:13:52