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.

Work in Progress / A Stealth Effect

Author
Message
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 24th Dec 2004 02:16 Edited at: 27th Dec 2004 01:00
I made this effect to look like the ninja suit in Metal Gear Solid.
It works pretty well, even if it doesn't look that much like the ninja suit, it looks just like the object is made of glass.

It doesn't need any special 3D or anything. It's not a shader!

Screenies
The object is quite hard to see in some of them:


Demo
Here's a demo to see it in action (C + P link):
http://www.geocities.com/ntnod/Glass.zip

Code
Here are the functions you need to use to effect:



You can put them in a separate source file then include it in the IDE.

- You need to call SetupStealthEffect() at the top of your program.
- You need to apply the effect to the object with SetStealthEffectOn( ObjectNumber )
- You need to call StealthEffect() every loop.

Here's an example program (crap but no media required):


It uses camera 8 and image 2000 so you can't use those in your game.

Have fun.
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 24th Dec 2004 03:01
Once again great effect Mr. K! It does work people!

DRAGONFIRE STUDIOS
Lead Programmer
(The Studio being my front room)
LordoFire
20
Years of Service
User Offline
Joined: 14th Feb 2004
Location: United States
Posted: 24th Dec 2004 03:15
COOL! Thats, pretty awsome man, nice work

When it comes to programing, I'm on fire!
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 24th Dec 2004 05:24
Here's another shot to show you don't have to use it to make stealth effects.

You can still texture the image to make it look like a coloured glass object.

Attachments

Login to view attachments
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 24th Dec 2004 15:11
Dame, keep getting "Compressed File or invalid or corrupted" message.

Looks pretty sweet though!

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 24th Dec 2004 16:54 Edited at: 24th Dec 2004 16:55
I re-uploaded it.

Try here:
http://www.geocities.com/ntnod/Glass.zip

There's a demo up there that shows the effect without any media.
You can just drop the functions into your own project.
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 24th Dec 2004 18:53
Im doing just that! Oh and a tip if you want to make a humanoid invisible model him/her/it out of a deformed sphere it looks much better that way!

DRAGONFIRE STUDIOS
Lead Programmer
(The Studio being my front room)
DEANO
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United States
Posted: 26th Dec 2004 09:02
I really want to see this but can't download,"Compressed File or invalid or corrupted".


Deano

"When I examine myself and my methods of thought, I come to the conclusion that the gift of fantasy has meant more than my talent for absorbing positive knowledge."
-ALBERT EINSTEIN
Major Payn
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 26th Dec 2004 10:44 Edited at: 26th Dec 2004 10:46
Looks good, I wish it worked in DBC

Guns arn't the problem, people are the problem, shoot all the people and guns arn't a problem anymore.
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 27th Dec 2004 01:02
I updated the download link.

Remember this example works without any media:

Avan Madisen
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: The Castle Anthrax
Posted: 27th Dec 2004 05:24
I looked through the code you posted, Chris k, and you're using the command:

set sphere mapping on

I'm just wondering, is sphere mapping in DBPro done with shaders, or is it something else?

The reason I ask is because my previous system had major problems running the sphere mapping correctly and I assumed it was because the system didn't support shaders.

I don't suffer from insanity:

I enjoy every minute of it!
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 27th Dec 2004 17:18
It's not a shader.

All it does it scroll an object's texture so that it is the opposite to the camera's orientation.

It's what old games did for reflections, like Barney's helmet in Half-life.

I've never seen a 3D card that didn't support it.
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 27th Dec 2004 17:44
Still getting the same error dude, what's the filesize? Geocities puts a limit on what you can upload and it loads in complete files if you go over sometimes.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Avan Madisen
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: The Castle Anthrax
Posted: 28th Dec 2004 02:03
Quote: "It's not a shader."


Fair enough, my old system was running a Voodoo 5 card with dodgy drivers to make it at least run a bit better on Directx 8. The problem I had was the edges didn't work correctly, it seemed to find the edge of the texture it was using for the sphere map too early and clamped the pixels. Oh well.

