Authenticity Posted October 9, 2010 Share Posted October 9, 2010 (edited) I'd like to list the following sources which I find to be very helpful:MSDN - Direct3D 9 Graphics (Windows)XNAIntroduction to 3D Game Programming With DirectX 9 by Frank D. Luna. The examples are based on his source code.Introduction to 3D Game Programming with DirectX 9.0c—A Shader Approach by Frank D. Luna. The examples are based on his source code.The Cg Tutorial: The Definitive Guide to Programmable Real-Time Graphics by Randima Fernando and Mark J. KilgardThis library provides a basic interface for programming Direct3D applications, whether they're on your GUI on not.The examples show (and hopefully teach) how to use DirectX to implement: terrain, camera, particle systems, meshes, meshes geometries, and more.Because your application is one step (or 2) from device communication (Graphics card), your application can preform drawing much more fasterthan GDI or GDI+. What more is that Direct3D offers ways to compile what is called shader/effect files that can be evaluated and executedon the GPU. If you learn how to write code that put the GPU and CPU in work and harmony together, you'll get the most of Direct3D.The library is heavily based on AutoItObj UDF, so you will need to download the UDF to use this library.Thanks to the developers <3D3D9.7zD3D9_Shader.7zHistory:Update 11.12.2010: - Added new implementation of D3D samples based on the aforementioned book's source code. The new implementation uses the current version of AutoItObject-v1.2.2.0 and utilizes some sort of OO principles. The major reason to follow the shader approach is because DirectX 10 and later versions have abandoned the fixed-function-pipeline in favor of the new programmable-pipeline. Update 30.10.2010: - Added effects examples - Modified library and examples to reflect library changes. All functions that create intrinsic objects such as a matrix or a vector require a reference to a variable and return the new object's pointer. - Modified library and examples to be compatible with the new AutoItObject version 1.2.0.0. The new AutoItObject version is required to be able to use this library and to run examples. - Fixed Terrain.au3 to use $D3DFMT_INDEX32 when necessary and not always. Update 09.11.2010: - Fixed leaking examples.Future Revisions:Implement real animations like: Skinned Meshes, Keyframes-based animations, etc. Edited December 10, 2010 by Authenticity algiuxas 1 Link to comment Share on other sites More sharing options...
FireFox Posted October 9, 2010 Share Posted October 9, 2010 (edited) Thanks to the dev's (particulary to you), I was waiting for it since a long time !! I will for sure start a project on it.5 stars from me FireFox. Edited October 11, 2010 by FireFox Link to comment Share on other sites More sharing options...
monoceres Posted October 9, 2010 Share Posted October 9, 2010 Wow. Just wow. The code, the package, the example, it's all extremely well done. Some of the examples blew my mind, I never thought anyone would ever do something like that in autoit. Awesome! Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Andreik Posted October 9, 2010 Share Posted October 9, 2010 This is a good work and examples are indeed awesome. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
bogQ Posted October 9, 2010 Share Posted October 9, 2010 i`m astonished, this is really one fine piece of work TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted October 9, 2010 Share Posted October 9, 2010 (edited) Cool, atleast the part I can get working How do you "install" this ? some of it runs fine, some of it gives me a windows error that the program has stopped working.(I copied autoitobject.au3 and .dll to my includes folder)Nvermind, seems to be working second run, for some reason.And let me add an "Awesome" to the above "Cool". Edited October 9, 2010 by Werty Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
Ascend4nt Posted October 9, 2010 Share Posted October 9, 2010 Very impressive:) My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
UEZ Posted October 9, 2010 Share Posted October 9, 2010 (edited) I'm really impressed with the power of Direct3D! Thanks you for your efforts on this awesome work and thank you for sharing it! This will bring AutoIt definitely to the next GFX level!As I said in GDIp.au3 I will repeat it here, too: maybe now dreams come true.I think, the time has come now to say: I will stop with GDI+ stuff (27 examples should be enough) Also 5* from me!Br,UEZ Edited October 9, 2010 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
ProgAndy Posted October 9, 2010 Share Posted October 9, 2010 (edited) Thank you, this is very impressive. Now I know the development of AutoItObject-UDF was worth it. Edited October 9, 2010 by ProgAndy algiuxas 1 *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
UEZ Posted October 9, 2010 Share Posted October 9, 2010 Indeed ProgAndy, without AutoItObject-UDF maybe Direct3D couldn't be be realized! Also a big THANKS to the AutoItObject-UDF dev. team! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Werty Posted October 11, 2010 Share Posted October 11, 2010 I'm attempting to use some of my own heightmaps for the terrain example (11) but it doesnt turn out too good, they are distorted. It should be possible to use a simple 8bit bmp you drawn yourself, and the example accepts the heightmaps I've made, but when imported they are either too flat or too stretched, or maybe a combination of both. Any hints on how to use own heightmaps ? (on a side note for interested, using 512x512 and larger maps takes a LONG time to render ) Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
Authenticity Posted October 11, 2010 Author Share Posted October 11, 2010 Func _TerrainCreate($pDevice, $sHeightMapFile, $iVertsPerRow, $iVertsPerCol, $iCellSpacing, $nHeightScale = 1) ; ... You should play with the cell spacing and height scale values. High cell spacing on a 64x64 heightsmap generate a lower resolution terrain but can be generated faster. Then you can apply a scale factor of 3 or 5 to increase the (now stretched) terrain bumpiness. That terrain is just an example, if you're aiming toward faster approaches you'll need to split the mesh into smaller meshes and handle each individually. Usually, for such tasks, people store a few sized .x files of the flat terrain mesh and generate and apply the heightsmap on the fly. Search for Perlin noise if you're interested. P.S. The _TerrainCreate function spends most of it's time on generating the terrain texture. Try to load a 512x512 heightsmap file without auto generating the texture. I guess it'll take half the time it takes with texture generation. algiuxas 1 Link to comment Share on other sites More sharing options...
Werty Posted October 12, 2010 Share Posted October 12, 2010 (edited) Excuse my newbiness, but I dunno what I'm doing wrong. I change the line you've shown to... Func _TerrainCreate($pDevice, $sHeightMapFile, $iVertsPerRow, $iVertsPerCol, $iCellSpacing, $nHeightScale = 3) ...and... Func _TerrainCreate($pDevice, $sHeightMapFile, $iVertsPerRow, $iVertsPerCol, $iCellSpacing = 10, $nHeightScale = 1) ...but nothing seems to happen, (also tried many other values), it still looks the same, and that's using the original example with the supplied map128.raw map. I change it in Terrain.Au3, save, and then launch TerrainApp.Au3. What am I doing wrong ? Edited October 12, 2010 by Werty Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
trancexx Posted October 12, 2010 Share Posted October 12, 2010 (edited) You are asking general (basic) questions that are not related to Direct3D. Learn the language first, at least that much to understand that what you ask.edit: Not to forget, thank you Authenticity.These examples showed me how to properly handle str type with new version of the wrapper. Edited October 12, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Werty Posted October 12, 2010 Share Posted October 12, 2010 It's on topic in my opinion. Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
Authenticity Posted October 12, 2010 Author Share Posted October 12, 2010 (edited) Thanks trancexx. Can't wait for the new AutoItObject UDF to come out.I thought of encapsulating all the vectors and matrices intrinsic operators (fake) in classes.So.. does the next version of AutoItObject support object methods naturally? i.e withoutcallbacks?Edit: You can do as Firefox did and open a topic about it in the general forum.Changing the function prototype doesn't change how you call it. Make sure you call itwith the correct values.P.S. Can you also somehow help to eliminate the "ptr", Number(DllStructGetPtr(..)) thing? Edited October 12, 2010 by Authenticity algiuxas 1 Link to comment Share on other sites More sharing options...
AlmarM Posted October 12, 2010 Share Posted October 12, 2010 (edited) Great! So mind blowing! 5* from me. Edited October 12, 2010 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
trancexx Posted October 12, 2010 Share Posted October 12, 2010 (edited) Thanks trancexx. Can't wait for the new AutoItObject UDF to come out.I thought of encapsulating all the vectors and matrices intrinsic operators (fake) in classes.So.. does the next version of AutoItObject support object methods naturally? i.e withoutcallbacks?Edit: You can do as Firefox did and open a topic about it in the general forum.Changing the function prototype doesn't change how you call it. Make sure you call itwith the correct values.P.S. Can you also somehow help to eliminate the "ptr", Number(DllStructGetPtr(..)) thing?New wrapper uses DispCallFunc to call methods. No callbacks that execute script code needed. You will see that CPU is significantly down, and some new datatypes of course.Numberizing pointers is something that AutoIt dev team is responsible for. Nothing to be done about that without them.edit: I just reread your question. If you were thinking about encapsulation within _AutoItObject_Create()'s object then no. Callback is needed here since that's the only way to force interpreter to interpret method defined as AutoIt function (the whole purpose of AutoIt-object). Edited October 12, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Werty Posted October 13, 2010 Share Posted October 13, 2010 Right... got it. Now I have a 3D preview for my real world heightmap maker that I've just finished, perfect timing. Here's a sample of Angel Island in san francisco bay, cellspacing=1, heightscale 0.6 Heightmap and texture. Thanks alot again angel_island.zip Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
Authenticity Posted October 13, 2010 Author Share Posted October 13, 2010 Seems quite realistic. Something is wrong with the heightsmap though. Using a Perlin noise, I manage to get smooth transitions and no overlapped triangles. Also, it's quite a bumpy terrain. Try using cell spacing of 15 and a scale factor of 3. It's about taste, so don't judge me. ;] Your next task is to implement a per-pixel lighting shader. It'll increase the realism of the terrain dramatically. algiuxas 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now