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.

Author
Message
BlackWolf
23
Years of Service
User Offline
Joined: 21st May 2003
Location:
Posted: 21st May 2003 17:17
Small Question :

how to make a water effect with reflection ? I can't apply a texture at the same time I apply a reflection shading effect.

Thx in advance
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 17:56 Edited at: 21st May 2003 17:56
Patch 5 will give you the ability to set alpha and colour properties of reflective surfaces.

Other than that, go to RGT and do a search for "Shiny Car", using memblocks to control the normals, you could make the water look shiny.

Another option would be to set up a camera where the water is (pointing out of the water), use SET CAMERA TO IMAGE to texture the water with the camera's vision and then use the SET BLEND MAPPING ON command to blend the reflection image with a water image. I think the Blend Mode parameter for SET BLEND MAPPING on is 3 or 4.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
BlackWolf
23
Years of Service
User Offline
Joined: 21st May 2003
Location:
Posted: 21st May 2003 18:24
Thank you I didn't understand why a texture didn't work with the Reflection Shading effect, at the same time

RGT like Real Game Tool ? because I don't find Shiny Car on

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 18:30
Yes Real Game Tools.

Lee says that applying textures to reflective surfaces is impossible. Assuming he implemented it in the way I think he did, then according the NVidia dev. docs this isn't true??

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
BlackWolf
23
Years of Service
User Offline
Joined: 21st May 2003
Location:
Posted: 21st May 2003 18:38
Huh ? you said in "patch 5 we can set alpha and color properties of reflective surface" ?? (sorry for my bad english..french lol)

BlackWolf
23
Years of Service
User Offline
Joined: 21st May 2003
Location:
Posted: 21st May 2003 18:42
and have you got an idea for my problem (see the post : Hi ! Questions and problem ) on the forum please

thank's in advance

OzBot
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: Sweden
Posted: 21st May 2003 19:37
How about two objects one has reflection mapping and the other is Textured and ghosted. Place the object with mirror reflection slightly below the ghosted textured object.
The only problem I can see is that it wont show whats at the bottom of the water if thats what you want to do, however if thats not a requirment then that should work..Haven't tried myself.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 21st May 2003 19:37 Edited at: 21st May 2003 19:40
i have a feeling you stopped mid sentance Rob lol
but yes thats true (kinda)

depends on his implimentation of the Reflection, if he is using a Reflection Surface or if he is using a Shader Reflection.
If he's using a Shader then it is possible, but possible is about as far as i'll go.
With DBpro's shaders in thier current state i'd have to say it would be close to impossible to add a texture.

no doubt Lee is trying to keep the Reflection Command to be as widely available as possible on as many cards as possible - which without one capable of shaders i'd say yes it is impossible without setting up a matrix projection layer, but then that'd be slow bloody slow wouldn't even be worth it - you'd upgrade to a better card just to run it, and if you do that you might as well just use the shaders (catch22 hehee)

any clearer?

[edit-]
that isn't a bad idea Ozbot, would double the polygon count and you'd have to make the textured object smaller - else it'd be included in the reflection

that aside, you could always do a blend - i'm sure there must be some ways to get the current surface texture data using a DLL, you then blend that with a texture in a buffer and texture the object.

so you'd end up with a 2pass routine,
1st - Reflection Map
2nd - Blend Texture & Texture Model

not sure if making the Reflection instance on and off the object all the time would work, but would be worth a try.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 21:34
Reflections don't use shaders IIRC, as I can run reflections on a card with no shader support. Reflections CAN be done with shaders, but unlike some other effects, I am pretty sure that shaders are not used currently for reflections.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 21st May 2003 22:07
well there's your answer then, its probably using a Reflection Surface which would make it impossible to have a texture (Dx doesn't support it)

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 21st May 2003 22:15
Quote: "This command will set the specified object to use reflection. Use this command when you want to give your object a reflective quality,
though not all 3D hardware will support Vertex Shaders which are required to produce this effect."


i think that is a Vertex Shader effect

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 21st May 2003 22:54
"which would make it impossible to have a texture (Dx doesn't support it)"

Would OpenGL support it? - The NVidia dev docs were mainly OpenGL centric, although stating that everything was DX portable.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 21st May 2003 22:57
well last time i checked DarkBasic Professional used DirectX 8.1

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 22nd May 2003 00:00
I know that - but are reflections + textures ONLY possible in OpenGL?

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 22nd May 2003 00:49
And also ghost matrix on makes it even more annoying.

Life is a terminal disease.
You never survive it.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd May 2003 03:31
well the DirectX Reflection Surface & OpenGL Reflection Matrices are very different - although you could adapt the OpenGL one for DirectX use, the OpenGL ones are actually hardware made and oftenly specifically developed per card (which can get annoying)

Using a shader is the best option right now, most cards support vertex shaders 1.1 anyways - its the decent 2.0 series that are so limited

