Jump to content

Underwater Particles (Finally)


Guest Red Ocktober
 Share

Recommended Posts

Guest Red Ocktober

i finally got underwater particles working to where i can use em...

 

ohhhh happpy days ;);)

 

LW_226_UnderwaterParticles.jpg?psid=1

 

real moving waves, and now underwater bubbles... weelll, i guess there's no excuse now not to do the sub sim in LW...

 

( using Leadwerks 2.26)

 

--MIke

Link to comment
Share on other sites

Guest Red Ocktober

Neat! Could you elaborate on the technique used?

 

oooops... sorry... yeah,sure... but i dunno if its gonna work for most projects... i'm not using the water physics, and right now i'm not sure if i've disabled it or not...

 

in short what i wound up doing was editing render.bmx and commenting out some of the underwater effects code, and replacing it (outside of renderer) with a simple fog (using the fw.renderer settings for submersionFogColor and range... and when the camera surfaces reset the fog color and distance using fw.renderer.distancefogcolor and range...

 

a search for submerged and edit the following should do it...

 

		Local morepassestodraw:Int	
	morepassestodraw=False
'		If submerged morepassestodraw=True

 

		Local cb:Int=1
	Local counteffects:Int=0
	If antialiasenabled counteffects:+1
'		If submerged counteffects:+1

 

			'Underwater filter
'			If submerged
'				If counteffects=1
'					SetBuffer(buffer)
'				Else
'					SetBuffer(postbuffer[cb])
'				EndIf
'				DrawEffectUnderwater(postbuffer[1-cb].colorbuffer[0],transparencybuffer.depthbuffer)

'				cb=1-cb
'				counteffects:-1
'			EndIf

 

i think that's it...

 

remember... you'll have to supply your own fog... right now you should have a clear scene under the waves...

 

also... this is 2.26... i'm sure 3.43 will have some other issues you'll have to deal with...

 

 

btw... anyone know which cameras that have to be set to the proper location and orientation in order for the reflections to work right in 2.43... main, transparency, reflection... any others? the code that works in 2.26 is giving me fits in 2.43 with my waves and the reflections...

 

big thx...

 

--Mike

Link to comment
Share on other sites

Guest Red Ocktober

Good work! It seems you get the most bang out of your buck if you use bmax with this engine.. :D

 

btw, how is that crosshair image working for you?, i've since made 64 of them, so let me know if you need a better one

 

yup... that's why i've stayed with BMax as opposed to going over to c++...

 

oh... that crosshair graphic is perfect... :) thx...

 

 

--Mike

Link to comment
Share on other sites

Guest Red Ocktober
Although the best sub-sim I remember playing used a waterfall display, don't think you got to ever see the sub exterior. SSN-21 Seawolf?

 

yeah... i played that one... i agree... for realism, that'd be the way to go...

 

but... like flight sim, silent hunter, etc,etc... (and only just to satisfy the perceived reality in all of us, where we see ourselves driving by in our cars), i've given in to the reality of the public's demand, and will offer the option of no external views... for the purists out there...

 

also...

 

ssn21 never let you go up to the bridge... never let you go on deck... and you never saw (felt) the deck angle change as the sub dived or ascended... i'd like to have a lil more visual immersion in my stuff... along with the waterfall passive displays and all that other good stuff...

 

in short, and the real reason i got stuck on this is that it bugged the heck outta me not being able to do it... why should i be restricted from doing something so simple in such a state of the art renderer...

 

now i feel much better about waiting for 3...

 

--Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...