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.

DarkBASIC Professional Discussion / Water FX with DBPro

Author
Message
DarkDISCUSSION
14
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 6th Nov 2011 19:56
I can't figure out how to use the water fx with DBpro and need some help please.


Am I doing something wrong? the file doesn't seem to work correctly.

Captain Wicker
http://captainwicker.webs.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Nov 2011 20:24
Don't you have to load effect and then apply to it ?

Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
14
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 6th Nov 2011 22:16
Oh yea. I had fogot about that. Oops!
Anyone know how to put the water effect into a skybox?


The file can be downloaded if needed.

Captain Wicker
http://captainwicker.webs.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Nov 2011 22:57
Some time ago, I found this example in the TGC forum. Download to check.

Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
14
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 6th Nov 2011 23:08 Edited at: 6th Nov 2011 23:10
What is this? Do I load the FX file within DBPro? How does it work? Isn't this just a FX file?

Kind Regards,
Captain Wicker
http://captainwicker.webs.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Nov 2011 23:31 Edited at: 6th Nov 2011 23:44
Sorry ....I'm a fool...I thought that the code was in the same folder





Try again...and sorry !!

Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
14
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 8th Nov 2011 00:53
It's cool. If possible could you explain how to add a selection menu inside of it?

Kind Regards,
Captain Wicker
http://captainwicker.webs.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 8th Nov 2011 01:49
There are a lot of ways to do a menu...Have a look to this simple menu made with boxes....then you have to make links to differents labes of code or to your functions.



Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
14
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 9th Nov 2011 21:41
I seem to be somewhat of an idiot at this.
How in the world can I add a menu into a 3d scene and get it to stay in one place while the scene is moving?????

Kind Regards,
Captain Wicker
http://captainwicker.webs.com/
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Nov 2011 22:30
If it is 3D you have to LOCK OBJECT ON to lock it to the screen. if you use image just paste image x,y .


Cheers.

I'm not a grumpy grandpa
DarkDISCUSSION
14
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 10th Nov 2011 22:42
I never would have thought of that! Thanks for the tip! I was used to creating a plain for the menu items. Your way seems easier Thanks very much!

Kind Regards,
Captain Wicker
http://captainwicker.webs.com/
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 17th Jan 2012 05:35 Edited at: 17th Jan 2012 05:36
@chafari

hi

the example you post on "6th Nov 2011 10:31"
this relates to camera box the shows up in the left top corner
I've seen this quirk before

if you press for the camera to show the above the water life and your under the image is scrambled and vice versa

I get text junk from what ever was on the screen when the example was being built

any idea why this takes place ?
.. I would not rile call this a major bug
just annoying to look at

to move side ways - is to move forward
Since a Strait line gets thin fast
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 17th Jan 2012 19:18
I don,t know what you mean....I will have a look when I get home...now I,m with the phone.

I'm not a grumpy grandpa
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 17th Jan 2012 19:42 Edited at: 17th Jan 2012 19:43
@Resourceful

This example is not mine...I found it somewhere in the forum....I don't really know what you meant with
Quote: "I get text junk from what ever was on the screen when the example was being built"


Can you get a snapshot of the screen and show us ?

Cheers.

I'm not a grumpy grandpa
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th Jan 2012 02:35 Edited at: 18th Jan 2012 03:39
@chafari

here are the 2 images to show whats happening

could there be a command missing ?
or is it bug in DBP ? .. which is not a big one

to move side ways - is to move forward
Since a Strait line gets thin fast
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 18th Jan 2012 21:26
@Resourceful

I had never seen this error. That's strange...but if more people see the same as you, could be a graphic card problem.

Cheers.

I'm not a grumpy grandpa
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th Jan 2012 22:26
I found that example some time ago when I had anther video card
and it had the same problem

I've upgraded dbp several times and that problem still shows up

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Jan 2012 14:23
I get similar problems with that demo.

The camera numbering, masking and syncing is rather unclear to say the least.

