Fast Extend library
Blitz3D Forums/Blitz3D Userlibs/Fast Extend library
I've created topic for this great library for those who doesn't know about it yet:
http://www.fastlibs.com/libraries.php#fastextensionBasicaly it adds all DirectX7 features that was not supported by Blitz3D. And adds it not like usual directx7 stuff library. It is integrated with blitz and just extend some native blitz functions(and add some new).
This lib written by MixailV and here is discount coupon for libs: 50blitzersoff
:) this is really nice!
Cheers to him!
EDIT: Anyone has a water example that is slightly translucid using this library?
EDIT2: Sorry, I tried the trial version, all seems to work with the water. Just didn't look into having proper underwater lighting. Maybe it's the color of the water that needs to be set or some blending mode?
What is the connection between this and "Andreyman's" stuff? There is a connection, I'd just like confirmation of what I already know.
puki
It is another lib:) No connection with ashadow.
Does it include Fastimage? Or do we buy all 3?
I wonder if there are any plans to move FastText over to the B3D SDK?
if you buy the completeset then it includes fastimage. otherwise all 3 are their own thing.
2 question before I buy
Is Fastextend compatible with Renders PhysX wrapper?
Does Fastimage have any colision detection?
Thanks
@puki: Both Russians created the lib. Both libs give some extra graphics capabilities to blitz3d. This lib doesn't support shadows or post processing effects. So this is a big difference with ashadow. Only the water demo is similar to ashadow, but it stops there. The capabilities are totally different.
The one thing I would like extra to this lib is table fog, and other fog options that blitz doesn't support.
Also, it is good to notice that you can use ashadow with this lib, and also with fastimage, which enables a host of new capabilities to blitz3d. The only drawback is that, for ashadow, it is really complicated to make the water of that work nice with it's own shadow engine. So I think that the water of FastExt + the shadow of ashadow could be a good combination to try out instead. It's just sad that the trial version is very time limited...
wow, this is really what i need, i hope the fast3d lib works with b3dsdk
With ashadow it is especially hard to get a stable app afterwards. If its dev would solve the crash bugs that he still has in there it would definitely be a great lib. but in its current state, it means 30+ USD for something where only 12-15 USD really work stable.
Thats another serious difference to FastExtends
Leon: Only one of the 3 works with b3d sdk. the others are B3D Userlibs only
I bought all 3 libs. Other 2 work great but I get a memory violation error on a lot of the FastExtend examples:( Anyone else have this error? Im running on Vista 64bit with 4 gigs of ram.
I just tried the examples that gave the mem erorr with debug mode on. The error is now Entity doesnt exist. Im guessing there are typing mistakes?
FastExtends does a lot of "hack into the B3D" memory behind the scene. Thanks to Vista 64Bit Security measures (higher than in any other Windows Distribution) you will most likely run in errors like that.
You are using a business OS, not a gaming / development OS sadly (unless you dev with VS 2005 / 2008)
The documentation is still in Russian?
Now have a Glow example...
http://www.fastlibs.com/download.php?id=glow.zipExcellent Lib... Recommended.
Very good example, thx
hmm. really i'm not too concerned with the 3d lib. most of the water effects and dot3 effects i can do in blitz3d. and refraction isnt something i need atm. However the 2d lib is what i'm looking for. even though its available for blitz3dsdk im still worried if it will cause problems on vista.
i don't get it though i thought 2d alpha commands were available in dx7. its just odd that its not in b3dsdk or b3d
Mikhail has always seemed really thorough.
If there's a problem with Vista drop him an email.
There is no 2D alpha command. DX7 2D is directdraw -> not hardware accelerated so no alpha or realtime rotation on hardware.
There is a new update!!
Really, great work Mikhail. Good English docs.
This has put new life into B3D for me, and I am having fun again.
I am a very happy customer.
Thank You!!
Allan
Yes, it's getting better and better. Pity it does not work for B3D SDK, but there's always hope.
Barney
Great update, yepp :)
Now works on Vista too:D Great work.
Shadows and adjustable AA next?:D (I can dream)
Good dream!
I just bought this lib today. Great stuff! I'm also hoping for shadows at somepoint, even if it's as a seperate library. MixailV's stuff is always awesome.
Wow just got the new updates, and great commands are there, Good work Mikhail, I'm loving this new commands :)
I agree. These libraries are great!
1. They are simply to use just like Blitz3D.
2. They are fast.
3. And MixailV is a great supporter too!.
He responded to my questions and gave me the proper solution
Here is an example with his advise:
http://www.moraldigames.com/Temp/test.exeI manage to build within an hour some nice working buttons, place a HUD, and create a very nice looking water plane in my scene world.
It must be noted that shadows (casted on the water too) are created with AShadow library and both libraries works together without problems
Edit: you can display the HUD by pressing [D]
Spaceship navigation:
Arrow keys, [A],[Z], [S],[X]
Camera controls:
Space to toggle 'auto back mode'
[NUM 4] & [NUM 6]
This is the best integrated lib for Blitz3D.
I'm waiting for the shadow lib too.
New Update...
New functions RenderEntity, Table Fog, TextureAnisotropy and others.
Texture Anisotropy D:
..I just tried Glow demo..Ashadow is faster for given same polycount at once..
yes but ashadow is considerably less compatible as well which is why it is faster.
It does none of the regular checks for consistency and often crashes due to that
..so far ashadow never crash here..its also true that im using it only because of bloom and dof, since its really fast..for water thingy and rest of the really complicated things for use, I have some other stuff...anyway, this lib is very nice..
Yes "here"
But give you app out to others with different drivers and gpu chip sets and you will ask yourself when the programmer hopefully will fix it. DoF and Reflection tend to have compatibility problems.
It would be a very cool library if it worked without problems.
So right now I hope that FastExtends hopefully somewhen will get some of those effects in a stable way.
I like Ashadow but FastExt is more stable, compatible and... I found a memory leak in Ashadow (v1095):
ws=640
hs=480
fullscreen=2
.restart
Graphics3D ws,hs,0,fullscreen
Include "AShadowBBinclude/fps.bb"
Include "AShadowBBinclude/Ashadow.bb"
Global camera=CreateCamera()
CameraClsMode camera,False,True
CameraRange camera,1,10000
CameraFogColor camera,96,140,183
CameraFogRange camera,2000,9000
CameraFogMode camera,1
PostProcessInit()
CreatePixelDistortion( )
SetRefractMode(1)
Global tex
tex=LoadTexture("media\WaterNmap.JPG",0)
ScaleTexture tex, .500, .500
TextureBlend tex,2
WaterNormalMap = ASetBumpTexture ( tex)
WaterState\X=0
WaterState\Y=0
WaterState\Z=0
WaterState\ScaleX = 2000
WaterState\ScaleY = 2000
WaterState\ScaleZ = 2000
WaterState\ReflectSizeW = 256
WaterState\ReflectSizeH = 256
WaterState\WaterColorR = 50
WaterState\WaterColorG = 100
WaterState\WaterColorB = 130
WaterState\RefractTexture = 0
If BUMPENVMAP_SUPPORT
WaterState\BumpTexture = WaterNormalMap
WaterState\BumpPower= 1.2
WaterState\Reflective=1
WaterState\BumpReflectOFF=0
WaterState\UnderWaterReflective=1
WaterState\Refractive=1
Else
Water State \BumpTexture = 0
WaterState\BumpPower= 0
WaterState\Reflective=1
WaterState\UnderWaterReflective=0
WaterState\Refractive=0
EndIf
WaterPlane=ACreateRenderWater (1, WaterState)
light=CreateLight()
RotateEntity light,25,0,0
AmbientLight 100,105,120
skytex = LoadTexture("media\sky.png",1+8+16+32)
sky = CreateSphere(16)
FlipMesh sky
ScaleEntity sky,5000,5000,5000
EntityOrder sky,1000
EntityFX sky,1+16
EntityTexture sky,skytex
center=CreatePivot()
status=-1
While Not status=0
mx = MouseX() : my = MouseY()
a2# = (a2+.01) Mod 360
a#=(a+.1) Mod 360
PositionEntity camera, Sin(a)*(.5*size),5+(Sin(a)*4),Cos(a)*(.5*size)
PointEntity camera, center
pt#=pt#+.0005
ABumpTextureTransform ( WaterNormalMap ,pt#,pt#, .02, .02 )
PositionTexture tex, pt#, pt#
PositionEntity sky,EntityX(camera,1),EntityY(camera,1),EntityZ(camera,1),1
RenderWorld()
AUpdateWater (camera)
UpdateRefract(camera)
PostProcess_Render(camera)
If KeyHit(2)
ws=800
hs=600
status=0
EndIf
If KeyHit(3)
ws=1024
hs=768
status=0
EndIf
If KeyHit(4)
fullscreen = fullscreen + 1
If fullscreen >2 Then fullscreen = 1
status=0
EndIf
If KeyHit(1)
quit=1
status=0
EndIf
Flip
Cls
Wend
FreePostProcess()
FreeWaters ()
Refract_Free ()
EndGraphics
If quit=0 Then Goto restart
End
Btw. Glow demo have much better "bloom" than ashadow. So... i have my own "bloom" code (for FastExt lib)- simple but faster.
well..>>here<< means so far none of the computers i did try ashadow(not water, just bloom and dof) never crashed..and it was at least 6 different configurations..none of them crashed..and when i say difference in speed, i meant on range of 50-100 FPS for given scene...87K polys FastExt drop badly on to 10 fps while ashadow running on 180FPS, same scene, and polycount with no problem at all(just glow used on both libs)..
..by the way, how to achieve same effect over animated mesh as one in FastExt_Example_BumpAnimMesh.bb example? I did ask Mikhail, and he told me that he use to change blending modes in mesh trough hex editor..of course, im interested to do that trough B3D code..so, any of you guys did it?? I just cant get it work here..
I'm looking for a way to do spherical map and using render to texture, but haven't found the way to do it properly yet! Here are example images:


This is not my work, but examples I grabbed from the web which looks somewhat like what I wish to achieve.
Here is some code I tried out to make a spheremap, without success! I sued already supplied code in FastExtend:
Include "include\FastExt.bb" ; <<<< Include FastExt.bb file
Graphics3D 1024,768,32,1
InitExt ; <<<< Initialize library after Graphics3D function
texRender = CreateTexture(512,512, 1 + 2 + 256 + FE_ExSIZE + FE_RENDER + FE_ZRENDER) ;<<<< íîâîå! (new flags)
; FE_ExSIZE - ëþáàÿ øèðèíà è âûñîòà òåêñòóðû (íå êðàòíàÿ ñòåïåíè äâîéêè)
; any size for texture
; FE_RENDER - â òåêñòóðó ìîæíî ðåíäåðèòü
; render to texture flag
; FE_ZRENDER - òåêñòóðà áóäåò èìåòü Z-Áóôôåð (ìîæíî ðåíäåðèòü íå òîëüêî 2Ä, íî è êîððåêòíîå 3Ä)
; create depth buffer (Z-buffer) for 3D rendering
; Âíèìàíèå! Äëÿ ðåíäåðÿùèõñÿ òåêñòóð ôëàã 256 äîëæåí îáÿçàòåëüíî áûòü âêëþ÷åí!
; Flag 256 obligatory!!!
CreateLight
cam=CreateCamera()
PositionEntity cam,0,0,-5
cub=CreateCube()
cub1=CreateCube()
ScaleEntity cub1,2.0,0.2,0.2
PositionEntity cub,2,0,0
sph1 = CreateSphere(32)
PositionEntity sph1,-2,0,0
texRender2 = CreateTexture(1024,512, 1 + 2 + 64 + 256 + FE_ExSIZE + FE_RENDER + FE_ZRENDER) ;<<<< íîâîå! (new flags)
tex= LoadTexture ("media\Devil.png",1+2 + 256)
SetBuffer TextureBuffer(tex)
Rect 0,0,TextureWidth(tex),TextureHeight(tex),0
Rect 1,1,TextureWidth(tex)-2,TextureHeight(tex)-2,0
While Not KeyHit(1)
TurnEntity cub,0.1,0.2,0.3
TurnEntity cub1,-0.2,0,-0.5
EntityTexture cub,tex
SetBuffer TextureBuffer(texRender) ;<<<< òåïåðü êîìàíäà SetBuffer ìîæåò óñòàíîâèòü è òåêñòóðó äëÿ ðåíäåðà
; Set texture for render
ClsColor 128,0,0,64 ;<<<< òåïåðü â ClsColor ìîæíî çàäàòü Alpha óðîâåíü (ïðîçðà÷íîñòè) è Z-óðîâåíü (òîëüêî äëÿ òåõ êòî ïîíèìàåò ÷òî ýòî òàêîå :)
; Set Cls color 128,0,0 AND alpha = 64
Cls ;<<<< òåïåðü Cls î÷èùàåò è òåêñòóðû äëÿ ðåíäåðà, çíà÷åíèÿìè çàäàííûìè ÷åðåç ClsColor
; (ïðè î÷èñòêå ó÷èòûâàåòñÿ çàäàííûé Viewport è î÷èùàåòñÿ òîëüêî ýòà îáëàñòü!)
CameraClsMode cam,0,0 ; îòêëþ÷èì Cls êàìåðû, ÷òîáû íå ìåøàë, ìû óæå ïî÷èñòèëè òåêñòóðó êàê íàì íàäî!
; disable Cls in camera
RenderWorld ; render scene to texture
Rect 0,0,TextureWidth(texRender),TextureHeight(texRender),0 ; draw rectangle
EntityTexture cub,texRender ; <<<< òåïåðü ïîëîæèì íà êóáèê íàøó òåóñòóðó äëÿ ðåíäåðà
; place texture to entity
; ************* trying some environment mapping
SetBuffer TextureBuffer(texRender2)
Cls
ClsColor 255,0,0,0
CameraClsMode cam,0,1
CameraProject cam,-2,0,0
RenderWorld
EntityTexture sph1,texRender2
; *************
CameraProject cam,0,0,-5
SetBuffer BackBuffer() ; è ðåíäåðèì êàê îáû÷íî íà áýê-áóôåð
CameraClsMode cam,1,1 ; âåðíåì êàìåðå Cls, õîòÿ ìîæíî êîððåêòíî î÷èñòèòü è âðó÷íóþ òåïåðü (restore Cls mode)
RenderWorld ; render scene to back buffer
Flip
Wend
FreeTexture texRender
I'm thinking it's probably near impossible to do in real time with a spheremap because I read that you need to render in many passes. But I'll try more tricks see if I can get this to work.
Maybe another method would be to use a reflection map? I'm looking at building the UVW reflection map for a sphere, but can't figure out which colors go where :o I shouldn't have any problems actually if UVW stands for XYZ, but never did UVW mapping before.
You can't do dynamic sphere mapping in that way. It has nothing to do with Blitz3D or any related limitations. It just isn't possible to create a camera which faces in six directions all at once.
To do what you're demonstrating in real time, would require a cube map, not a sphere map.
The problem that I have with cubemaps:
- texture seams
- graphics memory (3x sphere map)
- takes a nice chunk of performance
I'm thinking that if I can use a bumpmap for reflection that has the UVW properly arranged for a sphere (like what we do for water), then maybe this could be the best way to do it performance wise.
I'm sure there are other techniques also, but I believe the choice is limited in DX7 and blitz3d.
See, I'm convinced that, if water can have bumpmapped reflections using a UVW map, then it could work for what I need.
Right, well when you become convinced that you've found a way ro point a camera in six directions at the same time, let me know.
sphere maps take a far higher chunk of performance if you want to do reflection with them as you must realtime transform it into spherical data.
and just to mention that: you won't get more performance, you still need 6 renders, just that they must be modified after writting -> slower for sure. (on cubes you could even restrict it to 5 in different cases as there is always a part "behind" the object, where you do not need the cubemap face)
and don't know where you've seen texture seams with cube mapping (-> not texture mapping a cube which can result in seams due to UV clamp, but thats a totally different thing than cube mapping)
do you have a sample of a sphere mapped reflection on anything that is dynamic?
So far I've seen them mostly used for rust, specularmaps and the like. Stuff thats static in its data and only needs rotation in the case of the specularmaps for example.
the only way I know to generate a sphere map usefully is basing on cube -> sphere projection and on that end, you can just use the cube map, will be faster.
Cubemapping a sphere in realtime is not a good thing to do for any game as it eats up a LOT of performance for that effect alone. I am looking for an alternative method, to get a similar result. If anyone can HELP, I am listening. I proposed using an UVW texture, need help on UVW plotting the texture for a sphere so I can try it out for a reflection map.
UV texture you mean. Blitz3D does not support "W"
And that will not work. Reason: you still need to do the 6 cubemap renders. The 6 renderworlds are the problem performance wise, not the mapping (on current cards cube mapping costs about nothing), without those 6 renders you won't get reflection.
if you have those 6 renders, just "slice" the cube vertically from +y axis towards -y axis for a given "y angle range" which you use as "slice width" (5 degree of the like) and which then will be mapped onto a slice on the sphere texture, most likely compressed (so 5 degree are reduced in width)
but it will be far slower than using the cubemap and the 6 renders.
Graphic cards are explicitely NOT made for buffer lookups and are 10-100 times slower at that than at getting data from CPU to GPU (10 times because there are still users with 2D cards with part TnL support and the like which are just that slow that the lookup isn't that much slower)
simply said: locking 7 textures like in this case might itself cause such a massive bottleneck that your game will pause for several frames!
Well, the point in the first place was: Render to texture. I'll check how I can use R2T for the 6 shots of the cubemap, see how that performs. Usually, without this DLL, you would have to render and then copy the result to a texture. I suppose that now it is possible to just straight render to the texture so that might be the thing that will save the performance here.
Well on current gen GPUs there is no difference performance wise. As those card imitated the fixed function pipeline of DX7, they kind of optimize the copyrect on a 256 flag texture to be render to texture.
but on my GMA900 for example, copy rect has 1/6 of the FPS of Render 2 Texture on 512x512 and upward.
so for those, it makes a serious difference.
There is a thread on that where this was benchmarked.
Render to texture doesn't work on cubemap textures i'm afraid. Hopefully in an update :D
* DELETED
You can't Render2Texture on cubemap textures. The only thing you can do in blitz, is to set the cubemap texture your using, to use the VRAM flag.
Is this the thing that will allow you to wireframe a single object - ie you are not restricted to wireframing the entire scene?
New update available.. Render to cubemap has been added LD
New update in FastExtension v1.11
New futures:
1. Added support of the rendering to cubemap texture
2. Added support of the copying to\from cubemap texture (with
CopyRectStretch function)
New examples added:
1. FastExt_Example_RenderCubemap.bb
2. FastExt_Example_BumpEffects.bb
puki:
Is this what you are looking for?
http://www.moraldigames.com/Temp/FastExt%5FExample.zip
Oooh, I see the wireframe per object.
This lib is most exciting.
Anyone else getting errors in fastext.bb for some of the demos in the v1.11 version? I'm getting a "not enough parameters" error when I try to run (for instance) FastExt_Example_BumpWaterAndEntity.bb
Haven't been getting this error with earlier versions of FastExtend...
I din't download yet but did you replace then old decls file with the new one?
omg MixailV to the rescue! This lib keeps on getting better :P I wonder how fast it is now to use cubemaps :o
EDIT: OK, I tested the new RenderToCubemap and it's very promising. I tweaked FastExt_Example_RenderCubemap.bb so I can see that the texture is being realtime updated, and upped the resolutions to get a better appreciation of the method, here is my version of the example.
; Example of use FastExt library
; (c) 2006-2008 created by MixailV aka Monster^Sage [monster-sage@...] <a href="http://www.fastlibs.com" target="_blank">http://www.fastlibs.com</a>
; Ïðèìåð ðåíäåðèíãà â êóáåìàï òåêñòóðû (ñ ïîìîøüþ áèáëèîòåêè FastExtension è ñòàíäàðòíûìè ôóíêöèÿìè áëèöà)
; Example of rendering cubemap textures (with FastExtension library functions and standart Blitz3D functions)
; ÂÍÈÌÀÍÈÅ! Çàêðîéòå âñå äðóãèå ïðèëîæåíèÿ ïåðåä òåñòèðîâàíèåì, ÷òîáû ïîëó÷èòü êîððåêòíîå êîë-âî êàäðîâ â ñåêóíäó!
; ATTENTION! Close other application before testing for correct FPS results!
Dim cub(50)
Include "include\FastExt.bb" ; <<<< Include FastExt.bb file
Graphics3D 1024,768,32,2
InitExt ; <<<< Îáÿçàòåëüíî èíèöèàëèçóåì ïîñëå Graphics3D
; Initialize library after Graphics3D function
Include "include\RenderCubemapFunctions.bb" ; <<<< see details in include file
Camera=CreateCamera() : PositionEntity Camera,0,0,-3 : CameraRange Camera,0.1,5000 : SetFont LoadFont("Tahoma",13)
Light=CreateLight() : TurnEntity Light,45,0,0 : CreateBoxes()
; create cubemap textures for render (with Z-Buffer)
RenderCubemap_Texture0 = CreateTexture( 512, 512, 1 + 128 + 256 + FE_RENDER + FE_ZRENDER ) ; <<<< cubemap for rendering (with specular rendering mode)
RenderCubemap_Texture1 = CreateTexture( 512, 512, 1 + 128 + 256 + FE_RENDER + FE_ZRENDER ) ; <<<< other cubemap for rendering for testing
SetCubeMode RenderCubemap_Texture1,2 ; (with diffuse rendering mode)
; place textures to objects
Entity0 = CreateSphere(32)
PositionEntity Entity0,-1.5,0,0
EntityTexture Entity0, RenderCubemap_Texture0
Entity1 = CreateSphere(32)
PositionEntity Entity1,1.5,0,0
EntityTexture Entity1, RenderCubemap_Texture1
Sync = 0
Mode = 0
While Not KeyHit(1)
MouseLook Camera
If KeyHit(28) Then Sync=1-Sync
If KeyHit(57) Then Mode=1-Mode
If Mode=0 Then
; render to cubemap
RenderToCubemap Entity0, Camera, RenderCubemap_Texture0
RenderToCubemap Entity1, Camera, RenderCubemap_Texture1
Else
; render to BackBuffer and copy to cubemap
RenderCubemapCopyRect Entity0, Camera, RenderCubemap_Texture0
RenderCubemapCopyRect Entity1, Camera, RenderCubemap_Texture1
EndIf
; testing CopyRectStretch function with cubemap texture
; copy graphics data from BackBuffer to cubemap face
SetCubeFace RenderCubemap_Texture1,3
CopyRectStretch GraphicsWidth()-200,GraphicsHeight()-200,200,200, TextureWidth(RenderCubemap_Texture1)/4, TextureHeight(RenderCubemap_Texture1)/4, TextureWidth(RenderCubemap_Texture1)/2, TextureHeight(RenderCubemap_Texture1)/2, BackBuffer(), TextureBuffer(RenderCubemap_Texture1)
RenderWorld
For i = 1 To 50
TurnEntity cub(i), i * 0.1, i * 0.05, i * 0.025
Next
Text 10,10,"Fps: "+FPS()
Text 10,30,"VSync (key Enter): "+Sync
If Mode=0 Then
Text 10,50,"Mode (key Space): Render To Cubemap"
Else
Text 10,50,"Mode (key Space): Render To BackBuffer And CopyRect"
EndIf
Flip Sync
Wend
End
; âñïîìîãàòåëüíûå ôóíêöèè
Global DeltaTimeOld
Global MouseLookFirst=0
Function MouseLook(cam)
If MouseLookFirst=0 Then
MoveMouse GraphicsWidth()/2, GraphicsHeight()/2
DeltaTimeOld = MilliSecs()
MouseLookFirst=1
EndIf
Local t=MilliSecs()
Local dt = t - DeltaTimeOld
DeltaTimeOld = t
Local dk# = Float(dt)/16.666
s#=0.1*dk
dx#=(GraphicsWidth()/2-MouseX())*0.004*dk
dy#=(GraphicsHeight()/2-MouseY())*0.004*dk
TurnEntity cam,-dy,dx,0
RotateEntity cam,EntityPitch(cam,1),EntityYaw(cam,1),0,1
If KeyDown(17) MoveEntity cam,0,0,s
If KeyDown(31) MoveEntity cam,0,0,-s
If KeyDown(32) MoveEntity cam,s,0,0
If KeyDown(30) MoveEntity cam,-s,0,0
End Function
Global FPSCount = 0
Global FPSCountTemp = 0
Global FPSTime = 0
Function FPS()
If (MilliSecs()-FPSTime)>=1000 Then
FPSTime = MilliSecs()
FPSCount = FPSCountTemp
FPSCountTemp = 0
EndIf
FPSCountTemp = FPSCountTemp + 1
Return FPSCount
End Function
Function CreateBoxes(par=0)
For i=1 To 50
cub(i)=CreateCube(par)
EntityColor cub(i),Rand(128,255),Rand(128,255),Rand(128,255)
PositionEntity cub(i),Rnd(-10,10),Rnd(-10,10),Rnd(-10,10)
ScaleEntity cub(i),Rnd(0.1,0.3),Rnd(0.1,0.3),Rnd(0.1,0.3)
TurnEntity cub(i),Rnd(0,90),Rnd(0,90),Rnd(0,90)
Next
End FunctionSo with Mixail's new support, I get 400 fps, without I get around 170 fps.
Thanks again MixailV for this good lib!
EDIT2: Just noticed that this lib replaced something that probably got lost from Tomspeed
http://www.blitzbasic.com/Community/posts.php?topic=62380
the decls hasn't changed but there are new functions in a file that needs to be included (perhaps you didn't overwrite it)
No problems here, works great :)
Very nice man! Excellent!!
Yep - turns out I didn't copy the DECLS file to the right location. Silly me. All works now.
A little feature request?
Enable cubemaps to blend with the bump mapping? I can't seem to get it to work at all. The cubemap totally takes over. But only when used with bumpmaps. Any ideas?
The one request that comes to mind is entire support for compressed textures across the blitz3d platform.
Hi ppl! I once again with you :)
About cubemaps:
Don't use cubemap textures with bump texture, it's wrong (correctly works only on ATI videocards)!
This restriction of DirectX7. About it is written in DirectX7 specification (DirectX7 SDK).
Look an example FastExt_Example_EntityRefraction.bb with alternative technic.
Hopefully I am not the only one that is happy to see you back here MikhailV
Welcome back...
Welcome back MikhailV. Nice to see you back and thank you for your excellent libs.
Barney
Welcome back Mikhail!
Great libs!
Welcome back MikhailV
..mm..I cant access website in order to download updates..anyone else having similar problem?
Just tried. I cant access website too...
Works O.K. for me. Check the mail you received when you ordered the libs. The link to the download area is in there.
Barney
no problem here.
sure you used
http://fastlibs.com/login.phpthats the link thats at the bottom of the page as well.
don't forget that you most likely changed username and password after first entering the area ... and the page sadly has no retrieval option, at least as far as I've seen
..its working now...nice update..really really nice :)
..regarding clipping planes...are they infinite, or its possible to set up their dimensions??
Clipplanes can be only infinite.
..okay..thanks Mikhail ;) by the way, How many of them we can set up ?
See FastExt_Example_GfxDriverCapabilities.bb
Get max clipplanes count for current videocard from variable - GfxDriverCapsEx\ClipplanesMax
p.s. And read help-file! :P
hehehe..okay...and is it somehow possible to see how many polys are rendered during use of clipplanes..it seems that its showing all time same amount of polys, regardless using or not clipplanes?
Heh. TrisRendered() in Blitz3D is "fake" function and count triangles before drawing with DirectX. Also DirectX can't return real count of rendered triangles, sorry.
i have bought the library today and its very very nice, great job!!!
Anyone know if the 3D library its compatible with the Blitz3D SDK under Visual C++???
Thanks friends.
no its not
thanks Dreamora :-)
Hi again friends, one question.
Anyone has tried use at sime time Devils Shadow System and FastLib Ext with water effect for example??
Because i am trying it, and render separately works perfect but if i try render the water and the shadows at the same time, the things dissapear, i think that the problem is in the render of one of the libraries like a Buffer problem or something, anyone know something about it or know the solution??
Thanks a amillion guys.
Greets.
L_Draven, I'm no expert at this but I have experience with both systems. What I think is that you would have to render the whole thing in one pass. So, you have to put the shadows right after the scene, then add in the water and render all that in one pass. I'd give that a try.
If you ask Mikhail very nicely he might make us a shadow system to use with his Fast Extension library :D
..i did..and he said, one step at the time :)
Devil Shadow uses stencil buffer
FastExtends uses stencil buffer
so using those two will mess ones buffer handling no mather what you do.
1. FastExtends DON'T uses stencil buffer!
2. Blitz3D with FastExt change DirectX7 RenderStates for advanced features.
3. Also Devil Shadow System change DX7 RenderStates and don't save and restore states (new and old) — it's bad, very bad style and conflict with all other libraries uses DirectX7.
oops sorry :$
Assumed that it is used at least for the reflection - refraction stuff partially.
Thanks MikhailV i wrote a mail you from fastlibs.com
In this case there is no way to make it work togheter right??
Its no possible change/restore again the render states after the shadow render??
Thanks friends.
Thanks for the info about the cebmpas and bump maps not working together :o)
Tis a shame about that though!
It is possible to make them work together: Get Devil to fix his state mess.
I only use the fastextend library. And the new bump blend mode and cubemaps refuse to work with each other.
...Get Devil to fix his state mess.
Haha :) I can create two special functions - RestoreStates (for use before RenderWorld) and SaveStates (for use after RW). It should solve a problem. Wait in the new version...
I bought all 3 libs yesterday and every FastExt demo works perfectly on my machine, even though it's very old:-
Pentium4 1.60 Ghz 768MB Ram, Nvidia GeForce4 Ti4200, DirectX 9
Thanks, Mikhail.
..yeahh...thats great Mikhail...cmon man..include shadowmapping in your lib :) for both animated and non animated models :)
It's a superb library. I think Mark should be making a deal with this guy and selling this lib with blitz3d.
..anyone try dot3 combined with lightmap ? Im going to give it a try later..
I think Mark should be making a deal with this guy and selling this lib with blitz3d.
I shall be glad, if Mark will build-in new extends in Blitz3D 2.00 !
Hello, I'm gonna try to do something with spheremap. What I wish to do is render some stripes to a spheremap texture in order to fill the texture with the environment 360 degrees around. If anyone has a good way of doing this, I would try it out.
I just noticed this library, very interesting.
FastExtends does a lot of "hack into the B3D" memory behind the scene. Thanks to Vista 64Bit Security measures (higher than in any other Windows Distribution) you will most likely run in errors like that.
Is this issue confirmed? does the library work on Vista 64?
BUG: When I use cubemaps, sometimes the screen turns black. The only way to bring it back is power off / power on (on the monitor). It happens 1 out of 4 times to me when I use for example 4 cubemaps, one on each sphere.
No gamer is using Vista64
The enforced WHQL driver certification and a few other things make it a tripp to hell for gamers. As well many games refuse to run on it at all.
Vista64 is a pure business/workstation OS, not a home user OS, so for near sure not your target audience anyway.
The enforced WHQL driver certification and a few other things make it a tripp to hell for gamers. As well many games refuse to run on it at all.
It is true for many games written until a couple of months ago. However, in the near future 64bit OS versions are going to replace 32bit ones... when it happens, everything which wasn't compatible will not run anymore.
Blitz3D works well with XP 64, and most probably it runs as well on Vista 64.
Anyway, as it stands right now it was just a wild guess you had (metal mackey never confirmed that he was running Vista 64).
No gamer is using Vista64
You shouldn't narrow your target to hardcore gamers: it's a minority, and a difficult one to reach.
@Doiron: Simple test library (trial version) on Vista 64...
@_33: BUG? Please, send example for me...
MikhailV: Using the following example, when I press ESC to exit, the screen goes black. I need to power OFF and ON the monitor for it to display again! What is tricky is that it doesn't happen all the time.
; Example of use FastExt library
; (c) 2006-2008 created by MixailV aka Monster^Sage [monster-sage@...] <a href="http://www.fastlibs.com" target="_blank">http://www.fastlibs.com</a>
; Ïðèìåð ðåíäåðèíãà â êóáåìàï òåêñòóðû (ñ ïîìîøüþ áèáëèîòåêè FastExtension è ñòàíäàðòíûìè ôóíêöèÿìè áëèöà)
; Example of rendering cubemap textures (with FastExtension library functions and standart Blitz3D functions)
; ÂÍÈÌÀÍÈÅ! Çàêðîéòå âñå äðóãèå ïðèëîæåíèÿ ïåðåä òåñòèðîâàíèåì, ÷òîáû ïîëó÷èòü êîððåêòíîå êîë-âî êàäðîâ â ñåêóíäó!
; ATTENTION! Close other application before testing for correct FPS results!
Include "include\FastExt.bb" ; <<<< Include FastExt.bb file
Graphics3D 1360,1024,32,1
InitExt ; <<<< Îáÿçàòåëüíî èíèöèàëèçóåì ïîñëå Graphics3D
; Initialize library after Graphics3D function
Include "include\RenderCubemapFunctions.bb" ; <<<< see details in include file
Camera=CreateCamera()
PositionEntity Camera,0,0,-3
CameraRange Camera,0.1,5000
SetFont LoadFont("Tahoma",13)
Light=CreateLight()
TurnEntity Light,45,0,0
CreateBoxes()
; create cubemap textures for render (with Z-Buffer)
RenderCubemap_Texture0 = CreateTexture( 256, 256, 1 + 128 + 256 + FE_RENDER + FE_ZRENDER ) ; <<<< cubemap for rendering (with specular rendering mode)
RenderCubemap_Texture1 = CreateTexture( 256, 256, 1 + 128 + 256 + FE_RENDER + FE_ZRENDER ) ; <<<< other cubemap for rendering for testing
RenderCubemap_Texture2 = CreateTexture( 256, 256, 1 + 128 + 256 + FE_RENDER + FE_ZRENDER ) ; <<<< cubemap for rendering (with specular rendering mode)
RenderCubemap_Texture3 = CreateTexture( 256, 256, 1 + 128 + 256 + FE_RENDER + FE_ZRENDER ) ; <<<< other cubemap for rendering for testing
;SetCubeMode RenderCubemap_Texture0,1 ; (with diffuse rendering mode)
;SetCubeMode RenderCubemap_Texture1,1 ; (with diffuse rendering mode)
;SetCubeMode RenderCubemap_Texture2,1 ; (with diffuse rendering mode)
;SetCubeMode RenderCubemap_Texture3,1 ; (with diffuse rendering mode)
; place textures to objects
Entity0 = CreateSphere(32)
PositionEntity Entity0,-1.5,0,-1.5
EntityTexture Entity0, RenderCubemap_Texture0
TextureBlend RenderCubemap_Texture0, 2
Entity1 = CreateSphere(32)
PositionEntity Entity1,1.5,0,-1.5
EntityTexture Entity1, RenderCubemap_Texture1
Entity2 = CreateSphere(32)
PositionEntity Entity2,-1.5,0,1.5
EntityTexture Entity2, RenderCubemap_Texture2
Entity3 = CreateSphere(32)
PositionEntity Entity3,1.5,0,1.5
EntityTexture Entity3, RenderCubemap_Texture3
Sync = 0
Mode = 0
While Not KeyHit(1)
MouseLook Camera
If KeyHit(28) Then Sync = 1 - Sync
If KeyHit(57) Then Mode = 1 - Mode
If Mode=0 Then
; render to cubemap
RenderToCubemap Entity0, Camera, RenderCubemap_Texture0
RenderToCubemap Entity1, Camera, RenderCubemap_Texture1
RenderToCubemap Entity2, Camera, RenderCubemap_Texture2
RenderToCubemap Entity3, Camera, RenderCubemap_Texture3
Else
; render to BackBuffer and copy to cubemap
RenderCubemapCopyRect Entity0, Camera, RenderCubemap_Texture0
RenderCubemapCopyRect Entity1, Camera, RenderCubemap_Texture1
RenderCubemapCopyRect Entity2, Camera, RenderCubemap_Texture2
RenderCubemapCopyRect Entity3, Camera, RenderCubemap_Texture3
EndIf
RenderWorld
Text 10,10,"Fps: "+FPS()
Text 10,30,"VSync (key Enter): "+Sync
If Mode=0 Then
Text 10,50,"Mode (key Space): Render To Cubemap"
Else
Text 10,50,"Mode (key Space): Render To BackBuffer And CopyRect"
EndIf
Flip Sync
Wend
End
; âñïîìîãàòåëüíûå ôóíêöèè
Global DeltaTimeOld
Global MouseLookFirst=0
Function MouseLook(cam)
If MouseLookFirst=0 Then
MoveMouse GraphicsWidth()/2, GraphicsHeight()/2
DeltaTimeOld = MilliSecs()
MouseLookFirst=1
EndIf
Local t=MilliSecs()
Local dt = t - DeltaTimeOld
DeltaTimeOld = t
Local dk# = Float(dt)/16.666
s#=0.1*dk
dx#=(GraphicsWidth()/2-MouseX())*0.004*dk
dy#=(GraphicsHeight()/2-MouseY())*0.004*dk
TurnEntity cam,-dy,dx,0
RotateEntity cam,EntityPitch(cam,1),EntityYaw(cam,1),0,1
If KeyDown(17) MoveEntity cam,0,0,s
If KeyDown(31) MoveEntity cam,0,0,-s
If KeyDown(32) MoveEntity cam,s,0,0
If KeyDown(30) MoveEntity cam,-s,0,0
End Function
Global FPSCount = 0
Global FPSCountTemp = 0
Global FPSTime = 0
Function FPS()
If (MilliSecs()-FPSTime)>=1000 Then
FPSTime = MilliSecs()
FPSCount = FPSCountTemp
FPSCountTemp = 0
EndIf
FPSCountTemp = FPSCountTemp + 1
Return FPSCount
End Function
Function CreateBoxes(par=0)
For i=1 To 50
cub=CreateCube(par)
EntityColor cub,Rand(128,255),Rand(128,255),Rand(128,255)
PositionEntity cub,Rnd(-10,10),Rnd(-10,10),Rnd(-10,10)
ScaleEntity cub,Rnd(0.1,0.3),Rnd(0.1,0.3),Rnd(0.1,0.3)
TurnEntity cub,Rnd(0,90),Rnd(0,90),Rnd(0,90)
Next
End FunctionEDIT: I done more tests, I think the problem is with the instruction TextureBlend, which has been modified from original.
..today i try to use this lib with Ashadow(for sake of DOF and Bloom) and its colliding with Fastext...im so sad..anyone somehow bridge this?
I am running Vista 64bit and have no issues with this lib anymore.
Naughty Alien, you could do the DOF and Bloom with FastExt, skip AShadow. But you will need to figure out how to make the DOF and Bloom effect... :P AShadow is full of tricks, which could break the way Blitz3D or 3rd party libs like FastExt work. I would try to steer clear of AShadow if possible when approaching a serious project. Maybe look into a less hazardious method if you ever need shadows, like Devil, or Swift Shadow System.
MMMMmm wait, I don't think you can do DOF, because I think you need to play with the z buffer do make that possible. But Blur and Bloom is quite possible. Anyway, DOF doesn't look that good in AShadow.
I use Ashadow only because of bloom and DOF(so far I never saw usable DOF system better than Ashadow, regarding speed)..so i was dissapointed to see that FastExt colliding with Ashadow...sighhh..
It is true for many games written until a couple of months ago. However, in the near future 64bit OS versions are going to replace 32bit ones... when it happens, everything which wasn't compatible will not run anymore.
In the future, 32bit software will work again as well as MS kicked out the broken 32bit library emulation after Vista. I think the 2008 server already has a working one again, if not, Windows 7 has for sure, as even microsoft realized that the current one is inacceptable. perhaps they are even going to fix the Vista64 one by Vista SP2. Would definitely be great. Vista per se wouldn't be bad but the stuff that microsoft broke with their half baked attempts to make Windows more secure and stable are deadly annoying.
@Doiron: Simple test library (trial version) on Vista 64...
I didn't have a vista 64 machine to run the test on, so I preferred to ask here if anyone had a go with it. Glad everything's ok... I bought the library anyway. :)
@Dreamora: I agree that they'll go the emulation route: it shouldn't be a problem to have 99% compatibility, but it could still require triggering on the user part (like setting flags for the executable and the such).
Using the following example, when I press ESC to exit, the screen goes black. I need to power OFF and ON the monitor for it to display again! What is tricky is that it doesn't happen all the time.
@_33: I started it an example many time (with advanced TextureBlend and without). A problem could not see :(
@Naughty Alien: May be use classic DOF from
http://www.blitzbasic.com/codearcs/codearcs.php?code=1030 ?
I can create faster DOF version (with FastExt + FastImage libs)...
Hi MikhailV,
This thread is henceforth useless. There are too many posts and cannot be watched any more.
I think it is time to start a forum in Fast Libraries site :)
Do you have any plans about this?
hey Mikhail..can you post some example of faster DOF with Fastext+Fastimage libs...if works, I would like to drop off Ashadow..
I shall make an example as there will be a free time. (Now at me it is a lot of work)
I do not understand, why you cannot make a DOF, it is not difficult. FastExt+FastImage — the universal tool on the basis of which it is possible to make almost all effects! It is the open basis in difference from the ready closed decisions (such as AShadow, Devil Libs and etc.)
To me it seems to you it is necessary to study the theory, to use the imagination, and you can make set of beautiful effects.
p.s. The DOF effect is easily done by means Blitz3D. For optimization it is possible to use:
1. FastImage for bluring BackBuffer (after CopyRect to texture and draw to texture)
2. FastExt for render single entity (blured DOF layers)
3. There are no manipulations with the z-buffer. See classic DOF example (
http://www.blitzbasic.com/codearcs/codearcs.php?code=1030)
well..I dont have fastImage, only FastExtension lib, so if you dont mind post some nice and relatively fast example, so i can eventually make my additional purchase...so far I like to use ashadow simply because its damn fast...so...if you dont mind, post some compiled version..that would be great..
MikhailV, I have a couple questions:
- What blending mode should be used to have the spheres (in my previous example) reflect perfectly the blackness of the surrounding + the cubes? because it is more grey than black...
- I am also interested in post processing as I wish to make my own post process effect and need to have a good example for doing so using FastExt.
@Naughty Alien:
Ok. ... I shall make an example as there will be a free time. (Now at me it is a lot of work)...
@_33:
About blending mode... See FastExt file (include\RenderCubemapFunctions.bb) and set Cls params ClsColorRed=0, ClsColorGreen=0, ClsColorBlue=0 in procedures RenderToCubemap and RenderCubemapCopyRect :) Also set EntityFx=1 (disable light for entity)
About postprocess - download small Glow examle
http://fastlibs.com/download.php?id=glow.zip and other example
http://mystica.ucoz.ru/FX.rar (place fastext.dll & fastimage.dll (trial or retail ver.) near by *.bb files). There possible look, what create post-process effects.
Very very good library, i'll buy it :) but do you plan a
shadow system ?
Good to see you again ;)
MikhailV, thank you very much for all these answers, everything seems to be working here :) Very appreciated.
Still, I don't understand when I use the cubemaps, the system kills my monitor! (have to turn it off then back on)
1. FastImage for bluring BackBuffer (after CopyRect to texture and draw to texture)
How do you blur a buffer in fastimage? I was taking a fast look at the trial but didn't found anything about it.
BUG
===
In my code, I do the following:
ptr_texture = CreatureTexture (64, 64, 1 + 8 + 256)
SetBuffer (TextureBuffer (ptr_texture))
I get an "memory access violation" in:
Return SetBuffer_ (buffer)
which is localed in fastext.bb on function:
Function SetBuffer% (buffer%)
What to do?
EDIT: Same problem with only the flag 256, or with no flags at all.
EDIT2: Also I get a "memory access violation" on
Return ClsColor_ (red, green, blue, alpha, zValue)
Please don't recreate this thread in another forum. For one thing, you might lose out on sales, and i can't really be bothered looking through even more forums than i do now :o)
A new thread in here would be cool however :o)
Ross C: What are you talking about? I have a bug using Fast Extend library. You're thinking about someone else.
@_33: Where BUG?
I'm test your code:
ptr_texture = CreatureTexture (64, 64, 1 + 8 + 256)
SetBuffer (TextureBuffer (ptr_texture))
Works well! (only rename CreatureTexture to CreateTexture :) )
p.s. Give me not working example... I certain that you itself where that mistaken.
Sorry for the spelling. Anyway, I think it's an incompatibility between AShadow and Fast Extend. The problem occurs after setting up the resolution like so:
InitShadowLib()
Also, just want to confirm with you that a D3DTSS of 12 does not exist, because I found that in AShadow and it puzzled me for a long time.
Brrr... Again AShadow - terrible and unreadable code. I don't know what combine functioning FastExt and AShadow. I try to do this, but this much in a complicated way :(
About D3DTSS_ADDRESS = 12 — can be does not exist, but he is documented in DirectX7 SDK. I and Blitz3D use only D3DTSS_ADDRESSU = 13 & D3DTSS_ADDRESSV = 14.
3 reasons why I use AShadow:
- The water really looks good: Reflect + Refract + Depth fog
- The bloom and blur post process effects really look good also
- The shadow system is nice (but sometimes incompatible with some transparent entities)
The reason I want to use Fast Extend in my project is for the fast cubemaps.
The bloom's parameters in AShadow let you do blooms that are either very soft, or overbright that can flood the screen to white (which is exactly what I need).
The blurr I could program in fast Extend, as well as possibly use the water from Fast Extend also, but the shadow system is irreplaceable, except maybe for Devil Shadow System.
I don't think I'm the only one that wishes to combine libraries like this, as I am probably one in a few hundred that bought AShadow.
Oh, and concerning AShadow that is badly written (or unreadable code), I made myself a version of it that is much more readable which works just the same.
I don't think it is up to MikhailV to work on combining his library with another plugin (I believe AShadow is not being developed still, yet it is being sold, One of the members said there was a big bug in it - memory leak)
All you could say it is a wishlist item to have MikhailV do his own shadow and improve what you like
It is not a question of combining, it is a question of compatibility. FastImage and AShadow are fully compatible. I'll do more research as to why the problem remains, if I have a chance, with Fast Extend and AShadow.
I agree with _33..because of same reasons Im still using Ashadow..simply no match to DOF and Bloom that lib generate and its damn fast in comparison with everything else out there...I will be happy to drop it off, if i see that FastExt lib, giving me such features...
I don't think it is impossible to do the same bloom using FastExtend. Actually, it would be to properly port the bloom over from AShadow to only use FastExtend which is the task at hand. And, I don't know yet if fast Extend has all the tools to copy the behaviour of the bloom of AShadow, but I will look into it. The bloom that MickhailV programmed and gave as example for post process effect couple weeks back is halfway to the same bloom done in AShadow.
Thread became very much to greater, we continue here —
FastExt Thread 2