Nice abu, I mean use, of the available effects!

I don't suffer from insanity:

I enjoy every minute of it!
Vues3d on Kalimee
20
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 4th Jan 2005 16:00
Tryied your code & I really loved it!!!! Works fine & it's really usefull.
I was wondering about a code like this because I was planning to make a level where sphere glasses are the main enigma... as I don't handle quite well shaders I was a bit afraid that my idea will never get realized.

Thanx a lot for sharing!! & thanx for the work you've done!!!

Guido
http://www.vues3d.com
Calevra
20
Years of Service
User Offline
Joined: 9th Mar 2004
Location: Netherlands
Posted: 4th Jan 2005 19:21
wow nice effect dude..you can also use this as rain on the camera..like in Gta vice city..
keep up the good work
Essence
22
Years of Service
User Offline
Joined: 12th Oct 2002
Location: The Netherlands
Posted: 5th Jan 2005 02:57
Is there a possibility to use this effect on more than one object?
Cuz, if this is possible, you can create this effect for rain like oZmania said.
ALPHA ZERO PRODUCTIONS
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 5th Jan 2005 13:27
but u will have to make it that the drop oozes down on the camera

NEW WEBSITE ONLINE (best viewed with FireFox)
XboxLive Gamertag: AZP
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 6th Jan 2005 00:20
As it is you can only have it on one object at a time. You can change what object it is dynamically by calling SetStealthEffectOn() during the loop.

In theory you can have it on 8 objects (DBPro allows 8 cameras I think). But that means you can't use the cameras for other stuff like cool security cameras that actually show up on a screen.

set camera to image is the greatest command.
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 6th Jan 2005 01:34
Can you upload the file again. I too am getting the CRC error. Also what version of WinZip are you using?

-This...is my boomstick!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Jan 2005 10:46
Quote: "It's what old games did for reflections, like Barney's helmet in Half-life."


Half-Life uses Sphere-Mapping for reflections with a simple metalic looking texture. Glass ended up just being a ghosted version of that. nothing particularly special, your version is simply the same thing using an inverted camera to get a R/T Effect.

I do the same thing for Water and Glass, a -Normalised Vector for the Camera position and depth to provide the illusion of a reflection with a spheremap.
It's a nice cheap effect, that I've covered a number of times in the DBP forum for those asking for water. Does the job.

As for DBP's Sphere Mapping being shader derived, well it shouldn't be.. but that said neither should Cube Mapping or Bump Mapping, but they are; so god knows. I don't have any non-shader cards anymore I could test with I'm afraid.


Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 7th Jan 2005 04:18
You can't use this for reflections.
Or at least, I don't know how to.

Can you please share the code for reflections?
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 8th Jan 2005 03:55
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 8th Jan 2005 06:46
Quote: "Can you please share the code for reflections? "


I'd do it by generating a sphere map from a separate camera.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 9th Jan 2005 00:34
Another camera facing camera 0 with a big fov?

That might work.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 9th Jan 2005 22:23
FOV just needs to be 135degrees, that would give an accurate Spheremap... provided your not actually using it on a sphere
As I said the reflection Angle is just -Normal, you then alter the angle based on how much reflection you need...

so -Normal * Dot3( Eye ), i'll see about knocking up some code once i've finished with what i'm working on. shouldn't take too long


UberTuba
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 9th Jan 2005 23:12
i'm suprised at how fast the function is, it can can do massive fps, despite the continual retexturing(which dbp is or was traditionally bad at).

Congrats

I'm Right and Reality is lying
Bring Back the 20-Liners!!
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 10th Jan 2005 03:29
well darkbasic is slow at retexturing object this object just changes the images data in the ram so there wouldent be mutch of a slowdown.


Login to post a reply

Server time is: 2024-11-16 21:49:44
Your offset time is: 2024-11-16 21:49:44