bogQ Posted January 25, 2009 Share Posted January 25, 2009 (edited) A. Percy, or anyone i know that im probably booring everyone with my dumb questions, but its beter to ask rather that to dont know when i use command AddImage is there a way to resize or delite,move,unload that img from screen?at the moment i made 100 difrent pictures to simulate HP (and i still need to do 100 more pictures 4 MP) state of my animation, and every picture is drowing one ower another, im only looking 4 other solutions like one picture resizing to simulate curent state.looking forward 4 next update, cant wait, love your work Edited January 25, 2009 by bogQ 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...
JRowe Posted January 26, 2009 Share Posted January 26, 2009 You can use the billboard nodes, which are essentially vertical front facing pictures. $yourImage[0] = "frames\anim1.gif" SetMaterialTexture( $yourBillboardNode, 0, GetTexture( $yourImage[0]) ) $yourImage[1] = "frames\anim2.gif" SetMaterialTexture( $yourBillboardNode, 0, GetTexture( $yourImage[1]) ) $yourImage[2] = "frames\anim3.gif" SetMaterialTexture( $yourBillboardNode, 0, GetTexture( $yourImage[2]) ) ... $yourImage[100] = "frames\anim101.gif" SetMaterialTexture( $yourBillboardNode, 0, GetTexture( $yourImage[100]) ) That is extremely unoptimized and zero context code. You still have to create your $yourBillboardNode, initialize it, and place it, create a camera and point it toward the $yourBillboardNode, and so on. Anyway, check out the Billboard example, and then use SetMaterialTexture to change the images. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
bogQ Posted January 27, 2009 Share Posted January 27, 2009 Anyway, check out the Billboard example, and then use SetMaterialTexture to change the images.Sry, il try this time and next time if needed when i post to better explaine what im trying to say i dont have problems with billboard, my HP bar is foloing animation (and as y already explained how to change the images, ist working, and i dont have problem with that), in my case im using normal mesh node so that i can scale it to simulate HP state and not to use 100 pictures (becose i didnt find way to scale billboardnode)so i dont have problems with HP bar on top of animation, i have problems with hp mp and lvl status bar on uper left corner (animation info)4 exsample im looking 4 a way to scale one img so that i dont need to have 100 of them (only one to scale "or at least to move that img to the left and right")maby i can try to SetViewPort with focused camera and displayed in uper left corner and then to scale hp node to simylate (animation info) bar, i dono how will it turnout becose it will b camera in a camera on one screen. 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...
JRowe Posted January 28, 2009 Share Posted January 28, 2009 (edited) Ahh. Create a flat panel as your HP bar, then use Scale(X,Y,Z) and scale the hp bar node to the size you want along the axis you want. Probably Y, so you'd do Scale(1,.93,1) to represent 93% health.That would work... However, using 3D nodes for your GUI seems to be very wasteful, to me. You're giving the engine things to work with and having to come up with solutions dependent on those 3D nodes, and what you're after is a flat panel animation. So, create a single GUI panel 3D node, then you can use GDI to write a virtual bitmap, and use SetMaterialTexture() to update the GUI from your GDI loop. That way, at least there is only one 3D object for the engine to handle, and you can still handle fancy transitions and animations on the GUI itself. I don't have the details at hand, but search for GDI examples until you find the ones that deal with modifying a bitmap in memory, and you can adapt that to your needs. Basically, you'll have to script some basic GUI elements such as statusbars, text widgets, and buttons, but you'll have the best solution available at this point. Edited January 28, 2009 by JRowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
JRowe Posted February 1, 2009 Share Posted February 1, 2009 $EMAT_STAND, $EMAT_RUN, $EMAT_ATTACK, $EMAT_PAIN_A, $EMAT_PAIN_B, $EMAT_PAIN_C, $EMAT_JUMP, $EMAT_FLIP, $EMAT_SALUTE, $EMAT_FALLBACK, $EMAT_WAVE, $EMAT_POINT, $EMAT_CROUCH_STAND, $EMAT_CROUCH_WALK, $EMAT_CROUCH_ATTACK, $EMAT_CROUCH_PAIN, $EMAT_CROUCH_DEATH, $EMAT_DEATH_FALLBACK, $EMAT_DEATH_FALLFORWARD, $EMAT_DEATH_FALLBACKSLOW or $EMAT_BOOM Those are the animation states available for SetMD2Animator() . Check out the RenderToTexture example to see 2 models animated in conjunction with eachother. Those animation states are simply names. You don't have to create animations following their naming strategy, but you do have to use those names to call whatever animations you assign to those slots... e.g. $EMAT_STAND could actually be your model buzzing around in circles, doing wacky yoga stances, or something other than standing. If you have an MD2 model, those animation states can be called, and if the animation frame data has been generated for that model, the animation will be played. I've verified on several models I have (but can't link to for copyright reasons. I'll try to find some free ones for reference.) I can safely say that if you're having issues with md2 animations, its something on your end. Post code and model files (or PM) and we can tell you what's going on. Vague assertions that something isn't working is just going to send people off on tangents. Anyway, give us something to work with and we'll get you fixed up asap [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
JRowe Posted February 5, 2009 Share Posted February 5, 2009 After researching animation extensively and exploring different formats, I've found that md2 models are generally obsolete, obscure, and difficult to use. However, since the capability is there, and the animations are simply called and managed, md2 is a great format for games in AutoIt. So, in order to get an animation from md2:$ModelsDir = @ScriptDir & "\Models\" $CharMesh = GetMesh( $ModelsDir & "DarthVader\tris.md2" ) $CharWeaponMesh = GetMesh( $ModelsDir & "DarthVader\weapon.md2" ) AddAnimatedMeshSceneNode( $CharMesh ) ;Setting animation SetMD2Animation( $CharMesh , $EMAT_RUN ) SetMD2Animation( $CharWeaponMesh , $EMAT_RUN ) ;Setting animation speed SetAnimationSpeed( $CharMesh , 30 ) SetAnimationSpeed( $CharWeaponMesh , 30 )This is from the help file, just expanded on. What is happening is simple: you load the mesh file (in this case, the figure of Darth Vader, and a lightsaber. The models have been animated in concert... $EMAT_RUN for both models are synchronized. If you did, for example, the $EMAT_FLIP on tris.md2 (Vader) and $EMAT_BOOM for weapon.md2 (light saber), both animations would work, but they'd be unsynchronized. Try various combinations. By manipulating the animation speed, in conjunction with carefully timed animation sequences, you can get some neat effects.It's easy enough to work with the logic. For complex animations, though, this won't be great for expressiveness.You'll need a modelling program and some patience to create fully animated md2 files. Here's a great resource geared toward blender, but applicable to any modelling application. There's the quake modeller still floating around, a plethora of open source apps, and various commercial programs ranging from milkshape to Maya.That should help some people with md2s. I'm looking at how animation is done, and it's very eclectic. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
bogQ Posted February 17, 2009 Share Posted February 17, 2009 (edited) sry JRowe 4 replying this late to your posts (dident had alot of free time after new eyar ) i know that problem whas on my side and that is why i whas looking 4 other solutions. My problem whas that i dident understand what is happening to animation when i call command emat_run, now after i whas on irrlicht forum and spended any free time that i had i think that i understand, every command have specific valye in it (first and last frame, start and end frame) i didnt find any explanation in help file from Au3IrrLicht, and that is why i didnt understand what it mented (probably it is in help file but i did not see it ) This is from MD2 Animation Type List that i finaly located on irr forum that explainds what i dident understand from frame 0 to frame 39 tootal frames per a command (40 frames) command EMAT_STAND from frame 40 to frame 45 tootal frames per a command (06 frames) command EMAT_RUN from frame 46 to frame 53 tootal frames per a command (08 frames) command EMAT_ATTACK from frame 54 to frame 57 tootal frames per a command (04 frames) command EMAT_PAIN_A from frame 58 to frame 61 tootal frames per a command (04 frames) command EMAT_PAIN_B from frame 62 to frame 65 tootal frames per a command (04 frames) command EMAT_PAIN_C from frame 66 to frame 71 tootal frames per a command (06 frames) command EMAT_JUMP from frame 72 to frame 83 tootal frames per a command (12 frames) command EMAT_FLIP from frame 84 to frame 94 tootal frames per a command (11 frames) command EMAT_SALUTE from frame 95 to frame 111 tootal frames per a command (17 frames) command EMAT_FALLBACK from frame 112 to frame 122 tootal frames per a command (11 frames) command EMAT_WAVE from frame 123 to frame 134 tootal frames per a command (12 frames) command EMAT_POINT from frame 135 to frame 153 tootal frames per a command (19 frames) command EMAT_CROUCH_STAND from frame 154 to frame 159 tootal frames per a command (06 frames) command EMAT_CROUCH_WALK from frame 160 to frame 168 tootal frames per a command (09 frames) command EMAT_CROUCH_ATTACK from frame 169 to frame 172 tootal frames per a command (04 frames) command EMAT_CROUCH_PAIN from frame 173 to frame 177 tootal frames per a command (05 frames) command EMAT_CROUCH_DEATH from frame 178 to frame 183 tootal frames per a command (06 frames) command EMAT_DEATH_FALLBACK from frame 184 to frame 189 tootal frames per a command (06 frames) command EMAT_DEATH_FALLFORWARD from frame 190 to frame 197 tootal frames per a command (08 frames) command EMAT_DEATH_FALLBACKSLOW from frame 198 to frame 199 tootal frames per a command (01 frames) command EMAT_BOOM tootal of 200 frames from one animation at the moment im using free misfit modeler , program is small and nice, bone to frame animation with one click after that from mm3d (that can save bone animation) so that you dont lose them when exporting to md2 becose that format dont save bones, easy to understand. When i have more time im hopeing to make my first steps in Au3IrrLicht world looking forward 4 next update, cant wait edit: for my first steps in Au3IrrLicht world heare is how it look like for now new edit: soon i hope that il have some fighting with that mob new edit: at the moment mob is walking on its own and if you get too neare him he will start closing in on you and hiting you with his head when he get you, i still have to work on: * hp for the mob. * hp for char. * to join two scripts that r used (one for game other for gui suport) in one. * to make new script that will controll all mobs on the ground, their animation and hp. * char animation and attacking. * loading and deliting objests and mobs based on distance from char. * first quest. * Make my own char so that i can get out of redistributhing EULA for thisone that im curently using for testing. After that i hope that i can finaly post whole script as an example. Free models for testing used from http://artist-3d.com/ and http://www.turbosquid.com/ Edited September 25, 2011 by bogQ 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...
Uriziel01 Posted May 11, 2009 Share Posted May 11, 2009 Sorry for outdigging this thread but i have a little question for A. Percy. Are you going to continue developing this plugin? And, you are going to make it opensource or not? In my opinion this is the best graphic plugin for Autoit ever and the project should be continued, please answer if you will read this. I have milions of idea when loking forward for abilities of this plugin, I hope you wont left this project in this state, I'm waiting for updates (and answer). Link to comment Share on other sites More sharing options...
youknowwho4eva Posted May 11, 2009 Share Posted May 11, 2009 That's funny, I was actually thinking of this UDF earlier today. I did have much fun with it, and had a few ideas. I wish I had the C++ knowledge to do it myself. I was thinking, in the past, of making a combo 3D GDI+ program. I just haven't had the time or the notion to do it. I was going to have the GDI run in the background, export images, and have them be the sides of the spinning cube example that is out there some where, it would be like an animated 3D cube. Would be nifty. Giggity Link to comment Share on other sites More sharing options...
insignia96 Posted July 11, 2009 Share Posted July 11, 2009 This is a great idea. I love this plugin, its really versatile! Keep up the dev work on this! Visit my website to see all my finished releases!Releases here:UDFs:GUI ResizingColor List (Web Colors)GUIFade_NearestPower Link to comment Share on other sites More sharing options...
Randeniya Posted July 12, 2009 Share Posted July 12, 2009 U Have done well ! ! ! Link to comment Share on other sites More sharing options...
dantay9 Posted July 12, 2009 Share Posted July 12, 2009 This is incredible! With opengl and prospeed, you could make a really cool game! Keep up the great work! I will be following this topic! Link to comment Share on other sites More sharing options...
A. Percy Posted July 12, 2009 Author Share Posted July 12, 2009 Atendendo a pedidos, uma nova versão Ok, new version http://www.box.net/shared/mpjzjqyzsu This is an intermediary version before I implement bullet collision functions. The size of plugin DLL growed a little, cause I'm using Bullet includes for some tests Some light functions was redesigned. I was using irrlicht 1.5, but if was incompatible with some collision functions, so, I'm using 1.4.2 again @insignia96 Now you can use AddSphereSceneNode @All I forget to include the actualized help file, so use this help instead: http://www.box.net/shared/0zgjdn5odc Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
insignia96 Posted July 12, 2009 Share Posted July 12, 2009 (edited) OH noes! The AddSphereSceneNode doesnt work for me! Edited July 12, 2009 by insignia96 Visit my website to see all my finished releases!Releases here:UDFs:GUI ResizingColor List (Web Colors)GUIFade_NearestPower Link to comment Share on other sites More sharing options...
A. Percy Posted July 13, 2009 Author Share Posted July 13, 2009 OH noes! The AddSphereSceneNode doesnt work for me! Please, put it at examples folder and run: expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.4.9 Author: A. Percy Script Function: Template AutoIt IrllLicht script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <..\IrrlichtPluginUtils.au3> AutoItSetOption( "TrayIconHide", 1 ) Opt( "WinTitleMatchMode", 3 ) ;creating the device CreateDevice( $EDT_OPENGL, 640, 480, 16, 0, 0, 0 ) ;setting window caption SetWindowCaption( "My first IrrLicht Scene" ) ;Add Light $Light = AddLightSceneNode( 0, 2000, 2000, 0, 1, 1, 1, 10000 ) ;Add Camera $Camera = AddCameraSceneNodeFPS( 0, 100, 200, 1, 0.8 ) SetPosition( $Camera, 50, 25, 50 ) ;setting position SetTarget( $Camera, 0, 25, 0 ) ;setting target ;Creating scene nodes $Node = AddSphereSceneNode( 20 ) ;Setting position SetPosition( $Node, -60, 0, 20 ) While IrrRun( ) ;BeginScene( bool backBuffer, bool zBuffer, int Alpha, int Red, int Green, int Blue ) BeginScene( true, true, 255, 100, 100, 100 ) ;gets collision from Vader SceneDraw( ) $CollCameraNode = GetSceneNodeFromCameraBB( $Camera ) If $CollCameraNode = $Node Then ToolTip ( "It's a sphere!" ) EndIf GuiDraw( ) EndScene( ) sleep( 20 ) ToolTip( "" ) Wend Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
insignia96 Posted July 14, 2009 Share Posted July 14, 2009 (edited) My stupid Windows wouldn't replace the dll file in the system32, but i got it to work eventually. Edited July 14, 2009 by insignia96 Visit my website to see all my finished releases!Releases here:UDFs:GUI ResizingColor List (Web Colors)GUIFade_NearestPower Link to comment Share on other sites More sharing options...
myspacee Posted July 16, 2009 Share Posted July 16, 2009 Hello to all,see everywhere iTunes interface 'clones' :http://blogs.sun.com/chrisoliver/resource/displayShelf.pngIs there any way to build similar GUI with Au3IrrLicht ?Thank you for any info,(please at least a Yes or No)m. Link to comment Share on other sites More sharing options...
insignia96 Posted July 17, 2009 Share Posted July 17, 2009 Yes there is. This would probably be done easier with GDIPlus. Visit my website to see all my finished releases!Releases here:UDFs:GUI ResizingColor List (Web Colors)GUIFade_NearestPower Link to comment Share on other sites More sharing options...
myspacee Posted July 17, 2009 Share Posted July 17, 2009 thank you for reply, no problem to load a picture in a GUI using GDI, but animation is not so easy, any example ? thank you, m. Link to comment Share on other sites More sharing options...
insignia96 Posted July 18, 2009 Share Posted July 18, 2009 to do this easily, after i have thought about it for a while, i would use Au3IrrLicht or the similar OpenGL Plugin by A. Percy. To do the animation i would make a group of flat cubes and scale them and move them according to the chosen input method. Visit my website to see all my finished releases!Releases here:UDFs:GUI ResizingColor List (Web Colors)GUIFade_NearestPower 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