though you know you could set a reflection on the object then use a Multitexture Blend to then overlay the actual texture.
It might not be quite as good as the other way around, but atleast you'd have the effect no?

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
OzBot
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: Sweden
Posted: 22nd May 2003 03:33
Quote:
"that isn't a bad idea Ozbot, would double the polygon count and you'd have to make the textured object smaller - else it'd be included in the reflection"

maybe it wouldn't reflect the textured object if the reflective object is on the side of the textured object that doesn't get drawn, if you now what i mean..


This side of objects get drawn

------------ Water textured ghosted object
============ reflective Object

Obviously if you placed a cube in front of the reflective texture it would draw the cube. You would have to model a one sided plain of some sort.
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd May 2003 03:42
lol, i guess ... could turn backface culling off, but i'm not sure how you'd cull the faces on the side which are in veiw from a certain angle.

but then i'm too tired to think of a way.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
aprilfan
23
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Hell
Posted: 22nd May 2003 06:56
Anyone seen the kickass tekken 4 water? Thats what I want to create its got bump mapping, light and object relection, transparency and it becomes simpler as you move into the disance so it's not a burden. Cool neh? So if someones seen it how would I create that? Sorry to steal the post but this is kinda what your asking... is it a vertex shader? Or a lot of complex effects all molded into one type of super water far beyond anything any of us could ever do specifically me?

The Great Schism.- The Earths reaction to Heavons invasion.
BlackWolf
23
Years of Service
User Offline
Joined: 21st May 2003
Location:
Posted: 22nd May 2003 11:28
Today, we can't set a reflection shading on an object, and, at the same time, apply a texture on it.

I hope we could in the future, with the alpha blending option. (object + texture + alpha ==> reflective surface)

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd May 2003 16:32
Anjin not seen the Tekken4 water (unless you mean tekken tag) ... that water is actually pretty simple, what they do in that for reflections they use an alpha buffered version of the model they then project that onto the ground (you can tell this because the lack of real perspective) the light reflection isn't much either just standard normalisation with standard light image blended with a colour and the blended with the water ... transparency is just ghosting and finally the bump is a standard sin perturb wave (Calculus maths teaches about them).

now with everything cept the reflection it'd be pretty simple, what i'd suggest for the reflection you actually just make a copy of the model which runs underneath the world ghosted, ghost the ground under the water & the water itself... you'll then have a nice reflection effect

but then again you could just make a Reflection Vertex Shader - upto you really.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
BlackWolf
23
Years of Service
User Offline
Joined: 21st May 2003
Location:
Posted: 22nd May 2003 16:41
Have you got a code example in DB ? Please, to make these effects ?

Thx

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 22nd May 2003 17:03
Raven, have you got the source code for a reflection vertex shader?

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd May 2003 17:30
gimme about 20mins as i'm currently modeling

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
BlackWolf
23
Years of Service
User Offline
Joined: 21st May 2003
Location:
Posted: 22nd May 2003 17:43
Thx

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd May 2003 18:14
tada ... and its even upgradeable (check the comments)


that was fun ... now howto use that in DBpro i'll leave that upto you but you should be able to see it in action using RenderMonkey, i really can't be arsed to make you a project for it though ... would have to download it again.

i think MS should add syntax highlighting into notepad hehee

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 22nd May 2003 20:46
Hmm can't get it to work in RenderMonkey, something about uninstalised components, I think that is my fault though, I am just trying to figure out where I went wrong.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd May 2003 21:32
i've only used Rendermonkey briefly so i dunno, might be the way i've initilised some of the registers ... change the declared constants to ones you input in code, might be that.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
The Cubist
23
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 23rd May 2003 06:33
Humor me and take a look at this code I've been toying with. Two seperate planes both ghosted one with a simple texture and the other textured with a camera image pointing out from the planes. Use the arrow keys to see the reflection is pretty close. Tell me what you think.

Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 23rd May 2003 15:33
not bad... but its slow as hell (atleast for me) and has several reflections (3 to be exact) - i think just editing my reflection code to export the UV Coords to a Pixel Shader and then combining it with a texture would probably be better. Atleast speed wise

however a problem i have with DBpro's built in reflections is they don't actually really reflect the true reflection of a surface - infact personally i'd say they more refract what is going on in the scene.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Amadeus
23
Years of Service
User Offline
Joined: 20th Apr 2003
Location: United States
Posted: 23rd May 2003 21:12
instead of blowing brain cells (like I know I am reading this,) can't we wait for Patch 5 to be released, then just deal alpha intensity, as I figure one object w/ 2 special abilities takes less time to render than 2 objects, each with special attributes? Just my two cents.

Life is a tale told by an idoit, full of sound and fury, signifying nothing. - MacBeth
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 23rd May 2003 22:26
SET CAMERA TO IMAGE + Blend Mapping is the only real option atm.

Do you want Windows menus in your DBP apps? - Get my plugin: http://snow.prohosting.com/~clone99/downloads/tpc_menus_102.zip

Login to post a reply

Server time is: 2026-07-11 13:58:11
Your offset time is: 2026-07-11 13:58:11