At one point DBPro camera IDs needed to be consecutive (Lee says that isn't true anymore - I'm not sure he's right though ) - and I could only get reasonable results with that demo by making them consecutive, i.e. 0, 1 and 2 rather than 0, 30 and 31.
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 19th Jan 2012 14:40
@Green Gandalf

it should not make a difference
but considering bugs crawl in , it's more than likely

it's too bad the problem is there
any games ware this thought is put into place messes up the game

one example I found pointed a camera at a object that was moving
but had the view show up on anther object else ware and vice versa
also what was part of it , if you moved towards the object it transported
the player to the other location or back

it give a lot of options for the camera and movement to mess with a player

if I can work out the detail's then using what I saw in that example
would fix the camera problem with out seeing the view get messed up

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 19th Jan 2012 15:00
@Green Gandalf

I changed the camera numbers
from = 30 to 31
to = 1 to 2

it fixed the problem but messed up the look of the water

not exactly what I expected

have a look for your self

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 19th Jan 2012 15:36
It seams the "Sync Mask" is ware the problem is coming from

this command has to do with ignoring certain camera's

the problem since i am not fully familiar with using it
finding what # is ware I am stuck for now

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th Jan 2012 20:43
Yes, you need to change the mask as well. I think I used



to make the relevant camera number (2) clear.
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 20th Jan 2012 02:59
@Green Gandalf

just the first one would need to be changed right ?

not the second one ?

current settings for the Sync Mask
1. Sync Mask 0x80000000
2. Sync Mask 0x3fffffff

new setting

1. sync mask 2^2
2. Sync Mask 0x3fffffff

for the sync mask I tried
Sync Mask 0x00000001
Sync Mask 0x00000002
but both messed things up even worse

I added what you built which got things going
but when you press the control key camera it's still
a bit garbled looking

is there a program out there that can help
calculate the sync mask better ?

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Jan 2012 14:08
Quote: "is there a program out there that can help
calculate the sync mask better ?"


The sync mask argument doesn't need any special programming. The bits are simply aligned to each camera consecutively. The first bit is for camera 0, the second for camera 1 and so on. You could, for example, tell DBPro to render cameras 1, 2 and 4 by setting bits 2, 3 and 5, i.e. in binary



(low order bits are on the right so the main camera, camera 0, corresponds the lowest order rightmost bit).

In decimal that would be simply



which is the same as



where the powers are the camera numbers. Use whichever you prefer - or even hex if you must.

Raising numbers to powers each sync is probably marginally inefficient but makes the connection between the camera ID and the mask much clearer. Of course you could precalculate the masks before the main loop and store the result in a variable. For example,



Do whichever suits you best.

Quote: "@Green Gandalf

just the first one would need to be changed right ?

not the second one ?"


No, you're right - they should both be changed. That demo was rather unclear in my opinion - I couldn't tell whether or not the original author's intention was to have two additional renders per sync, i.e. the reflection and refraction cameras (it doesn't look like one of Evolved's demos to me even though it's his shader). If so then there should probably be three separate renders per sync because two of them need clipping planes. In other words the refraction camera would only see the surfaces which are below water level, and the reflection camera only needs to see surfaces which are above water (when the main camera is above the water level). If the different clipping planes wweren't needed then all three cameras could be rendered at the same time (although that might mean the main screen render would use the other cameras outputs from the previous sync - unlikely to matter much in this case).
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 20th Jan 2012 14:43
The sync mask argument doesn't need any special programming. humm
it's a royal pain when it did not have to be

I know about binary but never had need for it until this joke showed up
for a command that is required to make things show up correctly

there should have been a more strait forward way to set up this option

I've dun some searching around the forum and "Green Gandalf"
you have shown up a lot related to "sync mask" command

both sync masks as far as I can tell are needed for this example to work
and at this point it go's but the camera things is junk and
causes more problems than it's worth , if any thing it's still beta code

this is how it should have been built

A. sync mask 0~1~2~3~4~5,0~0~0~0~0~0
B. sync mask 0~1~2~3~4~5,1~1~1~1~1~1

not the other way if you have not gathered
then it would be simple to set which camera should have the control

people can use any camera they want

sync mask 0~10~25~32~48~51,1~1~1~1~1~1

the ~ lets the program no which camera has a on or off setting
at this point I still can't get the example to work like it was intended

my guess is was made for a lesser video card which at the time was the best
do not know if it ati crap or some thing else other than nvidia

nvidia is gold ati is scrap metal junk just like amd

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Jan 2012 19:06
Quote: "at this point I still can't get the example to work like it was intended"


At this point I can't tell what was intended.

The demo seems to use only the reflection technique so the refraction camera, camera 1, isn't needed at all.

Quote: "people can use any camera they want"


You can just use



instead of



Both are very simple really - and the second uses standard DBPro commands so is better maintained.
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Jan 2012 02:36
ok get this

"sync camera" shows up and is high lighted
but there is not help file for it to show how it is to be used

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2012 14:03
It's one of those commands that originally came with Dark Shader and is now included in DBPro. Yes, it would be helpful () if the Help file was updated to cover all the included plug-ins.

Login to post a reply

Server time is: 2026-06-12 05:03:38
Your offset time is: 2026-06-12 05:03:38