Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Another Water Problem.; Ghost shadows in the water.
Topic Started: Nov 10 2007, 07:02 AM (254 Views)
Terror Doctrine
Member Avatar
Lead Programmer of Static
[ *  *  *  * ]
There are reflections of things that are not really there.

Posted Image

Any ideas?
Posted Image
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Recently I told you to increase/decrease the z-value for the clipping planes of the reflection and the refraction camera. Obviously you increased/decreased them a bit to strong, because that's most likely the cause of this problem. You can solve it by using smaller offset values for the clipping planes.
Offline Profile Quote Post Goto Top
 
Terror Doctrine
Member Avatar
Lead Programmer of Static
[ *  *  *  * ]
Ahh, ok yea i increased it way too much.

Also ill ask another question, how can i blend the water with another color so its not just clear?
Posted Image
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Two possible ways: Either the pixel shader has to be modified or you use DrawTexEx(...) to draw partially transparent textures to the render targets of the reflection and the refraction camera.
Offline Profile Quote Post Goto Top
 
Linkin
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Ok ill just extend on T Doctrines question, How could i modify the shader to apply r,g,b, values stated in the game object. And also make the alpha of the water change depending on how deep the water is, eg is lighter towards the shore as it is shallower.
Posted Image
Want something done in Photoshop, make a request Here

Formerly known as DS-Development.
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Dark Sigma
Nov 12 2007, 05:48 AM
Ok ill just extend on T Doctrines question, How could i modify the shader to apply r,g,b, values stated in the game object. And also make the alpha of the water change depending on how deep the water is, eg is lighter towards the shore as it is shallower.

Again, for this the shader had to be modified. To be more precise, this line would need to be added to the end of the *.ufx file:
Code:
 
PSConstant 3 PS_CONST_MAT_DIFFUSE

And this one had to be added to the end of the *.psh file:
Code:
 
mul r0.rgb, r0, c3


For your second question I have to tell you that you should better forget about that.
Offline Profile Quote Post Goto Top
 
Terror Doctrine
Member Avatar
Lead Programmer of Static
[ *  *  *  * ]
Ok so what would we have to put in game to change the rgb values, So we don't have to constantly modify the Shader for color changes.
Posted Image
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
The diffuse map. :huh:
Blog|EHS
Offline Profile Quote Post Goto Top
 
Terror Doctrine
Member Avatar
Lead Programmer of Static
[ *  *  *  * ]
Ok let me explain, what i want is something like this. Say in the water obj i put
Code:
 

r=34;
g=20;
b=200;


I want the water to merge with those variables
Posted Image
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Change the diffuse color with those materials, using the Doctor's code.

EDIT:

REPHRASE!!

Change the material to that diffuse color. Using the Doctor's code of course.
Blog|EHS
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply