Ultra FastImage for Blitz3D

Blitz3D Forums/Blitz3D Userlibs/Ultra FastImage for Blitz3D

MixailV(Posted 2007) [#1]
Ultra fast library for work with 2D graphics in the Blitz3D 1.98 (in 3D mode).

Features:
- All functions - analogue BlitzMax, a conclusion occurs through DirectX7 and it is very fast.
- Rotations, alpha, scale, blend, text functions are accessible, also there are examples.
- Pixel-perfect quality of a conclusion of a image (at absence of transformations and a square texture)
- Management of a 2D projection is accessible!



Download Full: FastImage 1.434 FULL (390 Kb)

p.s. Excuse, but while all help in Russian (while use the translator)


Danny(Posted 2007) [#2]
He wow!

That works very fast, nice functions and good features! Well done!

In stead of 30 smiley's floating around, I set it to 1500 images !!! And it still runs at 60+fps!! That's bloody impressive! 'very nice!'

Yes a simple help file in English would be good and much appreciated! :)

thanks for sharing man!

D.


Pinete(Posted 2007) [#3]
Amazing!
it's pretty fast and completely easy to use!!!
could be perfect if it could implement a system to put text!
Really incredible!
As I say, the only lack could be a text system based on the
stuff already exists.
Great!!

regards and thanks for sharing!!!!


Pinete(Posted 2007) [#4]
Also as Danny says, a english instructions of comments will be really apreciated, even being very easy to use.
:)

regards again!


Chroma(Posted 2007) [#5]
Say InitDraw cannot be found. Sorry don't have time for this...


mongia2(Posted 2007) [#6]
it is beatiful
it work fine

mongia

it is free??


LAB[au](Posted 2007) [#7]
Very nice work!

> at chroma

decls+dll in userlibs folder ... then it runs.


Panno(Posted 2007) [#8]
wow


MixailV(Posted 2007) [#9]
>> Say InitDraw cannot be found. Sorry don't have time for this...

Simple copy FastImage.decls file (from decls folder) to %BlitzPath%\userlibs\


Pinete(Posted 2007) [#10]
Hi MixailV,

Do you think to include text functions in a near future?

Regards!


MixailV(Posted 2007) [#11]
>> it is free??
Absolutely FREE...

When use the library in their own project necessarily a mention of author -> MixailV aka Monster^Sage

p.s. Excuse me for my english


MixailV(Posted 2007) [#12]
Hi Pinete,

Text functions - may be... Simple load AnimTexture (with bitmap monospace font) and draw it...


Mustang(Posted 2007) [#13]
Wow - that was cool... and fast! Thank you for the lib, I'm sure that I'll find use for it in my projects.


miez(Posted 2007) [#14]
Keeps giving me a "duplicate identifier error" in the decls file... a shame, because this looks interesting.


MixailV(Posted 2007) [#15]
to miez:
but your Blitz, in one of decls files there is functions, which name have complied with names function from my library


Mikele(Posted 2007) [#16]
Awesome. Thank you MixailV.


Beaker(Posted 2007) [#17]
I get the same as miez. It is because of Toms dx7test.dll/decls. You would be well advised to use function names like FI_InitDraw() etc.


Chroma(Posted 2007) [#18]
Where do i put the FastImage.dll file?


Moraldi(Posted 2007) [#19]
Your lib looks excellent. But I cannot read your code comments and your help file (because of my Greek Windows I suppose). Does anyone know how I can read them?


Mustang(Posted 2007) [#20]

Where do i put the FastImage.dll file?



Like every other used lib ->


> at chroma

decls+dll in userlibs folder ... then it runs.




Mustang(Posted 2007) [#21]

I cannot read your code comments and your help file



Oh yes, I meant to ask that also... mine is all greek too ;P

I have standard UK XP but the keyboard is finnish (scandinavian) so maybe that causes it?


MixailV(Posted 2007) [#22]
I have spent 2 weeks of its time to write quick and qualitative library, has done its absolutely free for use. Really nobody from you can not spend little time and translate the file a help, do the good deal for the whole community?

p.s. 80% russian Blitz community easy reads the english a text, but 40% can communicate in english. I certain that you have a people, which could do translation...


MixailV(Posted 2007) [#23]
>> I get the same as miez. It is because of Toms dx7test.dll/decls. You would be well advised to use function names like FI_InitDraw() etc.


Simply open decls file and rename function as you please

InitDraw% (Direct3DDevice7%) : "InitDraw_"
to
FI_InitDraw% (Direct3DDevice7%) : "InitDraw_"
or
DrawInit% (Direct3DDevice7%) : "InitDraw_"

this elementary :)


MixailV(Posted 2007) [#24]
Small update v1.31 (see 1st post), fixed bug with drawing animated images...


CopperCircle(Posted 2007) [#25]
Hi, great lib. How can I use it to draw onto a Blitz Image?


MixailV(Posted 2007) [#26]
How can I use it to draw onto a Blitz Image?

FastImage works with DirectX7 stright so render occurs only in BackBuffer ( Blitz3D uses slow Windows GDI, so drawing possible in image(texture) )

While use CopyRect from BackBuffer to ImageBuffer (or TextureBuffer)...


Mustang(Posted 2007) [#27]

I have spent 2 weeks of its time to write quick and qualitative library, has done its absolutely free for use. Really nobody from you can not spend little time and translate the file a help, do the good deal for the whole community?



And I'm glad that you did - if comments are not in english that's allright, demo code is clear enough. But if there is someone who could do the translations it would be great like MixailV said.


Gillissie(Posted 2007) [#28]
MixailV,
Thanks for the library. I think that many people would be willing to help translate the help into English, but we don't even have a rough idea of what the help currently says because it all looks jumbled to us.


Panno(Posted 2007) [#29]
he MixailV
i have some russian language skill but i cant really translate this :
InitDraw% (Direct3DDevice7%)
Библиотеку перед использованием следует инициализовать данной командой.

ok its InitDraw% (Direct3DDevice7%) but what 's your comment about ? ;)


MixailV(Posted 2007) [#30]
verbatim:
InitDraw% (Direct3DDevice7%)
Library before use follows initialize the given command. It should be used strictly after Graphics3D.
System property is passed to an entrance "Direct3DDevice7" as in an example is lower always - InitDraw SystemProperty ("Direct3DDevice7")
Return 0 if it was not possible to library initialize owing to incorrectly set system property "Direct3DDevice7"

or briefly:
Before use the library start function InitDraw with param SystemProperty ("Direct3DDevice7"), example - InitDraw SystemProperty ("Direct3DDevice7"). Use this function only after Graphics3D command...


Mikele(Posted 2007) [#31]
i will try.
Panno you can see proper fonts if you open doc with IExplorer and change Page>Encoding>Cyrillic.


JoeGr(Posted 2007) [#32]
This is excellent. Thanks for sharing.


Panno(Posted 2007) [#33]
my fault


@rtur(Posted 2007) [#34]
>InitDraw% (Direct3DDevice7%)
>Библиотеку перед использованием следует инициализовать данной командой.

Translation:
"You need to ititialise library using this function before anything else."


MixailV(Posted 2007) [#35]
Thanks @rtur! :)
my english really very bad, but then french in rate... :(


Paolo(Posted 2007) [#36]
THIS IS GREAT, THANKS A LOT MixailV

Here there's a Russian->English translator,
http://translation2.paralink.com/

this is a direct translation of the intro in the help file,
I think it makes some sense:

The help of library FastImage (version 1.3 Freeware) for Блиц3Д (version 1.98)

(c) 2007 либа it is made MixailV aka Monster^Sage [monster-sage@...]
At use of library in the works necessarily mention of author MixailV.
It is forbidden to place and build in FastImage.dll inside of others DLL and to it similar.
It is not desirable to build in FastImage.dll in EXE files, stability of work in it
Case it is not guaranteed.
The library is intended for fast and convenient work with 2Д графикой in Блиц3Д
(Only version 1.98 and above, in other versions working capacity is not guaranteed)
Syntax of the majority of commands and principle of work with them is similar БлицМаксу,
That will be convenient to the programmers constantly using 2Д in БлицМаксе.
Also the standard set is added by procedures which will be useful advanced
To programmers for achievement of any possible effects.
The library works directly with ДиректИкс 7 and speed of work is very high, but the most important
In that various transformations now are accessible at отрисовке pictures, and also
The task of any color and transparency.
It is necessary to remember, that any picture which you wish to use, should be created
With помошью commands CreateImageEx from earlier loaded structure. And if you want
To achieve high quality отрисовки (a пиксел-perfect or a point-in-point), follows
To use square pictures (structure) with the sizes, multiple degrees of the two, such as
2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024, 2048x2048.
If the picture has the size mismatching listed, costs in the graphic editor
To add "emptiness" that the picture became the standard size, having filled "emptiness" a transparency.
If all таки quality has no value, load a picture with any sizes.
The picture (structure) can be any type supported Блицем, including DDS.



Paolo.


caff_(Posted 2007) [#37]
Nice, fast, I would like to use this...


Pudding(Posted 2007) [#38]
Very cool library!

Is it possible to use it with multiple viewports? I can't seem to get it to work in a split-screen app....

As soon as I use CameraViewport, all FastImage commands seem to draw relative to that viewport. I've tried turning the cameras off and on, but it always seems to use the last rendered camera's viewport.

EDIT:

I figured it out. My main view was just using 2d commands and didn't have a camera. I just needed to give that view a default camera and switch between that and my scene camera...

-Pudding


OJay(Posted 2007) [#39]
PUDDING IS ALIVE!! O_O

where did you were?!? how's going? what happened? omfg, he's alive! :D

welcome back ;)


/edit: sorry for offtopic


Pudding(Posted 2007) [#40]
Thanks OJay! I've just been incredibly busy! Been using Blitz (and B3d Pipeline of course) at work for rapid prototyping. But I don't want to derail this thread - FastImage is awesome!

-Pudding


MixailV(Posted 2007) [#41]
to Pudding:
Download v1.32 from first post.
And be happy :)

;v1.32
; - fixed dependency from viewport of the cameras, given through CameraViewport()


Pinete(Posted 2007) [#42]
Thanks MixailV!!!

best regards!


Pudding(Posted 2007) [#43]
Thanks MixailV, it works a treat!

-Pudding


Pudding(Posted 2007) [#44]
I'm having a problem drawing images on top of a 3d scene if I use SetViewport... The scene either disappears or seems to be clipped. Does SetViewport effect the zbuffer or camera ranges...?

(It works fine without SetViewport)

-Pudding


MixailV(Posted 2007) [#45]
SetViewport - does not depend the cameras on adjusting, and full analogue of the command from BlitzMax and set clipping region (rectangle) for all drawing operations (uses DX7 SetClipPlane).
For achievement of the result, look like CameraViewport, use commands of management 2D projection - SetProjScale, SetProjOrigin, SetProjHandle, SetProjRotation, SetProjTransform with SetViewport (or without...)


Paolo(Posted 2007) [#46]
MixailV,
I'm testing some things using masked areas but I got
the same problem as when working with Blitz images and textures,

masked areas of dinamically created images/textures are not detected,

have a look at this code,
Do I have any way to make the image have the black pixels transparent ?
basically I'm using CopyRect to put the screen in one of your images but
I can't get the black pixels of the image to be masked:


Paolo.


MixailV(Posted 2007) [#47]
in Blitz:
1. Mask for texture = AlphaChannel
2. Only LoadTexture function (with flag 4) auto-generate (auto-create) mask for texture
3. CopyRect don't uses AlphaChannel or Mask (always fill non-transparent value)
4. ReadPixelFast and WritePixelFast can be used for creating Mask (slow, non-realtime)

Blitz with FastImage:
5. May be use blend = FI_LIGHTBLEND (fast)


MixailV(Posted 2007) [#48]
For drawing primitives (lines, rectangles, plots, circles and ovals) use functions:

DrawRect% (x%, y%, width%, height% [, fill% = 1] )
DrawRectSimple% (x%, y%, width%, height% [, fill% = 1] )
DrawLine% (x%, y%, x2%, y2%)
DrawLineSimple% (x%, y%, x2%, y2%)
DrawPlot% (x%, y%)
DrawOval% (x%, y%, width%, height%)

These functions much quicker built-in blitz3d !!!


mongia2(Posted 2007) [#49]
please

write
DrawRect_ex% (x%, y%, width%, height%, fill%) : "DrawRect_"

change a DrawRect_ in DrawRect_ex

thanks your system is the best!
mongia


MixailV(Posted 2007) [#50]
Change name a function in decls-file as you more like...

YourCustomNameHere% (x%, y%, width%, height%, fill%) : "DrawRect_"


mongia2(Posted 2007) [#51]
ok


MixailV(Posted 2007) [#52]
Update in 1st post... (bug fixed)

p.s. Thx to Andrei Jiman jr


Filax(Posted 2007) [#53]
Hi MixailV

Great lib ! thanks to share :) just one question :

What the difference between :

DrawLine% (x%, y%, x2%, y2%)
DrawLineSimple% (x%, y%, x2%, y2%)

Keep up good job russian friends :) Vodka powa :)


MixailV(Posted 2007) [#54]
All functions with the assurance "Simple" - draw without transformations (scale, rotation and etc.) - maximum fastest (may be used for GUI)


Vodka powa :)


Vodka with Beer rulez foreva :))))))


MixailV(Posted 2007) [#55]
Text functions coming soon...


mongia2(Posted 2007) [#56]
thanks funzion text in b3d is very sloww


Pinete(Posted 2007) [#57]
wooOWWW!!! cool!!
:)

thank you very much!


Pineapple(Posted 2007) [#58]
I'm sorry, but I'm not sure how using/creating userlibs works. Anyone mind informing me?


MixailV(Posted 2007) [#59]
Update! (see 1st post)

; v1.4
; - added text(font) functions, based on AnimTextures
; LoadImageFont, SetImageFont, FreeImageFont, DrawText, StringWidthEx, StringHeightEx, GetFontProperty


Danny(Posted 2007) [#60]
Excellent! thanks dude!

checking it out now...


JoeGr(Posted 2007) [#61]
Thanks!


Pinete(Posted 2007) [#62]
WOW!!!!!!
I'm going to download right now!!!!
:))))


DREAM(Posted 2007) [#63]
This is very good MixailV, very fast , the fastest free 2d drawing thingy for Blitz3D....sppreciate it....

Ian


MixailV(Posted 2007) [#64]
Thx to all!


the fastest free 2d drawing



What commercial 2D library quicker?


MixailV(Posted 2007) [#65]
to Pinete:

(c) 1982 Sinclair Research Ltd.


Speccy the best! :)


Pinete(Posted 2007) [#66]
:) Spectum is great! ;)
Hi MixailV!
Text functions are incredible, thanks a lot!! I've implemented and works perfectly, so thanks a lot!
Just a question...
What program did you use for generating the fonts?

Thanks a lot and best regards!


lo-tekk(Posted 2007) [#67]
So here's a translation attempt of the help-file. Not all phrases are translated, but i think it is good enough to get a basic understanding. I have used the following service for translation: http://www.online-translator.com

Here the help:
http://freenet-homepage.de/lo-tekk/fastimagehelp-eng.html


ToM C.(Posted 2007) [#68]
HI MixailV, really great Lib but one thing I'm missing is

ReadPixelFast???

may is in the dll but not in the declarations,
please, include such a command. This would be useful to get values back.


CopperCircle(Posted 2007) [#69]
I am using this dll to process Blitz images, I have to copy the backbuffer back onto the image which is fine for images smaller than the window size.
Is there any way it could be adapted to use the image memory and process large images?


MixailV(Posted 2007) [#70]

Just a question...
What program did you use for generating the fonts?


Texture for font I shall create in Photoshop, .txt file (header) - manually, char-width table with small program:

Graphics3D 800,600,0,2

SetFont LoadFont("FontName",FontSize)

f=WriteFile ("CharWidthTable.txt")
If f<>0 Then
 For i=32 To 255
  WriteLine f,Str(i)+" = "+StringWidth(Chr(i))
 Next
 CloseFile f
EndIf


p.s. That quality of the DrawText was pixel-perfect - each frame anim-textures of the font must be one of the stock sizes: 2х2, 4х4, 8х8, 16х16, 32х32, 64х64, 128х128, 256х256, etc.


MixailV(Posted 2007) [#71]

HI MixailV, really great Lib but one thing I'm missing is
ReadPixelFast???


Use standard Blitz3D command ReadPixelFast and WritePixelFast for change images!
fastImage=CreateImageEx(YourTexture, .....)
LockBuffer TextureBuffer(YourTexture)
     pixel=ReadPixelFast(x,y)
     ; or
     WritePixel x,y,pixel
     ...
     ...



MixailV(Posted 2007) [#72]

I am using this dll to process Blitz images, I have to copy the backbuffer back onto the image which is fine for images smaller than the window size.
Is there any way it could be adapted to use the image memory and process large images?


try so:
fastImage=CreateImageEx(YourTexture, .....)
...
...
CopyRect x, y, w, h, x_InYourTexture, y_InYourTexture, BackBuffer(), TextureBuffer(YourTexture)

Size of the picture is limited by maximum size of the texture (depends on videocard-capability)

fastImage memory == YourTexture


Pinete(Posted 2007) [#73]
:)
Thanks a lot!
:)_


ToM C.(Posted 2007) [#74]
Thanks a lot too!!!

...and I've improved your 'char width code' a little bit to write the Font.pgn automaticly:

Graphics3D 800,600,0,2

SetFont LoadFont("TAHOMA",16)

f=WriteFile ("CharWidthTable.txt")
If f<>0 Then
 For i=32 To 255
  WriteLine f,Str(i)+" = "+StringWidth(Chr(i))
 Next
 CloseFile f
EndIf

;Create Font Image 
FrameWidth=16
image=CreateImage(FrameWidth*16,FrameWidth*16)
SetBuffer ImageBuffer(image)
ClsColor 0,0,0:Cls:Color 255,255,255
Color 255,255,255
chcount=0
For j=0 To 15
	For i=0 To 15
		txt$=Chr(chcount)
  		Text i*FrameWidth,j*FrameWidth,txt$,False,False
		chcount=chcount+1
 	Next
Next
SaveImage (image,"font.png")



Iamhere(Posted 2007) [#75]
I like this Ultra FastImage DLL
and I also made a small programm that creates the Files automaticaly.
Blitz3D saves only .bmp Files not .png, you must give them
after creation an alphamap with e.g. "The Gimp" or other graphic programms and save them as .png




Pinete(Posted 2007) [#76]
Wow!
Thanks for those piece of code! very useful!
:)
regards!


MixailV(Posted 2007) [#77]
Update! See 1st post.
Fixed bug with offset primitive on 1 pixel from source coordinates (on GeForce videocards) of the drawing moreover this revealled itself nonlinear. Brrr...


mongia2(Posted 2007) [#78]
thanks!!!

spedd!

mongia


Pinete(Posted 2007) [#79]
thanks a lot MixailV!!!!
:))))


chi(Posted 2007) [#80]
hmm, now my font looks weird...







but anyway... great dll ;-)
cheers, chi


MixailV(Posted 2007) [#81]
opsss... sorry

please re-download Dll, now all fine!

p.s. Creator of the IDEal ready to do support unicode (UTF-8), I have already checked test version, it work fine. I begin development of the separate library for conclusion unicode on base vector fonts (TrueType, OpenType...) and operate with unicode-text. Support unicode in FastImage until know what realize, since code of chars can be in much range...


mongia2(Posted 2007) [#82]
thanks for unicode!

mongia!

i attend


chi(Posted 2007) [#83]
works now... thx!


Pinete(Posted 2007) [#84]
Thanks a lot MixailV!
It's one the best libraries for Blitz I've ever seen!!
Unicode text will be amazing, is one of the most important things I've waiting for.

Thank you very much.

All the best!


- SPOKE -(Posted 2007) [#85]
Nice job MixailV !!!

very fast on my little 8800 :)


John Blackledge(Posted 2007) [#86]
I get a Memory access violation on
DrawRectSimple_% (x%, y%, width%, height%, fill%)
where
Rect x%, y%, width%, height%, fill%
works fine.

Any ideas?


John Blackledge(Posted 2007) [#87]
Sorry - forget to do InitDraw().
Tests continuing.


John Blackledge(Posted 2007) [#88]
Also forgot to do StartDraw() and EndDraw().
That'll teach me to code while I'm still in my dressing-gown.

One last request:
Is there any chance of having a version of DrawImageRectEx_% (image%, x%, y%, width%, height%, frame%) which will handle non-square textures the way that DrawBlockRect( hbmp, x1,y1, 0,0, w,h) does, so that we can blit non-square sections of an image? That way I could use your lovely alpha functions etc.


MixailV(Posted 2007) [#89]
I have nearly done function:
DrawImagePart% (image%, x%, y%, width%, height%, PartX%=0, PartY%=0, PartWidth%=0, PartHeight%=0, frame%=0, clamp%=0)
I test it and realise new FastImage version.

p.s. Also can create func for drawing free primitives with texture or without it...


John Blackledge(Posted 2007) [#90]
Excellent Mixhail!
Let us know as soon as it's done.
As before, we're all very grateful.


Pinete(Posted 2007) [#91]
MixailV is a football crack!!
;P

regards!


Boiled Sweets(Posted 2007) [#92]
REALLY need the full docs in English!


John Blackledge(Posted 2007) [#93]
Yeah, particularly when trying to work out 4-parameter color functions!


MixailV(Posted 2007) [#94]
New update! :D
Download from 1st post.

; v1.434
; 2 userful functions added - DrawImagePart and DrawPoly (for advanced users)
; and 2 examples - FastImage_Example_DrawImagePart.bb, FastImage_Example_DrawPoly.bb


MixailV(Posted 2007) [#95]

REALLY need the full docs in English...


Oh... I bad know english, shall not be able to translate help. Use e-Translators.
Think that detailed examples will help you to understand


John Blackledge(Posted 2007) [#96]
Wow - utterly fantastic.

Only problem is:
'offset out of range' at:-
PokeFloat bank,offset+12,0.5 ;vetrex U
in
FastImage_Example_DrawPoly.bb


MixailV(Posted 2007) [#97]
My bug :) Fixed! Re-download archive.


John Blackledge(Posted 2007) [#98]
Wow - the poly function rocks.
Between FastImage and FastText this is what Blitz should have always had, then there would have been no need for mesh-based text and huds.


ksalomao(Posted 2007) [#99]
FastImage and FastText is fantastic!
Is it possible to do pixel-perfect collisions with fastimage?


MixailV(Posted 2007) [#100]

... pixel-perfect collisions with fastimage?


I create library for drawing only (HUD and GUI). I think - no sense to use Blitz3D (with FastImage) as engine 2D... This is a bad idea ;)


Naughty Alien(Posted 2007) [#101]
..this is great lib...but I have weird issue with it...on my 7600GT its working just fine (I put few things on screen as a simple HUD)..now, when i run same program on my 5600FX some HUD elements is not visible and others is completely out of order I set up...for HUD I use DDS, but as i said on 7600GT working just great...can this be issue with graphic card??


MixailV(Posted 2007) [#102]
Strange... Screenshots or examples?


Naughty Alien(Posted 2007) [#103]
..it seems that my 5600FX was damaged..I notice that I cant get TV out properly and its comming out as a Black/White image with a lot of noise...by the way, regarding HUD/GUI stuff, when you going to release that Mixail, and is it going to be free too??


MixailV(Posted 2007) [#104]
v1.434 - release version and absolutly free for use!

(only may be added new draw-types for DrawPoly function...)


Linaxys(Posted 2007) [#105]
Exellent!
Keep up the great work!


_33(Posted 2007) [#106]
MixailV, excellent work. But, is there any plan to improve this FastImage tool to be able to render into a frame buffer? Or, how can I do that? I have tried many things and it didn't work. The goal would be to isolate all Draw commands into a frame buffer and render there so we can then use that as a texture/image for another FastImage command.

Thanks!


MixailV(Posted 2007) [#107]

Or, how can I do that?


Ohh...

FastImage works with DirectX7 stright so render occurs only in BackBuffer. While use CopyRect from BackBuffer to TextureBuffer. (texture buffer for texture used in CreateImageEx function)



_33(Posted 2007) [#108]
> FastImage works with DirectX7 stright so render occurs only in BackBuffer. While use CopyRect from BackBuffer to TextureBuffer. (texture buffer for texture used in CreateImageEx function)

That is understood but if I wanted to only capture the render from the FastImage, and not the 3D models in the background, how can I go about? I haven't found the trick (yet!).


Uber Jase(Posted 2007) [#109]
Hi,

Sounds good but when I try to run any of the examples, I get a startup error graphics-create failed eroor message. Other Blitz code runs ok. Am I doing something wrong?

Thanks


Uber Jase(Posted 2007) [#110]
I just tried the fasttext lib and get the same error message:( I placed bothe the dll and decal files into the userlib folder. Any ideas?

Hmmm, the fasttext example which doesn't use the include file works ok.

Thanks:)


Uber Jase(Posted 2007) [#111]
Stupid me. I got it working by turning off debug. WOW its fast:) Is there collision detection commands?

Ta


_33(Posted 2007) [#112]
MixailV,

Could it be possible to have a Drawtext command that works with banks? Because strings$ are too slow in Blitz3D for the type of work I'm doing. Banks supply the address of the text data, which of course would terminate with a byte 0.

Also, is it true that DrawImageEx_ is faster than DrawPoly? I've created a square poly and compared the speed. From my test, it seems it's better to use DrawImageEx_ for a square image. And the bonus is we can use SetScale, SetAlpha and SetColor functions compared to DrawPoly. Here is the poly code:

Function CreateCharacterContainer (col% = $FFFFFFFF, sizeX# = 16, sizeY# = 16)
	bank = CreateBank(20 + (4 * 20))

	; header info (20 bytes (2 integer value reserved))
	PokeInt		bank,0,4						;count vertices
	PokeInt		bank,4,FI_NOWRAP				;wrap mode (combine flags: FI_WRAPU, FI_MIRRORU, FI_WRAPV, FI_MIRRORV or use: FI_NOWRAP, FI_WRAPUV, FI_MIRRORUV)
	PokeInt		bank,8,FI_TRIANGLEFAN			;drawing mode (possible values: FI_TRIANGLEFAN, FI_TRIANGLESTRIP, FI_LINESTRIP )
	offset = 20

	; TOP LEFT (20 bytes per vertex)
	PokeFloat	bank,offset,-(sizeX * 0.5)		;vertex X
	PokeFloat	bank,offset+4,-(sizeY * 0.5)	;vertex Y
	PokeInt		bank,offset+8,col				;vertex Color $AARRGGBB
	PokeFloat	bank,offset+12,0				;vetrex U
	PokeFloat	bank,offset+16,0				;vertex V
	offset = offset + 20
	
	; TOP RIGHT (20 bytes per vertex)
	PokeFloat	bank,offset,+(sizeX * 0.5)		;vertex X
	PokeFloat	bank,offset+4,-(sizeY * 0.5)	;vertex Y
	PokeInt		bank,offset+8,col				;vertex Color $AARRGGBB
	PokeFloat	bank,offset+12,1				;vetrex U
	PokeFloat	bank,offset+16,0				;vertex V
	offset = offset + 20

	; BOTTOM RIGHT (20 bytes per vertex)
	PokeFloat	bank,offset,+(sizeX * 0.5)		;vertex X
	PokeFloat	bank,offset+4,+(sizeY * 0.5)	;vertex Y
	PokeInt		bank,offset+8,col				;vertex Color $AARRGGBB
	PokeFloat	bank,offset+12,1				;vetrex U
	PokeFloat	bank,offset+16,1				;vertex V
	offset = offset + 20

	; BOTTOM LEFT (20 bytes per vertex)
	PokeFloat	bank,offset,-(sizeX * 0.5)		;vertex X
	PokeFloat	bank,offset+4,+(sizeY * 0.5)	;vertex Y
	PokeInt		bank,offset+8,col				;vertex Color $AARRGGBB
	PokeFloat	bank,offset+12,0				;vetrex U
	PokeFloat	bank,offset+16,1				;vertex V
	offset = offset + 20

	Return bank
End Function

Cheers.


MixailV(Posted 2007) [#113]

Could it be possible to have a Drawtext command that works with banks?


Send pointer of string or bank in library equally (on speed). I certain that will not be an increase to capacity.


Also, is it true that DrawImageEx_ is faster than DrawPoly?


DrawPoly function copies and transforms vertices from bank to local memory... and can be a little slowly. But with DrawPoly quicker to draw much triangles for one batch!
SetScale, SetRotation, SetMatrix work correctly with DrawPoly object. And possible use SetColor, SetAlpha functions in DrawPoly with flag FI_COLOROVERLAY !!!


_33(Posted 2007) [#114]
MixailV, you know I like your tool very much! But, it might be possible I will have to use an alternate method for my terminal system. The reason for this is because with FastImage, it is required to have the functions executed every frame, and not buffered for continuous execution. With the current method, it takes too much 3D graphics power and leaves little to the rest of the application. The method I am looking for is to have an automatic draw from the 3D graphics card, and once in a while be able to kill the FastImage buffer and re-initialize it with different content.

My worklog: http://www.blitzbasic.com/logs/userlog.php?user=10319&log=1460

Cheers.


Shifty Geezer(Posted 2007) [#115]
This is soooo fantastic! Huge congrats, tipped hats, and whatnot to you MixailV! I'm seriously impressed.


Shifty Geezer(Posted 2007) [#116]
I've created a simple intro guide tutorial reference type thing. It's good practice for me to learn the ins and outs of the system, and hopefully someone will find it useful. You can download from here

If this is useful to people, I'll add more when I explore the other functions, and also cover Fast Text. But if everyone is getting on fine with these libs, there's not much point. So let me know what you want!


_33(Posted 2007) [#117]
Nicely done Shifty Geezer!


Shifty Geezer(Posted 2007) [#118]
Well there's stuff still be learnt that I'll report on probably at some point.

MixailV - There seems to be a bug, or at least weird thing. The Fast Image drawing doesn't work unless I call a Blitz draw command before your Fast drawing functions. This seems to apply to Fast Text too. I draw a background image with Fast Image. Then each frame I draw a part of the background to clear an area, and draw some text with Fast Text. Nothing was getting drawn at all. I found that if I have a Blitz3D image drawing function, that updates the Fast draws. And if I clear the screen with a Cls, the draw functions, images and text, work.


_33(Posted 2007) [#119]
Shifty Geezer. I'll tell you, the thing about these two is that you have to call them every frame. The blitz3D Flip will make it display, since flip brings the backbuffer to the frontbuffer. So everything you draw with FastImage or FastText has to be redawn the next frame. I asked MixailV if it was possible to draw to an imagebuffer() and he responded that it is not possible because FastImage draws direct to the display.

But, it's so fast that no matter what, if you use it properly, you shouldn't have any speed issues.


Shifty Geezer(Posted 2007) [#120]
Sure, but that's not the problem I'm talking about. In the following code, if you remove the 'Cls' command before the loop, nothing's drawn. Keeo the Cls in, and as you'd expect, there's a background image, text, and rotated, transparent copy of the background image.

Include "_lib_FastText_Ascii.bb"
Include "_lib_FastImage.bb"

Graphics3D 780,585,0,2
FI_InitDraw SystemProperty("Direct3DDevice7")

tex_UI=LoadTexture ("UI\UI_1024.png",1+2)
backdrop=FI_CreateImageEx(tex_UI, 1024, 1024,FI_AUTOFLAGS)

fnt=LoadFont("comic sans MS",32) 
SetFont fnt

Cls	; <----------- Comment out this line and nothing is drawn

Repeat
	FI_SetBlend FI_ALPHABLEND
	FI_SetAlpha 1.0:  FI_SetRotation 0 
	FI_StartDraw : FI_DrawImageEx backdrop,400,300
	s$="Does this "
	TextRect 390,292,200,100, s$, FT_CENTER
	FI_DrawRect 390,292,200,100,0
	FI_SetAlpha 0.51 : FI_SetRotation 45
	FI_DrawImageEx backdrop,400,300 : FI_EndDraw
	
	Flip
Until KeyDown(1)
In my actual app, one Cls before the drawing starts isn't enough. The code's undergoing a reqrite so I haven't an example to show, but basically I was having to Cls or just Draw a tiny bit with B3D's commands with each screen refresh. It's enough to havwe CopyImageRect() on a tiny square, but FastImage needs B3D to write to the buffer before it does.


_33(Posted 2007) [#121]
MixailV: Is it possible to use DrawLineSimple in conjunction with SetLineWidth? I need to define line width in order to match font size for underline!

Cheers.


CopperCircle(Posted 2007) [#122]
Hi, I have asked before but still cant find way to fastdraw a image over another image, that is larger than the window/screen size? Anyway to do it?


_33(Posted 2007) [#123]
CopperCircle: Split the image in two.


MixailV(Posted 2007) [#124]

Is it possible to use DrawLineSimple in conjunction with SetLineWidth? I need to define line width in order to match font size for underline!


I include this in new update, this will soon...


CopperCircle(Posted 2007) [#125]
_33 thanks good idea, why didn't I think of that!


_33(Posted 2007) [#126]
MixailV, I'm still working on my terminal (close to ending sub-project). Thanks to your very excellent FastImage. I owe you much gratitude.

Cheers.


nrasool(Posted 2007) [#127]
Hi there, You seem to have a broken link, I'm afraid I cannot download from the 1st posting

Broken Link: http://www.amt-lab.com/svalka/FastImage_1_4_34.zip


_33(Posted 2007) [#128]
I think MixailV deserted the blitz community.


GrumpyOldMan(Posted 2007) [#129]
Hi

Both the links for FastImage and FastText are broken, are they available anywhere else?

Cheers

GrumpyOldMan


John Blackledge(Posted 2007) [#130]
Both now available here:

http://www.tla.2bhosting.co.uk/download.htm


nrasool(Posted 2007) [#131]
Actually Spoke too Soon, the zip is corrupted for FastImage, I'm afraid


John Blackledge(Posted 2007) [#132]
Err... no it's not.
I just downloaded it and unzipped it.
Try again.


Abrexxes(Posted 2007) [#133]
Links removed..see John Blackledge


nrasool(Posted 2007) [#134]
Thanks Abrexxes, it extracted fine

Hi John, I'm afraid for myself, the zip file was corrupted, I tried in Winzip, Powerarchive and 7zip, all reported the same.


John Blackledge(Posted 2007) [#135]
Nrasool - many thanks.
It turned out that my 'uploading' drive had only 195MB free, so the file got currupted (???).
The link is ok now.

www.tla.2bhosting.co.uk/download.htm


GrumpyOldMan(Posted 2007) [#136]
Hi John Blackledge

Thanks for making the libraries available.

Cheers

GrumpyOldMan


_33(Posted 2007) [#137]
Now that MIxailV is gone (possibly banned) and does not support the Blitz users, what will happen to your project sthat use FastImage (or FastText) ? Will you still be using this great and fast tool, or will (have) you find (found) a substitute?

Is it still worth using this for a commercial project or shareware?


Shifty Geezer(Posted 2007) [#138]
It still works, and very quickly. As long as there's no bugs, and there don't appear to be, it's great. Though it would be nice to have other features like text kerning, I can live without, and I don't know of any viable alternatives that are as fast and yet simple. The only other alternative I think is BlitzMax, which I'll probably switch to one day, but not at the moment.

Incidentally, why do you think MixailV might have be banned?


MeowZ(Posted 2007) [#139]
Anyone know what is exactly return from SystemProperty("Direct3DDevice7")? I'm porting FastImage to use with B3D SDK. need your help.


Shifty Geezer(Posted 2007) [#140]
A handle to DirectX 3D's graphics surface, AFAIK.


_33(Posted 2007) [#141]
Shifty Geezer, what is your latest Docutute? Mine is version 0.2. If you have any updates, I'm highly interested.

Thanks.


EPS(Posted 2007) [#142]
Hi, i tried FastImage for my new Project but found a little bug.

It is a Problem with the Viewport. Viewport works fine with primitives but not with Images. Only the X Direction will be clipped.

Here is a small example:

Include "FastImage.bb"
Graphics3D 640,480,0,2
InitDraw SystemProperty("Direct3DDevice7")

tex = LoadTexture("sample.png", 1+2 )		;--> INSERT A 256x256 Image
img = CreateImageEx( tex, 256, 256, FI_AUTOFLAGS )

ClsColor $80,$80,$80

While Not KeyHit (1)

	rotation = (rotation + 2 ) Mod 360

	Cls
	
	StartDraw
		
		SetViewport 125, 125, 150, 150
		
		SetColor $FF,$FF,$FF
		SetBlend FI_ALPHABLEND
		SetRotation rotation
		
		DrawImageEx img, 200,200 ;--> Image only clipped in X
		
		SetColor $00,$00, $FF
		DrawRect 200, 200, 256, 256, 1		;--> RECT is clipped in X and Y

	EndDraw 
	
	Flip
	
Wend


So, i need a Viewport and FastImage ist the best Lib that i've found. But i think there is no way to get a update...OR?

Any ideas...thanks a lot and sorry for my englisch.


_33(Posted 2007) [#143]
You need to get in contact with MixailV and send him your toughts. Also, we all need support from MixailV. The last net search I did resulted in that he stopped posting anywhere, even the russian forums. But maybe now he's back on the scene.

Yep, he's back:
http://blitz.pp.ru/forum/member.php?s=b2b47c51f01abdb1cd6653e32d8a35d4&action=getinfo&userid=158


EPS(Posted 2007) [#144]
Thanks a lot...

btw

I found out that the problem not exist if you use a ATI Graphics Card. I've tried this on many machines now and this is the result.


Shifty Geezer(Posted 2007) [#145]
_33 : I haven't created any more tutes yet after distractions, but I'm back using Blitz3D again and am going to have to look into FI a bit more, so another tute might be appearing some time in the not too distant future.


_33(Posted 2007) [#146]
http://www.google.com/translate?u=http%3A%2F%2Fblitz.pp.ru%2Fforum%2Findex.php&langpair=ru%7Cen&hl=en&ie=UTF8

Seems FastImage has been updated to 1.6, even 1.61 reading the forums. But we get greeted with a password. Apparently there have been major speed increases in many areas and a host of new functions.

I personally would be interested in this update.


Abrexxes(Posted 2007) [#147]
Yes, the current "main" download" is 1.6 (examples, docs etc), the other download is just a new dll (1.6.1).


Barnabius(Posted 2007) [#148]
Password is Mixail's nick in reverse order. At least, it was when I downloaded the 1.61 version in August. It's written in the FastImage thread anyway.

Barney


_33(Posted 2007) [#149]
This is what's written:
! ! ! Passs to raru me Nikc, current naoparot, register of the letters also note


So I have no clue what this means.

EDIT: Hmmm... After trying this new version, I have to conclude there are absolutely no speed increase from what I noticed between 1.434 and 1.6 or 1.61. And now my underline in my terminal is messed up, not counting that font loading is now half broken. So, I'll asume this has nothing new to bring to the table for now. Also there were various fixes I would of expected to find iun this new version, which has not happened. So, to me it's a little decieving, plus the password protection is really a turn off. What is so important to password protect? From who?

Cheers.


Abrexxes(Posted 2007) [#150]
Fastimage & Fasttext is his own stuff. So he must not have a "reason" to make a passwort on it. But he have started to protect his dlls after the story with mark (sdk).

The new versions are not really faster (never seen a text like this from Mixail) , but add new commands and some bugfixes.

I think that he dont want to see his dlls in this forum since he was banned from here. Thats why i have never posted a link or the password. But now, after the links and the passwort is here....i think the next version will have another one. ;)

But i hope he will not change it befor he has released the new fasttext version. :D


_33(Posted 2007) [#151]
The new versions are not really faster (never seen a text like this from Mixail)

I could have misread, it may be some precise functions that are faster. But here is what I read from the 1.6 update:
DrawText is 6-7 times faster! The procedure for the withdrawal of the text has been completely rewritten, see example FastImage_Example_BlitzText_VS_FastText.bb


Well, if he changes the password, it's still as pointless. And who says he allows us to use FastImage 1.6 in our applications. I remember 1.434 was free to use, but it may have changed. Maybe he wan't us to ask permission.

This is what we had for 1.434 (and below) from this thread, which mentions:
>> it is free??
Absolutely FREE...

When use the library in their own project necessarily a mention of author -> MixailV aka Monster^Sage

p.s. Excuse me for my english

It might not apply for above versions that are not available here, and that are password protected archives.


Abrexxes(Posted 2007) [#152]
and that are password protected archives.


It is more a "can you read russian?" protection. ;)


_33(Posted 2007) [#153]
I think it's a wonderful little lib, for what it's worth. It is really too bad that he can't be seen here as he had a real fanbase for his fast tools, FastText, FastImage, and the little known FastENBM (Environment Bump Mapping). Obviously we're missing out on the new stuff over here from this excellent coder. And I wish I could tell him the few bugs left to fix in FastImage that I have and that really are annoying.

Cheers.


kfprimm(Posted 2007) [#154]
I'm pretty sure this is just a wrapped version of Max2D. He was probably banned for violating BlitzMax's license.


_33(Posted 2007) [#155]
He was probably banned for violating BlitzMax's license.


You should read the thread before starting to accuse him like this. Also, I highly doubt that you can do a 25K DLL with all the 2D functions that's in FastImage using BlitzMax + Max2D. And, it wouldn't be as fast as what this is.

Not only that, BlitzMax is OpenGL, and this is Direct X 7.


Abrexxes(Posted 2007) [#156]
Only to have 2D with 3D Power this is also very nice. And it is pure B3D.

http://blitzbasic.pytalhost.de/viewtopic.php?t=88

:)


chwaga(Posted 2007) [#157]
getting a 404 on the link up top


_33(Posted 2007) [#158]
Thanks Abrexxes for Draw3D! Much appreciated, great little tool you have linked. Actually, this is amazing, because a 41K blitz source module is doing much of the same as FastImage (if not more) in many ways as it seems pretty fast too, considering I can modify the fireworks to have over 10000 particles and it doesn't slow down, only it crashes pas 13K particles on screen. So I'm very interested in using this package instead of FastImage. Also, because I can see the source and possibly modify it if I need to or make a new function around it.

The example with 3D backrgound really shows the capabillity of this as a HUD.
http://translate.google.com/translate?u=http%3A%2F%2Fblitzbasic.pytalhost.de%2Fviewtopic.php%3Ft%3D90&langpair=de%7Cen&hl=fr&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools

Cheers.


Abrexxes(Posted 2007) [#159]
Hi, the 13k crash is a limit of B3D (or Dx7?) ,not shure. Next version will have more stuff like the CLEAR command (speed up nVidia Cards 3-5x times) and Quad3D =).


_33(Posted 2007) [#160]
Yep, I think it's a Blitz3D limit. In FastImage, I could have my terminal up to 4 times 80 by 60 chars + backrgound layers (split screen in 4), so that would make it around 30K or 40K particles, and runs like that in 1280x960 at around 40 - 45 fps at that level of usage. So that is a consideration none the less for my terminal system. I'll make a Draw3D version of my system and see how it works. I can see where this system runs faster than FastImage, and I am really curious as to how it could work there.

Next version will have more stuff like the CLEAR command (speed up nVidia Cards 3-5x times) and Quad3D =).

I've added Clear ON / OFF as specified in a forum and fixed the other Clear function with the patch suggested by the author.

I could use Draw3D :)

I'll see how the internals of Draw3D works and try to find solutions for my page drawing algorythms.



P.S.: If you study the picture you'll see some bugs caused by FastImage's aproximation in polygonizing. Some squares have some sort of shadow in the ANSI art. And, yes, this is a terminal system that goes over the 3D scene or whatever 3D you like. It's totally configurable, clickable fields, sizable characters, alpha, etc etc... Fully programmable using VT commands, half is VT based, the other half is my own creation, because of the needs of the system. I'm not finished with this project yet. :P Help appreciated, if someone has the skills and can program a script language using bytecode. Also note that the fonts are 1024x1024 images 32bit, but the characters here only use 1 bit plus transparent background. The terminal can use fonts like in Draw3D already and have 40x30 character modes for game menus and such, with scroll and effects, programmed in VT style commands. I mostly use a 4 screen split mode like this for debugging, but also use a chat system with 2 separate pages, and other stuff.


cyberyoyo(Posted 2007) [#161]
Hi guys
I got the 1.6 version from the russian website.
Can somebody translate the license terms? An auto translator isn't very helpful for that matter.
Thanks in advance.


Ked(Posted 2007) [#162]
Can someone show me how to do collisions using Ultra FastImage?


_33(Posted 2007) [#163]
You'll need version 1.6 if I'm not mistaken.

I found these instuctions from the DECLS, I don't know if they could help you?
TestRect_% (xPoint%, yPoint%, xRect%, yRect%, WidthRect%, HeightRect%, Local%, Result*, ResultFlag%) : "TestRect_"
TestOval_% (xPoint%, yPoint%, xOval%, yOval%, WidthOval%, HeightOval%, Local%, Result*, ResultFlag%) : "TestOval_"
TestImage_% (xPoint%, yPoint%, xImage%, yImage%, Image%, Local%, Result*, ResultFlag%) : "TestImage_"


You could probably program your own collision system without special instructions, using X and Y box collision or spherical.


Ked(Posted 2007) [#164]
Where can I find version 1.6?


Ked(Posted 2007) [#165]
Is it ok to create programs using this even though the creator got banned?


Ked(Posted 2007) [#166]
I guess no?


John Blackledge(Posted 2007) [#167]
Don't see why not - everyone else is.

http://www.tla.2bhosting.co.uk/download.htm


Pinete(Posted 2007) [#168]
you should update the version of fasttext..
there are another newer..
:)


regards,


Abrexxes(Posted 2007) [#169]
Versions:

FastImage 1.6 (+update dll 1.6.1)
FastText 1.22


John Blackledge(Posted 2007) [#170]
Sorry, I thought those were the latest versions.
I only wanted to host the while Mixail was 'missing'.

Where are you getting the latest versions?


Abrexxes(Posted 2007) [#171]
http://blitz.pp.ru/forum/forumdisplay.php?s=bedefbd26be87c4074b453a687d61e1b&forumid=5

Look into the threads from MixailV (Sticky), use google to translate. The 1.6.1dll is somewhere in the thread.

bye


John Blackledge(Posted 2007) [#172]
Yup, got em both.
Thanks for that.


boomboom(Posted 2007) [#173]
I am trying to rotate an image in memory without drawing it to screen. Can this do this? And if it can how much faster is it than Blitz's rotation command?


ZJP(Posted 2007) [#174]
fastimage_1_6.rar is password protected :-( !!!


Barnabius(Posted 2007) [#175]
Translate Mikhail's first post and you'll get the password. It's his nick written backwards. If you bothered to search this thread you would've found my message about this.

Barney


ZJP(Posted 2007) [#176]
It's ok Now. Thx. ;-)


pc_tek(Posted 2008) [#177]
Hi all...especially Mikhail!!

I can't seem to find a valid link to this library...can anybody help me?


John Blackledge(Posted 2008) [#178]
See the link 6 replies above.


pc_tek(Posted 2008) [#179]
Cheerz!!

Got it


El Gigante de Yeso(Posted 2008) [#180]
Sorry for the bump, but doesn't anyone have the lastest free version? Or is it the 1.4x one?


@rtur(Posted 2008) [#181]
Hi!
MixailV asked me to post news about his libraries.
All his libs available for legaly purchase from his new site: http://www.fastlibs.com/
There are FastText, FastImage and new library- FastExtend(which is realy great IMHO:).

[Edit]
There is also discount coupon for libs: 50blitzersoff


miez(Posted 2008) [#182]
Wow, the FastExtend library is NICE!


Nack(Posted 2008) [#183]
oh this looks amazing!!
I am so getting this lol i wonder if we get free updates if we buy it?? hmm


Abrexxes(Posted 2008) [#184]
@rthur Thanks for this..newsed on the german board. :)


Barnabius(Posted 2008) [#185]
Purchased all libs for $29.95. Downloaded them immediately after purchase and everything is working perfectly. FastExtension lib is amazing!

Barney


Dreamora(Posted 2008) [#186]
purchased as well
definitely worth its money :)


Moraldi(Posted 2008) [#187]
Can someone give us a feedback about the library speed?

Thanks


Barnabius(Posted 2008) [#188]
You can always download the trial version and see for yourself if the speed is O.K. for you or not.

Barney


Moraldi(Posted 2008) [#189]
I did it, but I need a feedback from the rest


Abrexxes(Posted 2008) [#190]
If you compare it with the original (b3d) it is really really really fast as it can use the graficcard to draw. B3D use DirectDraw7 for 2D and that can not be accelerated by a 3D adapter but use the CPU. Blitzmax and every recent engine use 3D (like this libs) to draw 2D objects (with alpha , rotating an so on..)

bye


Moraldi(Posted 2008) [#191]
Thanks Abrexxes, but I think (I am not sure) DX7 for 2D uses the 3D graphics adapter too, when it is possible, automatically because DirectDraw7 is part of DirectX3D.


Abrexxes(Posted 2008) [#192]
In DirectX7 Directdraw was not a part of DirectX3D ;) Since Dx8 it is integrated in Direct3D but the way to draw something in 2D has not changed to be compatible to newer versions. If you use (on DX7,8,9) the DirectDraw port, you use something that is not covered by recent 3D drivers, so most of the work are done by your CPU and not by your gfx card. The gfx card will draw only the result (screen) an can provide buffers..not more. Thats why thinks like "rotation" is to slow in DirectDraw, it is not "rendered" by your gfx but the CPU must calc. this in realtime (each pixel). ;)

bye


Moraldi(Posted 2008) [#193]
Detailed info Abrexxes, thanks!


EPS(Posted 2008) [#194]
Now i also purchased FastImage and i'm a little bit disappointed that the help (and the big part of the license) is still in russian.

I had the hope that in the commercial the help and license text is a little bit more ... international ;-)

(sorry for my english)


Uber Jase(Posted 2008) [#195]
Has it got collision detection built in for scaled/rotated images? Or will I need to do my own using maths?

Thanks


_33(Posted 2008) [#196]
What I find missing in FastImage is all the nice multi-texture blending modes of FastExt, and I don't see how FastExt can help Fast Image here... I think fastImage would need a facelift there, because I am missing those for my system. i think the way FastImage works, it is impossible to have multiple texture in a FastImage 2D object.

For example, I want to do like you see in the FastExt exampe where there is an FX transparency layer, with 2 other textures blending in there. Stuff like that is nessesary for the usage of my fonts where I would have characters that I use as decals and the graphics behind it would appear only with the character, or opposite, or negate, etc...


Uber Jase(Posted 2008) [#197]
If I change the number of smiles from 50 to 5000 in the first example, it slows down to a crawl. I thought Fastimage could handle 1000s of sprites with ease. This is on an 8800.


_33(Posted 2008) [#198]
metal mackey, the problem there is that you get a LOT of sprites and there must be some zorder issues related to Direct X or something like that. I tried what you said without transparency and the performance is the same on my hardware, which is about 8-10 fps with 5000 sprites on the FastImage_Example_All. I use this lib for drawing per character sprites and it is incredibly fast, since I use over 30K sprites, but they do not stack behind each other and have no z fight, there is where the problem is I suppose.


Uber Jase(Posted 2008) [#199]
So it is useless for layers of scrolling then? Like what sprite candy can do.


_33(Posted 2008) [#200]
metal mackey, Don't get me wrong, I have layers of sprites, but not 1000 deep!!! I would be highly surprized anything else in blitz3d can run faster than this lib for 2D sprites. I even do realtime zooming or deforming, and it is as fast as when I do not do effects. The key is proper layer management, not blindly stack to infinity.


Dreamora(Posted 2008) [#201]
the main problem that it slows down is not the amount. But with that many sprites you create a massive overdraw (draw ontop of something already rendered) and as it does not have real depth + alpha, it can not be early dropped by the hardware if something would be behind and the like ... the result is a total flood of the bus and break in.

thats the reason that particle systems with large particles straight in front of the cam for example break in that easily as well.

if you want to test that, just reduce the size of the smileys to 0.5 or 0.25 of their current and the performance should raise considerable


Moraldi(Posted 2008) [#202]
How do you guys create your own image fonts for use with Fast Image?


_33(Posted 2008) [#203]
Could someone help me identify the texture blendmodes and meaning for each value? I searched the web for this but can't seem to find this info.


Panno(Posted 2008) [#204]
removed


_33(Posted 2008) [#205]
Panno, I got a black screen dude, just the music I could identify as AC/DC. I think the video portion + 3D is always a problem. I think video + 3D graphics is a hopeless case.


Panno(Posted 2008) [#206]
my fault .

i streamed the movie to a texturebuffer ,this will not work on all drivers


Panno(Posted 2008) [#207]
removed


Panno(Posted 2008) [#208]
removed


_33(Posted 2008) [#209]
for some reason your demo never worked for me.


Panno(Posted 2008) [#210]
its a video


_33(Posted 2008) [#211]
I tought I was clear, you 2 attempts as sharing an EXE that plays an AVI never worked on my system. I had to CTRL-ALT-DEL, and end the task. The screen was blank and the music was playing. Of course, that last 30 second video played fine by itself.


Panno(Posted 2008) [#212]
i use copyrect now to use a other buffer as the backbuffer().
i hope it helps,but cant say it will work on all computer.

anyway, fastimage is really fast


Panno(Posted 2008) [#213]
.


_33(Posted 2008) [#214]
Panno, this one works, nice! So you are using the native Blitz3D movie commands?


Panno(Posted 2008) [#215]
no sorry . i convert the file , load it to a blitzbank




big cinema ->

http://www.blitzforum.de/upload/file.php?id=2799


_33(Posted 2008) [#216]
MikhailV, is it possible to add all the same flexibilities of DrawRect into DrawImage?


MikhailV(Posted 2008) [#217]
@_33: Has not understood a question, tell in more detail that it is necessary to add


_33(Posted 2008) [#218]
Forget it, I just noticed: DrawImageRectEx_%


MikhailV(Posted 2008) [#219]
@_33: DrawImageRectEx has only two additional parameters - width & height (in comparison with DrawImageEx). From help file:
DrawImageEx% (image%, x%, y% [, frame% = 0] )
DrawImageRectEx% (image%, x%, y%, width%, height% [, frame% = 0] )

If I shall add these parameters in DrawImageEx these functions will be identical !
What for it to do? I probably do not understand that is required to you :)


_33(Posted 2008) [#220]
Is width & height based on the principles of the UV scaling?


MikhailV(Posted 2008) [#221]
@_33: See your email...


_33(Posted 2008) [#222]
Thanks MikhailV :)


MikhailV(Posted 2008) [#223]
Good news, FastImage library updated!

Cut from history:
; v1.72 (for Blitz3D only)
; - The algorithm for viewport has been completely rewritten.
; Now it handles clipping of invisible parts properly on ANY graphics card and it no longer uses clip-planes.
; Warning! The 2D projection transformation doesn't affect the viewport anymore.


Filax(Posted 2008) [#224]
Nice ;)


_33(Posted 2008) [#225]
Question: Is there a way to display pixel fonts so they don't come in blurry? For example, if I have pixel fonts 8x8, what I do is I enlarge them to 64x64 so the pixels come in sharp. I want to avoid this because it takes up too much video memory. Unless you show me how to use DDS fonts :P


MikhailV(Posted 2008) [#226]
@_33: It's simple - set flag=0 (without smooting) in function LoadImageFont, see exmaple:

Include "include\FastImage.bb"
Graphics3D 800,600,0,2
InitDraw

CreateLight() : cam=CreateCamera() : CameraClsColor cam,40,40,40

fontFast=LoadImageFont("..\media\Tahoma.txt",0)

While Not KeyHit (1)
	RenderWorld


	StartDraw
		SetImageFont fontFast
		SetScale 4,4
		DrawText "FastImage fonts is fast fonts in the world :)",MouseX(),MouseY(),1,1
	EndDraw 

	Flip
Wend


Place this example to folder "for_Blitz3D" in FastImage distributive and run source...


Uber Jase(Posted 2008) [#227]
Any chance of collision shapes being added? (like in sprite candy). So we can have colision between scaled or rotated objects.

Thanks


SabataRH(Posted 2008) [#228]
Was trying to do some simple grid graphics using fastimage.
My question here why are my images distorted in some way?, and why does Fastimage always seem to have a shadowing like effect underneath the bottom roll of pixels.

my simple test code -
Include "fastimage.bb"

Graphics3D 800,600,32,2
InitDraw
img=LoadImageEx% ("bot.bmp")
ClsColor 100,100,100

While Not KeyHit (1)
Cls
	RenderWorld

	StartDraw	
		DrawImageEx img, MouseX(), MouseY()
	EndDraw 
Flip
Wend


my results -


Any help on this please? have tried all the settings and even some ( that weren't documented ) but nothing works, my images always render in fastimage messed up in some little way.

The images are divisible by 2, no scaling, no rotations etc..

Thanks.


El Gigante de Yeso(Posted 2008) [#229]
Divisible by two OR power of two? Seems like the Fast Image version got downsampled.


MikhailV(Posted 2008) [#230]
@Swampdonkey:
If the size of your image not power of two, Blitz3D himself will lead the size of a image of a power of two (as all images are based on DirectX textures). The library here is not guilty, it Blitz3D changes the sizes with linear interpolation for all textures. Distortions it is strongly appreciable on small images, as at your screenshot. Use the next sizes: 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024 and etc. Free space of image do completely transparent!


MikhailV(Posted 2008) [#231]
@metal mackey:
Any chance of collision shapes being added? (like in sprite candy). So we can have colision between scaled or rotated objects.

The fastest way and the most correct — to use 2D physical engine and its collisions, for example Box2D wrapper or other. There is no sense to do collisions in library, it is intended for drawing!


SabataRH(Posted 2008) [#232]
Thanks for the reply MikhailV, it must of been my small image causing it, i bumped it up to the next power and transparent the surrounding pixels, worked fine.

Thanks.


Naughty Alien(Posted 2008) [#233]
..i would like to build menu system based on this lib, however, trough samples I cant see how to detect that mouse is over images(buttons) loaded in order to activate, whatever i want, related to specific button??


MikhailV(Posted 2008) [#234]
@Naughty Alien:
See example FastImage_Example_TestObjects.bb and see help-file — functions:

TestRendered% (xPoint%, yPoint%, alphaLevel%, Local%)

... and

TestImage% (xPoint%, yPoint%, xImage%, yImage%, Image%, alphaLevel%, Frame%, Local%)

TestRect% (xPoint%, yPoint%, xRect%, yRect%, WidthRect%, HeightRect%, Local%)


Naughty Alien(Posted 2008) [#235]
..weird...I dont have that example at all..uhh


Naughty Alien(Posted 2008) [#236]
..ahh..I had old version..no wonder...thanks man...this is great ;)


MikhailV(Posted 2008) [#237]
My small and simple program for creation of bitmap fonts provided with FastImage... Special for Naughty Alien :)



Run in Debug mode, FastText library necessary (trial or retail version)...
After making the font go to in Photoshop and make alpha-channel from bmp-file.


Naughty Alien(Posted 2008) [#238]
aha..nice lil proggy..hehe..so with FastText + FastImage, I will be able to create unicode BitMap fonts? Im asking because i dont have FastText so i dont know..but I will need localization and therefore, im willing to buy FastText since all other libs I have..


gameproducer(Posted 2008) [#239]
Hmm, fast image twice as SLOW for me?

I'm getting 130 FPS when using the default blitz command.

After I do this:
Include "3RD.FastText_Ascii.bb"


Then my FPS halves to about 70ish FPS? I tried running full screen and windowed mode: same thing.

Nothing else changes but the fact that I either include the lib or not.

(font loading happens with this every time:)
UnicodeFont1=LoadFont("Arial",12)
SetFont UnicodeFont1

I bought the libs... but it certainly isn't 50 times faster for me at least :)

Same goes for example demo: they were running slower when fasttext was enabled. Fasttext gets about 45 msek, while blitz3d mode gets around 31 msec.

Maybe it's my computer, video card or something?

--- running on:
Windows Vista (business edition, 32 bit)
Intel core duo 3 GHZ
4 gig mem
GeForce 9800 GT, 512 meg


SabataRH(Posted 2008) [#240]
--- running on:
Windows Vista (business edition, 32 bit)


Vista dosen't seem to take to fasttext.


Nate the Great(Posted 2008) [#241]
It works for me on vista

I don't see what the difference is between the demo and the full version


MikhailV(Posted 2008) [#242]
@ Game Producer & Nate the Great

This problem was already discussed (in FastText topic), and FastText
slower on Vista because there other algorithm (modified GDI) of display of
the text... It is not terrible, even the minimal loss in speed is
overlapped by advantages (antialising, Unicode support, rotation and
etc.). On XP results: 2-3 msek! If you are not required Unicode - you can
use to DrawText function from FastImage library to receive high speed not
dependent on the size of a font and OS.

p.s. DirectX7 on OS Vista is completely emulated through DirectX9! The
emulator cannot be ideal and reproduce all precisely :) It is not
surprising, that the emulator works more slowly. I do not use OS Vista and
I can not guarantee high speed on this system, sorry...



And write your questions about FastText in topic for FastText library - http://blitzbasic.com/Community/posts.php?topic=68216, please :)


Naughty Alien(Posted 2008) [#243]
hey Mikhail...with use of Fasttext I will be able to get Unicode Bitmap Fonts?? if so, im going to buy it..please give me tips how to achieve that..


MikhailV(Posted 2008) [#244]
Naughty Alien, how I this do? Native unicode fonts contain more 60000 chars! As create such bitmap?


Naughty Alien(Posted 2008) [#245]
..no no..what I ment is for specific languages, not whole package of course :)


MikhailV(Posted 2008) [#246]
@Naughty Alien:

I have written small program for testing the subject of support Unicode (limited charset). By means of it possible to try to get tables of the char-codes (UTF8 codes) for several languages. I hope that will possible organize support of the following languages: french, italian, spanish, german, russian (and like, which contains not much unique chars). Certainly support chinese, japanese and like to realize it is impossible, there plenty of unique chars.

Algorithm of the program such:

1. For base characters (with ASCII codes from 32 before 255) is found UTF8 analogue char (and UTF8-code). Program (utf8test.exe) use current code-table in OS (for instance beside me russian version of the Windows XP, and code-table "windows-1251").

2. Table is written in file, in which is seen codes and chars themselves (UTF-8). File — codes.txt — you can look it (correct) in notepad. This is an most important table, she will is used in FastImage library (Unicode version) in the future.

3. Second program generates bitmap font from table-file. It is important to look — all symbols of your language are drawn on bitmap? If all necessary symbols of your (and other) language be present at picture - that all well! And I am continue work and shall be able to create support unicode in library! Unless all symbols are present, that I shall not be able to create unicode in lib :(

Your task - create table under your language and under other languages, necessary you (with program utf8test.exe). After start the program and making the file - codes.txt - you can rename it (as example - russian.txt). Afterwards send all tables to my email.

I itself can not create tables, since beside me russian version of the Windows (short, does not contain other languages). And without fall check finding all chars for languages on bitmap.

By means of second program - font_gen2.exe - you can once again to check table a symbol (insert table-file in command line. Example: "font_gen2.exe russian.txt")

Download from http://www.fastlibs.com/temp/utf8test.zip


Nate the Great(Posted 2008) [#247]
ok...

I still don't see the answer to my question about what the difference is between the demo and the full version. sorry if I just missed it.


MikhailV(Posted 2008) [#248]
@Nate the Great: One difference - if you use trial version of the library, that each ~2 minutes you will see popup message, containing text "Trial version"


Nate the Great(Posted 2008) [#249]
oh ok... I never ran the trial that log but it is fun to play with anyway...

I noticed at the beginning of this post someone mentioned it was free??? is there still a watered down free version with some basic effects


MikhailV(Posted 2009) [#250]
Yoo hoo! Great news :)

New russian art-chaos hidden object game, powered by FastImage & Blitz3D, released. Short story: "After the first date with a charming girl named April, our hero wakes up alone in an unknown abandoned city after being drugged. He is trapped and believes this somehow involves April. Explore the city while trying to investigate how April is involved. Help the hero survive in an atmosphere of drama and suspense. Are you Lost in the City?"

See the game HERE and screenshots:




SabataRH(Posted 2009) [#251]
Nice, i love the art work behind this game..


Santiworld(Posted 2009) [#252]
hi, Ultra FastImage for Blitz3D is a free library?

ultra fast image is the same than fast image library?

i try to download, but i can't


MikhailV(Posted 2009) [#253]
Not free, try this - http://fastlibs.com/libraries.php#fastimage


RifRaf(Posted 2009) [#254]
[EDIT]
Wrong topic.. sorry.


Mike0101(Posted 2009) [#255]
How can I rotate an image on the images's center point? I seem the setrotation command turns on the left-top corner.


MikhailV(Posted 2009) [#256]
@Mike0101: Use SetHandle (x,y) function and read help-file :)


GaryV(Posted 2009) [#257]
i try to download, but i can't
This site (amt-lab) was a Russian site which produced mmEngine3D which BRL took issue with and had shut down. When mmEngine3D went under, so did their other libs, some of which were quite nice. I believe (could be wrong) some of the libs were moved to:

http://fastlibs.com


MikhailV(Posted 2009) [#258]
@GaryV: You are mistaken. The mmEngine3D did not contain those possibilities which are presented in my libraries. And my site is not connected in any way with amt-lab. FastLibs.com - it is my personal project.


Mike0101(Posted 2009) [#259]
Thanks Mikhail:)


FlagDKT(Posted 2009) [#260]
How to obtain a pixelPerfect sprite with a 400x400 img?


MikhailV(Posted 2009) [#261]
@FlagDKT: from help-file - to achieve high qualitydrawing (pixel-perfect), follows to use square images (textures) with the sizes, multiple degrees of the two, such as 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024, 2048x2048.
For 400x400 - clear outside pixels (full transparency).


Black3D(Posted 2009) [#262]
Just bought the 3-library pack. Thanks for all the effort that has gone into this. :)


_Skully(Posted 2009) [#263]
MikhailV,

Thats strange.. shouldn't you be able to use any degree of two on the horizontal and the vertical? for example.. 32x128?


_Skully(Posted 2009) [#264]
Are their Vista problems with the lib demo? I just get the error StartDraw not found.


_33(Posted 2009) [#265]
Did you install the DECLS and DLL file in the userlib directory of Blitz3D ?


_Skully(Posted 2009) [#266]
of course I didn't.. what do you think I'm a fool... hahahaha

Thanks for that ;)


MikhailV(Posted 2009) [#267]
Good news!
FastImage library 1.73 was is completely checked and tested in new version of the Blitz3D 1.103 (in Windows XP, Windows Vista and Windows 7).
Library does not require update, now you can its use without risk and with full confidence in excellent result.


Pinete(Posted 2009) [#268]
thanks so much!


Aussie(Posted 2009) [#269]
Gday all.

I have been having a go a creating a round raydar with Fastimage over the last couple of days & haven't been having much luck. The idea i have is to create a texture, render cameraprojected images to it for blips & then draw a square image with a hole in the middle of it over the top of the projected images for the round raydar & then use this as a masked image to get the round raydar effect.

Here is what i have as code


I have been able to create an image but i get all weird results.

If some one could take a look at this & see if i am setting it up wrong or show an example of how to do it, that would be much apreciated.

Cheers :)


MikhailV(Posted 2009) [#270]
First - don't use SetBuffer and CopyRect functions between StartDraw ... EndDraw functions, it cannot be done.

Second - Use DrawPoly function for masking (you need to make the shape using a set of triangles which is necessary).


Beaker(Posted 2009) [#271]
Next thread here.