Techmix Posted November 15, 2010 Posted November 15, 2010 Ok, i have made a screenshot from it:Greets!
smashly Posted November 15, 2010 Posted November 15, 2010 (edited) Ok, i have made a screenshot from it:Greets!Hi,As a guess I'd say the reason your getting the wrong width/height is because Irrlicht engine is loading the image as a texture and auto making the texture to the power of 2.Cheers Edited November 15, 2010 by smashly
Techmix Posted November 15, 2010 Posted November 15, 2010 Hmmm, i think the Function gives the real width and hight back... like '_IrrGetImageInformation'. Greets!
smashly Posted November 15, 2010 Posted November 15, 2010 Hi, yes it does give real width and height if the texture is to the power of 2..eg: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048...etcIf your video card supports non power of 2 textures you could try using _IrrSetTextureCreationFlag(0x00000040, $IRR_ON) before creating the texture (0x00000040 = ETCF_ALLOW_NON_POWER_2, may make no difference).But by default Irrlicht engine will scale the texture to a power of 2 if it's not already.If you would like to know if your video card supports non power of 2 textures then use _IrrQueryFeature()(Have a look in the examples folder for 023_Example_Video_Features.au3 to see).But the bottom line is what you think may be a bug of au3Irrlicht2 is actually part of Irrlicht core and Franks Wrapper.Cheers
Techmix Posted November 15, 2010 Posted November 15, 2010 Ahhh, thank you for the declaration! I try this out an see what happens '_IrrSetTextureCreationFlag' Greets!
smashly Posted November 15, 2010 Posted November 15, 2010 (edited) Your welcome, In regards to the FontTool.exe.. When you save a font it will generate a xml file along with your font image.. Use the xml with _IrrGetFont()..#include "au3Irrlicht2.au3" _IrrStart() Global $hFont = _IrrGetFont ( "./media/ComicSansMS16px.xml") While _IrrRunning() _IrrBeginScene( 0,0,0 ) _Irr2DFontDraw ($hFont, "Comic Sans MS, 16px, 512x512", 120, 80, 250, 96 ) _IrrEndScene() WEnd _IrrStop()Font and xml (generated with FontTool.exe) attached: (you need the ComicSansMS16px.xml and ComicSansMS16px0.png to be in the same directory as each other of coarse) XML file: Font Image (PNG): Cheers Edited November 15, 2010 by smashly
Techmix Posted November 15, 2010 Posted November 15, 2010 (edited) ...and i wonder about the generated .xml And i think the reason about 650MB Ram within only loaded 40 Textures is '...making the texture to the power of 2'; right?!? I have think about that i generated a Memory-Lag... Thank´s for the replies!! [Edit] '...power of 2...' means also that the memory usage of the loaded Textures is 4xfilesize; right?!? Edited November 15, 2010 by Techmix
smashly Posted November 15, 2010 Posted November 15, 2010 Hi, 650mb for 40 textures @ 2048x1024 sounds a bit big, it should be about half that size around 320MB ~ 350MB. Not sure maybe my maths is not correct (I'm hopeless at math ..lol) 2048 * 1024 * 40 = 83886080 pixels ;4 bytes to a 32 bit pixel (I think, not sure) 4 * 83886080 = 335544320 bytes ;1024 bytes makes a Kilobyte ;1024 Kilobytes makes a Megabyte 335544320 / 1024 / 1024 = 320MB
Techmix Posted November 15, 2010 Posted November 15, 2010 i have take a look and there are over 120 Pics that are Loaded in different ways in the Ram: Skybox, Textures and Billboards. And my WindowsXP may have a memory usage about 127MB. Round-About it´s 687MB-127MB = 560MB. BUT when i take a Look at the Task-Manager my Programm-Process is only at the Loadingtime about 120-150MB and after that the Process shows only 35MB. But the final memory usage is about 687MB. ...at that XP computer i have only 512MB Ram, and then it swaps, and swaps, and have many lags; did i start it in this computer (with 1.5GB) with Win7 there are no swapping and no lags.
BiliyomKi Posted November 16, 2010 Posted November 16, 2010 (edited) I'm thinking to start "irrKlang Wrapper" project but I dont know anything to wrapping with autoit Edited November 16, 2010 by BiliyomKi An AutoIT user.
smashly Posted November 16, 2010 Posted November 16, 2010 (edited) I'm thinking to start "irrKlang Wrapper" project but I dont know anything to wrapping with autoit Hi,Linus has started on it already. Shoukd be some basic sound functions included in next release (v2.05). You can have a look in the help file from hereEdit: Not to put a downer on it, but irrKlang isn't that good the way it is now imho.When/If Frank makes it so that Irrlicht Wrapper can handle the sounds.. eg: attach a sound event to a node etc, then it takes the load off of autoit's main loop.As it is a user will need to detect when the sound needs to be played and call it in their loop.If the the wrapper handled playing the sound on an event then it frees up the main loop of Autoit.Autoit is not fast so having to check for an event and firing a sound every cycle of your main loop is just going to make things slower and more work.For example I have a 1000 asteroids crashing randomly into a planet, so now in my main autoit loop I have to check if 1 of 1000 asteroids has hit the planet and then play a sound if they have...There are work arounds so I'm not having to loop through 1000 asteroids, but it would make is so much easier if I just attch a sound event to an asteroid node and that event is fired by the engine upon collision. But that's just me being negative, some sound is better than no sound over all Cheers Edited November 16, 2010 by smashly
BiliyomKi Posted November 16, 2010 Posted November 16, 2010 How can I download all files in this link: http://code.google.com/p/au3irrlicht2/source/browse/#svn/trunk/media An AutoIT user.
linus Posted November 17, 2010 Posted November 17, 2010 (edited) How can I download all files in this link: http://code.google.com/p/au3irrlicht2/source/browse/#svn/trunk/mediaIf you are interested in using the dev version see here - you'll need an subversion client for this, best I know is TortoiseSVN. But be aware - dev version means it's a dev version. Definetly not recommended for usage without fun to figure out independently how uncomplete things work (and why (yet) not!!) @smashly: great to see you doing support inside this thread; I am alive but VERY short on time Edited November 17, 2010 by linus
hot202 Posted November 18, 2010 Posted November 18, 2010 i cant get any of the examples to work. i try to run them but nothing happens. im on windows 7 64 bit
trancexx Posted November 18, 2010 Posted November 18, 2010 Run 32-bit interpreter. Impressive work guys! And I mean it. ♡♡♡ . eMyvnE
hot202 Posted November 18, 2010 Posted November 18, 2010 ok i got all the examples working running under 32 part from one example 004_Example_3DModel just crashes i get the stopped working error
kaotkbliss Posted November 18, 2010 Posted November 18, 2010 I believe it is something like $Terrain=_IrrGetMesh( Path and name to your .dae ) $TerrainNode=_IrrAddMeshToScene($Terrain) 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
hot202 Posted November 18, 2010 Posted November 18, 2010 (edited) thanks how do you add the textures to it to. cos i dont see anything how do we find the pos to make _IrrSetNodePosition and _IrrSetNodeRotation Edited November 18, 2010 by hot202
kaotkbliss Posted November 18, 2010 Posted November 18, 2010 _IrrSetNodeMaterialTexture($TerrainNode, _IrrGetTexture( Path to texture ), 0) The final number is a texture layer, in the examples I only ever see them use 2 textures on the same mesh 0 and 1 so I don't know if it will support more. $pos = _IrrGetNodeAbsolutePosition($TerrainNode) That will give an array of coordinates of the current position ($pos[0], $pos[1], $pos[2]) 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
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