wh1sp3r Posted April 6, 2010 Share Posted April 6, 2010 It will be good to load model from array. I can use C function to load file into array and call command LoadObjectFromArray( char* array, int parameters) ... etc why is it good ? because we can have own loading mechanism, multithreaded loading from memory is fast enough in realtime (i think) 1 Quote -= Phenom II X4 965 3.4Ghz - ATI HD5870 - 6 GB DDR3 RAM - Windows 8 Pro 64x=- Website: http://www.flamewarestudios.com Link to comment Share on other sites More sharing options...
Josh Posted April 6, 2010 Share Posted April 6, 2010 What does this have to do with multithreading? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Masterxilo Posted April 6, 2010 Share Posted April 6, 2010 I guess he thinks that most of the slowdown from loading meshes and other files comes from reading the data from the HDD (which might be true). So one could load the files into memory in a separate thread and then tell the engine to load the stuff from there. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
wh1sp3r Posted April 7, 2010 Author Share Posted April 7, 2010 yes, exactly Masterxilo Quote -= Phenom II X4 965 3.4Ghz - ATI HD5870 - 6 GB DDR3 RAM - Windows 8 Pro 64x=- Website: http://www.flamewarestudios.com Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted April 10, 2010 Share Posted April 10, 2010 I second this request! Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted August 11, 2010 Share Posted August 11, 2010 I also think it would be great to be able to load these things from memory Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Rick Posted August 11, 2010 Share Posted August 11, 2010 I agree with this, and honestly it should be as easy as copying the memory from one thread to another. This must be possible. If someone knew how to sniff around memory they should be able to figure out the structures of these entities and be able to get this going. I would assume one you knew the memory structures of say a Mesh and all the related memory structures needed around it, you would be able to copy that memory from one thread to another. 1 Quote Link to comment Share on other sites More sharing options...
Mumbles Posted August 11, 2010 Share Posted August 11, 2010 I wanted to suggest this a while ago (Dec '09 sort of time) but I also spotted some complications. When a model is loaded, say "something.gmf" the engine searches for: something.gmf something.phy something.mat somethingLODx.gmf How would this be done with memory? You would have to provide a memory address for at least the first three of those. How would it handle LOD meshes? The only realistic way I could think of was the ability to add them with separate function calls later on Example: TModel Something = LoadModel("Something.gmf"); AddModelLOD(Something,2,"SomethingLOD2.gmf"); Without something like that, you would have to make the engine aware of how many pointers you want to pass. Then there's mat file issue. How would you specify the texture being in memory? You simply cannot know where your texture is going to be allocated. I mean I would be in favour of packing everything into a single (encrypted) binary file that you can decrypt once it's in memory. The file would say how many LOD meshes there were, how many textures there were, and would list the size of each mesh / physics file, so you could know how many bytes to skip when loading of portion of the overall model. But simply saying you want to load from memory, I don't think is a very good idea unless you could describe ..how.. you want to load from memory. I was thinking about this again recently, because I was thinking about writing a short tutorial about quick, simple encryption. But I soon realised that there is no practical use for it in Leadwerks, because you have to load the decrypted files from the hard disk. Anyone being concerned enough to want to encrypt their assets in the first place will know that the the second their decrypted files hit the hard disk, they're vulnerable. Edit: I should add the the issues I listed mostly only apply to LoadModel. Loading an individual texture / sound from memory should be relatively straight forward. Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
Rick Posted August 12, 2010 Share Posted August 12, 2010 Ideally, it would be nice if we could get a pointer for any loaded entity. Some kind of function like, GetEntityPointer() so we have the memory address to start with. Then if we could get a detailed description of the memory structure for each entity. If we had that we should be able to do some cool things. You could get the entity for texture and/or material on a loaded model. Then from that you could call this GetEntityPointer() method to get the memory location of it. Then use that types memory layout to copy it. There has to be a way to get this information, with some kind of memory sniffer and some trial and error. Quote Link to comment Share on other sites More sharing options...
Sean Posted August 12, 2010 Share Posted August 12, 2010 i would LOVE to be able to load a texture from memory. I want to create a 3d slideshow using photos from a folder. Currently i can't load .jpg, .bmp etc. as a texture. ( or at least not that i am aware of ) The .dds converter tool is just too slow. Quote AMD Phenom II X6 Black Edition, 8GB, 120 GB SSD, 2TB HDD, nVidia GTX 570 1.2GB, Win 7 x64 Intel Core i5, 4GB, 120GB SSD, NVidia 360M 1GB, Win 7 x64 Link to comment Share on other sites More sharing options...
Rick Posted August 12, 2010 Share Posted August 12, 2010 As I'm thinking about this, and messing around with memory sniffers, I think one would have to someone add the TEntity value that gets normally returned, to some kind of list on the main thread. I assume the main thread has a list of these that point to the internal storage so it can act on the data. Not sure how one could do that. Quote Link to comment Share on other sites More sharing options...
TylerH Posted August 18, 2010 Share Posted August 18, 2010 The handles exposed in the DLL are actually memory pointers, integers. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
L B Posted September 8, 2010 Share Posted September 8, 2010 This is basically solved with the UNIQUE flag in LE3. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.