New Blitz3D Update Available!
Blitz3D Forums/Blitz3D Programming/New Blitz3D Update Available!
| ||
Hi, Blitz3DUpdate197.exe is now available from the 'product updates' section of the 'Account' page. Here are the additions to versions.txt Fixed PlayMusic case sensitive file extension issue. LoadTexture now loads compressed '.dds' files. TextureBuffer() returns 0 for compressed textures. Compressed anim and cube textures not yet supported. Only DXTC modes 1, 3 & 5 are currently supported. Modes 2 & 4 are pretty much never used in the industry, even NVidias own DDS exporter for Photoshop now only supports modes 1, 3 & 5. The loader code stricly adheres to the DDS format, files saved from Photoshop using NVidias DDS exporter will work fine. If you're getting errors, it could be that your DDS file is non-standard. The mipmap flag is ignored when loading DDS textures. Instead, if the DDS file contains mipmaps, then they are loaded & used. DDS textures will load when used by meshes that are loaded using Blitz3D's various load mesh commands. Usage tips: If your texture does not have an alpha use mode DXT1 If your texture has a 1 bit mask, use mode DXT1a If your texture has a smooth gradient alpha, use mode DXT5 Added MeshCullBox for manual mesh culling. This allows you to correct some situations where an animated mesh extends beyond the guesstimated bounding box. Enjoy! |
| ||
All I can think to say is: w00t! |
| ||
LoadTexture now loads compressed '.dds' files Isn't that what that "Tom" boy was working on? He might cry. Still, at least we got it prior to "Beaker" dying of old age. |
| ||
Puki, you can thank Tom and Mark for this landmark release. |
| ||
I'll extend my thanks to Tom and Mark aswell.. Thanks guys! Made my day! |
| ||
Ah, okay - I though "Sibly" stole it from "Tom". |
| ||
Yep, I stole it from Tom! Actually, the code is 99% Tom's - I just added some sanity checking etc. |
| ||
omg, this is so nice! |
| ||
Great update! I have to say, though, I miss not having the product updates list. What if I was gone for 2 weeks? How would I have found this? I would need to have thought about checking Product Updates under my account, and I would have to remember which version of B3d I had. Anyway, don't want to turn this into a discussion about forums, so I'd best conceal that suggestion. Yay, DXTC!! :) |
| ||
Great addition, that of .DDS D3DXTextureFormat support! :D |
| ||
'im mostly happy to be able to load in custom mip maps (can do some weird FX with it...) |
| ||
Where's Mustang? He's going to wee his knickers! |
| ||
Ok, next stop: stencil shadows :-P Nice additions indeed! |
| ||
Very nice Mr. Sibly |
| ||
..its working fine..try it already..stencil shadows next, pleaseeeee.. :)) |
| ||
Where's Mustang? He's going to wee his knickers! :) Never thought I'd see this day - now Tom needs to code tangent space normal map support and render to textures and I would be 100% happy... BIG thanks to Tom and Mark for this update! Shows people who thought Blitz3D is dead that it isn't so. |
| ||
Thanks, Mark. Good to see that you're still involved with everybody's favourite language. |
| ||
Thank you Mark for keeping Blitz3D alive ! Sergio. |
| ||
Fantastic! Thanks guys :) Jason. |
| ||
Awesome! This should keep things going for a few more years! :D |
| ||
Did I just hear several jaws hit the ground? ;) |
| ||
Thats great news :-) Small question: *ready to hide behind a stone* Did the ConvertToDXTC command of Toms DLL make it way over to B3D 1.97 as well to compress uncompressed textures? |
| ||
What's a DDS texture, then? And what's DXTC? Great update I'm sure but the new stuff doesn't look to have been explained too well.... |
| ||
DDS and DXT feature is great !! I have now after DDS update of my Game 60 MB More Graphics Memory !!! |
| ||
Gfk: DDS = Direct Draw Surface, it's also the term used, and file extention used, for storing compressed textures on HD. DXTC = Direct X Texture Compression, just another term for it. A DDS texture, is a texture that uses one of 5 DXTC modes to compress the texture data. All DX7 compatible GFX cards should support it (if they don't... well, they're not DX7 compatible cards then). The GPU on your GFX card decompresses the texture data using hardware each time it's used, and it's all done lighting quick, so there's no delay at all. The result is that DDS textures take less room in video memory, and because the compression is hard coded, the saving will always be the same. There are 5 compression modes, but only 3 are supported in this update, and in fact, you'll probably only ever need to use 2 of them, DXT1 and DXT5 DXT1 is best used when your texture has no alpha information in it, or, if your texture will be masked. DXT1 can also store a 1bit alpha channel (all that's needed for masked textures). The space saving is 8:1 i.e, a DXT1 or DXT1a texture will only use 12.5% of the video memory a RAW/PNG/BMP texture would use! And of course, you get the same space saving on HD :) DXT3 and DXT5 are both used when your texture has an alpha gradient (i.e greater than 1bit), both use 4bits of information for the alpha channel. But where DXT3 uses an explicit alpha, DXT5 automatically interpolates the alpha channel so as to smooth out its appearance. If you saw my DDS demos you may have noticed how a smooth alpha gradient appeared 'stepped' when using mode DXT3, but looked much smoother using DXT5. Dreamora: If I can get that function to be less hacky, I'll ask Mark about it. I want to get this stuff working with cubemaps, that'd save a ton of vid mem, and also safe blitting (copyrect), so we'll see how it goes. |
| ||
@GfK: DDS is a DirectX texture format (like .X is the DirectX 3D mesh format). The special about it is that it can be compressed without loss (I believe). There is tool in the DirectX 9 SDK named "DirectX Texture Tool". With it you can convert textures to the DDS format. Uncompressed 1024x1024 texture: 3 MB The same texture with DXT1 compressed: 513 KB |
| ||
Great additions, thanks! |
| ||
I have now a Bug with DDS Textures. After pressing the ALT+Windows Keys (Back to Windows) and reopen the Game-Window, the Textures are damaged. here a Screenshot after minimization and maximization the Game-Window. Please copy the link [URL]http://img301.imageshack.us/my.php?image=bugmc4.jpg [/URL] |
| ||
Gfk: download nVidia's free photoshop plugin if you've got photoshop! http://developer.nvidia.com/object/nv_texture_tools.html |
| ||
@Barton: O.o OMG this looks really weird. Can anyone confirm the "ALT+Windows bug"? |
| ||
And if you don't have Photoshop, download DirectX SDK, it has a free standalone something to DDS converter |
| ||
My most sincere thanks to Tom and Mark for getting this into an official Blitz update. Nothing beats full integration! |
| ||
http://en.wikipedia.org/wiki/DirectDraw_Surface http://en.wikipedia.org/wiki/DXTC FOURCC Description Alpha premultiplied? Compression ratio Texture Type DXT1 Opaque / 1-bit Alpha N/A 8:1 / 6:1 Simple non-alpha DXT2 Explicit alpha Yes 4:1 Sharp alpha DXT3 Explicit alpha No 4:1 Sharp alpha DXT4 Interpolated alpha Yes 4:1 Gradient alpha DXT5 Interpolated alpha No 4:1 Gradient alpha ...If someone still needs more info, but Tom basically said it all already. Tom, do you have any clue how to do "render to texture" with Blitz3D? |
| ||
Great news, thanks a lot! It seems blitz3D is far from a "closed case". Tho - Barton just opened a new Pandora box... But anyway, why the heck has anybody got to press Alt-Win during the game ?!? ;) Well, in my engine an average level just hit the 128 Megs borderline, so this comes in very handy, making my games playable on "small" cards again. |
| ||
A good and free programm to create DDS textures with MIP maps and DXTC: http://www.ati.com/developer/compressonator.html |
| ||
wow Thanks for the Update Mr.Sibly. Thanks for the Code Tom. glad too see this |
| ||
Is anyone pushing Blitz3D hard enough that they're running out of video memory? |
| ||
LONG LIFE TO GODS MR. SIBLY MR. TOM MR. BLITZ3D :) Great work, thanks a lot ... ...ok people, what do you say? as Cygnus said above, this is really bringing a lot of more life to this great language ... Paolo. |
| ||
WarrenM: Sadly yes, with T.ED or RealmCrafter MegaTerrain you are able to ... 64x 512x512 + Mipmaps already ranges in the 80mb range where it isn't much work to get to 128mb after all. But sadly those apps only accept image formats and not DDS, so a convertToDXTC would come very handy. |
| ||
Dreamora: Those apps only need a quick recompile in 1.97 for them to be compatible. I take it they're current apps that are still being updated? Hound the authors! :) Barton: Well spotted (the bug). According to the DX7 help file it's a known issue, surface memory can be freed when the application loses focus, or the gfx card is given exclusive access by other programs. There are native DX functions to restore the surfaces when this happens, I've passed the info along to Mark. |
| ||
I should take some of the credit for squeaking on about this. Let's face it, the only person who has a use for the DDS feature is me. Right, thanks accepted - you can all carry on as you were. |
| ||
@puki: megalomania? |
| ||
very nice mark & tom!!! this is really great! keep up the good work! |
| ||
Excellent stuff. Keep up the good work guys. |
| ||
@warrenm: the (unfinished) 1st level of my upcoming shooter uses already 112 MB of texture ram... and there is a lot to be done. with dxtc i can cut this down to approx. 14 mb. so you are able to play even with 64 mb on your graphicsboard. i love this feature ;) |
| ||
many thanks for this great update to blitz3d! |
| ||
how can you tell if a texture has alpha? if you load it with the alpha flag in blitz? |
| ||
Great update! Thanks mark and tom! |
| ||
MeshCullBox Hurrah! |
| ||
Thanks Mark and Tom, great stuff! :-) |
| ||
Slunkar: The mask & alpha flags still work as normal. |
| ||
Mark (and Tom) thanks for this update! Much appreciated. IPete2. |
| ||
Nice job BR |
| ||
Very nice addition. Although I know that they tend to be ignored, might we request: Compress(texture_handle,dxt_mode) Uncompress(texture_handle) (both either returning the handle of the compressed/uncompressed image or doing it on the given texture) commands so we can "modify" compressed textures or compress textures we generate on the dynamically? |
| ||
Great work Tom and Mark. Does anyone know what b3d related tools support DDS already (and export them correctly to b3d file)? Fragmotion? (I know this supports DDS internally) b3d pipeline? Unwrap3D? (I know this supports DDS internally) |
| ||
Nope, but this is probably easier than finding out: http://www.blitzbasic.com/Community/posts.php?topic=61874#691437 |
| ||
Very handy fred. |
| ||
Wonderful - many thanks Tom & Mark - and thanks fredborg for that very useful little function ! There's life in the old dog yet ! ( I mean Blitz3d not Mark ;) I will be adding DDS support ( recompiling !) to PaceMaker at once. |
| ||
WHOA! Hehehehehehe, i've been gone for a week and look what happens! Nice one guys. Thanks for this! For me, Blitz3d is complete :D |
| ||
Wicked! Well done Mark and Tom. |
| ||
Simply great, thank you ! |
| ||
cool |
| ||
Does DXTC require hardware support? In other words will it still work on older cards? |
| ||
define "older cards"... |
| ||
Riva TNT and ATI Rage cards and older do not support DXTC. But these are both from around 1998, so there probably aren't many around that are still working :) |
| ||
Would those cards otherwise run Blitz3D stuff? As I'm sure you're aware, there's a difference between a card having DX7 (or 8 or 9 or whatever) level hardware and being DX7 compatible (with the right drivers), and I was wondering which Tom meant by "All DX7 compatible GFX cards should support it (if they don't... well, they're not DX7 compatible cards then)". Would be a shame if using DXTC meant that I'd be shutting out cards that would otherwise be able to run my game. |
| ||
I have a TNT2. *pokes it*. I don't think it likes new systems, but it runs in the old ones fine, and it's fine for blitz. HappyCat: In that case you must make a choice- Keep the texture sizes down or have good visuals and kick out ancient hardware, or just code a "Low quality" mode- which prob isn't worth it these days... |
| ||
Yep - I was asking so that I could try to make that decision :-) Thanks for the info. |
| ||
pah, tnt2 is waaaaay old ;) i don't care about those old cards... if my game runs fine on radeon 9700 or higher, everything will be fine. |
| ||
As long as your card is DirectX 7 capable everything should be fine. |
| ||
Riva TNT and ATI Rage cards and older do not support DXTC. Add to that list Matrox Millennium G550 and Matrox Millennium G450, the problem with these cards is from my experience they never die... If you do want to target ancient computers then I personally would be looking at targetting a 400mHz Pentium2 with a 16MB 3D card without DXTC. I've tested games like Platypus and early versions of Cletus and both worked fine on this configuration. It is a minimal market that only a minimal number of Blitz3D programmers will be interested in but I don't think that makes it any less legitimate. |
| ||
Wow great news, I can't believe I missed it! :) |
| ||
Yeh, now go back to your mission with "George Bray". |
| ||
Add to that list Matrox Millennium G550 and Matrox Millennium G450, the problem with these cards is from my experience they never die... would anyone happen to know what the GeForce minimum is? I couldn't quite find the information but i gathered it was a GeForce 2, ie. that GeForce 256 doesn't support compressed textures. |
| ||
>would anyone happen to know what the GeForce minimum is? I >couldn't quite find the information but i gathered it was >a GeForce 2, ie. that GeForce 256 doesn't support >compressed textures. DXTC is a DirectX6 feature, and Geforce 256 was a DX6 card, so it does DXTC. On the other hand, there some problems with the Geforce 256's handling of DXTC in 32bit mode, but I am not sure if it was software or hardware related and/or ever fixed. TNT2 does not have DXTC. Andy |
| ||
absolutely fantastic!! Really it's a great update! the next step could be stencil shadows in order to continue the updating of Blitz!! To have DDS and Stencil shadows could be a dream!! Thanks for your work mark and Tom!!!, thanks!! |
| ||
This should be great! |
| ||
For the less knowledgeable of us (meaning me), how does MeshCullBox work? What are its parameters? |
| ||
MeshCullBox x#,y#,z#,width#,height#,depth# x,y,z is where you want the center of your cull bounding box to be, width,height,depth are the extremes of the bounding box. I think when an animated mesh is loaded the bounding box is set from frame 0. But the animation in some meshes causes vertices to go beyond the default bounding box, hence the new option to make the cull bounding box bigger so you can cover those extremes. |
| ||
@Boiled Sweets: Hi pal, as i opened this topic, mozilla requested me to give logindata to your website x-times. That's real annoying. Pls change your sig or repair your homepage. Best regards |
| ||
Yeah, me too - using IE. WTF? :/ |
| ||
Same using Opera |
| ||
It also stopped me from saving a page he had posted to. The save proceeds for a while and then just stalls. You can work around this by selecting Hide Signatures in your profile. |
| ||
'MeshCullBox x#,y#,z#,width#,height#,depth#' Thanks Tom. |
| ||
DoggoneIT!!! DoggoneIT!!! why didn't someobody tell me about this!!!!! you'all know old people can't see worth a damn... i didn't see this yesterday, and i DID look... GREAT STUFF Mark... BIG THX Tom... what's next... dx9 and shaders??!! :O) --Mike |
| ||
Very nice update, Thanks!! |
| ||
=> 3 Mo on video Ram with 1024*1024 dds => 16 Mo with the same in JPg . Really a good update ! Now, i'd like to know one thing => We should save texturebuffer in dds ? Or we nned to code the export part ? And final question : is that if we create a texture, and apply effects on it, it can get the optimisation of dds format ? Like glowing screen on a copyrect ? I'm sure my question is absolutely stupid, but, in any way it can, i'd be surprising glad :) |
| ||
WarrenM: Sadly yes, with T.ED or RealmCrafter MegaTerrain you are able to ... 64x 512x512 + Mipmaps already ranges in the 80mb range where it isn't much work to get to 128mb after all. But sadly those apps only accept image formats and not DDS, so a convertToDXTC would come very handy. LOL it will now! Good job team blitz ! After ive done a bit o readin ocourse :) Can i just ask though, do loaded models autoload DDSs too without retextureing them? |
| ||
Can i just ask though, do loaded models autoload DDSs too without retextureing them? Works with all but LoadBSP() I think. |
| ||
And if it doesn't, you can always use this: "Function to load DDS in "already made" models" http://www.blitzbasic.com/Community/posts.php?topic=61874 |
| ||
Problem there is, BSPs don't save the file extentions. Or at least, that's the case with some Phalastos sent me. As I see it, the LoadBSP routine only needs to be ammended to look for the .dds extention. I'm making some new CopyRect commands to work with the DDS textures. Blitting from DXTC to RGB is quick, but from anything to DXTC is bit slower, but it works at least. And some SupportsDXT1() functions. And I've got render to texture working much better now, will post a DLL later. Tom |
| ||
And I've got render to texture working much better now, will post a DLL later. YES! OMG! This just gets better and better... (My) Blitz3D development just got "extended play"! :) Oh, and copyrect stuff is cool too, makes the DXTC functionality complete. What are those support functions? Can we have ability to pack "self/code made" textures? |
| ||
Whats so cool about the render to texture then? |
| ||
Mustang. Wee. Knickers. 'Nuff said. :o) |
| ||
RenderToTexture is much faster than rendering to backbuffer and copyrecting to the texturebuffer. |
| ||
Whats so cool about the render to texture then? Think about in game mirrors (wall, car), cameras (video, security, hud)... basically anything you can do by rendering the camera view to a texture instead of "big screen" (backbuffer). Not to mention 2D/3D post-effects like bloom and motion blur etc... "Uses of Rendering to Texture Surfaces": http://www.gamasutra.com/features/19991112/pallister_03.htm [not sure if above link requires registering - which is free anyway] Mustang. Wee. Knickers. 'Nuff said. :o) Yup, this is getting embarrassing... ;P |
| ||
RenderToTexture is much faster than rendering to backbuffer and copyrecting to the texturebuffer. Woah! I do this very thing once a second in Vorboils. It runs at 60 FPS on my low spec machine so maybe doing this type of call relatively infrequently is not a problem. Is the RenderToTexture likely to become a new function? |
| ||
@tom: what about a new command: blur_texture(texture,mode,intensity) this would be really great. if you can let blitz render to a texture i think your dll has faster access to it than blitz with readpixel/writepixel/ and all the stuff. |
| ||
Problem with Render targets: erm yeah, the systems that have the large problems with it now will still have it as low spec cards (ATI IGP, older Intel onboard, S3, SiS) can't do it either. |
| ||
RenderToTexture is much faster than rendering to backbuffer and copyrecting to the texturebuffer. It's faster, but not *that* much faster. Our Fun Racer demo did this every two frames and it was smooth and had almost no performance hit- it took 0fps off of my FPS total :) (That just means the limit was in the logic not the rendering ;) ) |
| ||
ok not THAT fast but faster ;) and less overhead. |