Ok i found this tutorial from an old french user rc Giuliani some image are lost i try to give a sense to the tutorial. try if have problem i can see in my rcce with already installed FastExt if something unclear.
FastExtension TutorialFAST-EXTENSION is a paid library (11 €) which, once integrated in BlitzBasic, allows to get rid of the good old graphic engine in DirectX7 to get closer to DirectX 9.
On the program, realistic water, dynamic shadows, Occlusion with the rays of the sun, Glow / Bloom, volumetric fog, effects of lights etc ...
Based on the tutorial by MJCamerer on the official forum RCS, I will try to explain how to integrate the bloom and the depth field with Fast-Extension. Integration in 10 minutes shows in hand ^^
A) PREPARATIONFirst of all get a copy of FastExtension here for 11 €:
fastlibs.com/Once recovered, unzip it.
1) Copy FastExt.dll:
_ In your Blitz3D folder
_ In your Project folder (with server.exe, Client.exe etc ...) as well.
2) Next in \ for_Blitz3D \ include \ copy FastExt.bb
_ In your Modules folder (Source RCS folder) so that it is compiled with the client.
B) INITIALIZATION1) Open Client.bb and look for the Includes section
We must include the FastExt.bb file. To do this, just after the line "Include"
Modules \ Utility.bb "
3D Projector Display System", add this:
Include "Modules\FastExt.bb"
This line will integrate all the code contained in FastExt.bb to your project client. All of its functions can now be used.
2) Now we must initialize and de-initialized this library during its operation as specified in the help documents.
The FastExtension documentation specifies that the library must be initialized after the Graphics3D command and de-initialized just before the EndGraphics commands.
Let's open in
Modules \ MainMenu.bb:
Once
MainMenu.bb is open, find this section:
LOST IMAGE OR TEST I TRY TO FOUND IT IN PROJECT FOR ADDNow let's boot after each Graphics3D. Add this line after every all Graphics3D's:
InitExt
Let's find all EndGraphics still in
MainMenu.bb.
Remember that we must des-initialize the library before each EndGraphics. Add this line before each EndGraphics:
DeInitExtAnother EndGrapics in this
MainMenu.bb:
Now let's add an initialization line just before this EndGrapics.
We're done with
MainMenu.bb. Save and close this file.
Now in
ClientLoaders.bb, there are 2 other Graphics3D commands here. Find this section:
Let's add the initialization just after each Graphics3D command .
We have finished with the addition of the bookstore to Realm Crafter. If you have successfully completed this part, you should never have to reinitialize / uninitialize FastExtension in the future.
You can even add all the other possibilities offered by FastExtension to Realm Crafter!
C) ADDING GLOW / BLOOMNow we can begin to integrate Post Processing effects. For this tutorial, we will display Glow (also known as Bloom) and Depth of Field (depth effect).
Open
Client.bb, and in main loop, look for the section about the render.
To integrate the Post Process Glow effect, we need to add the FastExtension command:
RenderPostProcess FE_GLOWThe FastExtension documentation specifies that the rendering of a post-process effect must occur after RenderWorld (). So let's add our RenderPostprocess command just after RenderWorld ().
There you go! Your game will now have a Glow effect (Bloom) effect!
Try to compile your client.exe, replace the old one with it and run your project. Remember to work with sources, you must not have encrypted files (.eb3d) in your project.
Not bad is not it? Now let's say we would like to have a less luminous Glow. We'll have to set it up. Open
Client.bb again.
In the list of "
Global". You will find the global variables.
Open again
Client.bbTo make it easier, we'll add some of our own globals to customize the Glow effect.
These globals will make it easier to use different aspects of customization for the Glow effect.
These values that I tried personally and that worked pretty well not bad. It's up to you to experiment by changing these values!
Add these lines right after the latest Global FullScreen / VSync:
Glow variables for FastExt
Global GlowAlpha = 0.5
Global GlowDarkPasses = 2
Global GlowBlurPasses = 4
Global GlowBlurRadius # = 0.35
Global GlowQuality = 0
Global GlowColorRed = 255
Global GlowColorGreen = 255
Global GlowColorBlue = 255
Global GlowAlphaTexture = 0Now that all globals have been defined, let's go to
RenderWorld () and add the custom effects. Add this line Glow:
CustomPostprocessGlow GlowAlpha, GlowDarkpasses, GlowBlurPasses, GlowBlurRadius, GlowQuality, GlowColorRed, GlowColorGreen, GlowColorBlue, GlowAlphaTextureNow let's compile the sources and try it in game.
As you can see the brightness of the Glow is less intense. This is because we changed the alpha of the glow from half to 0.5. It's better.
Now that we've added an effect, you should be able to add any FastExt effect. The process is quite similar every time.
In order to reinforce this tutorial, I will also show you how to add another Post Process effect, Depth of Field (DOF).
D) ADDING THE DEPTH OF FIELD (DEEP EFFECT)We go back to the Global section. This time we will directly add all the parameters at the same time. After the lines added for the GLOW, add these to customize the Depth of Field:
Deep Of Field Variables For FastExt
Global DofNear # = 70
Global DofFar # = 140
Global DofDirection = 1
Global DofBlurPasses = 4
Global DofRadius # = 0.35
Global DofQuality = 0Back to where we added the Glow effect to the render. Add the following line for the DOF:
; Customize DOF effect
CustomPostprocessDOF DofNear, DofFar, DofDirection, DofBlurPasses, DofRadius, DofQuality
RenderPostprocess FE_DOFThere you go! Try to compile the game and run it. You should have a pretty bloom effect coupled with a DOF. Note how things in the background are blurred, and in the foreground clear.
Obviously these effects are far from perfect.