Joh Posted June 12, 2012 Share Posted June 12, 2012 Here my first code for voxelization, my target is create a navmesh and those code work quite good, but could be better. Anyway i was testing it and i like the result! 2 Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Roland Posted June 12, 2012 Share Posted June 12, 2012 This is exiting stuff. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Joh Posted June 12, 2012 Author Share Posted June 12, 2012 Well i should create also my own cube implementation to let it usable. Next step is to create a video with animation. Or (better) using texture. I'll see. Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Pixel Perfect Posted June 12, 2012 Share Posted June 12, 2012 Very nice, will be watching this 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...
wh1sp3r Posted June 12, 2012 Share Posted June 12, 2012 it's nice, but 5 fps with +- 1 250 000 poly ? hehe 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...
Joh Posted June 12, 2012 Author Share Posted June 12, 2012 Well i used leadwerks cube.. Also my target is just voxelize it (i don't really need to render) as i use it only to create a navmesh. But i was thinking to implement also a render way and the performance it can (slightly) improved with other code. Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Josh Posted June 12, 2012 Share Posted June 12, 2012 You could output that data to a 3D printer and a copy of it in real life. 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...
Joh Posted June 12, 2012 Author Share Posted June 12, 2012 ahaha not sure it will work! Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Rick Posted June 12, 2012 Share Posted June 12, 2012 Joh, did you use CreateCube() each time or did you make 1 cube and use CopyEntity() on that cube because I think that helps with the FPS. Quote Link to comment Share on other sites More sharing options...
Joh Posted June 12, 2012 Author Share Posted June 12, 2012 CopyEntity but this model have more then 4000 triangles and cube are 0.1 scaled.. so there are a lot of them! Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Benton Posted June 13, 2012 Share Posted June 13, 2012 You could also do this in Blender, using the remesh modifier. Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Joh Posted June 13, 2012 Author Share Posted June 13, 2012 Well exactly how this could help me? I mean i CHOOSE to use leadwerks as in past this community gave me a lot, now i wanna create a commercial game with this engine. Also my target is a real-time navmesh generator that will be used during the game, so i don't need static data or something else. @Josh Is it possible to have a callback ffrom the engine during the render? Exactly when triangle are processed.. Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Josh Posted June 16, 2012 Share Posted June 16, 2012 I don't understand what you mean by triangles being processed. There are draw entity callbacks, but you can't override them with something else. 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...
wh1sp3r Posted June 16, 2012 Share Posted June 16, 2012 make a shader , where you can write a position of the pixel in WorldViewProjection into rendertarget. Then, you can read rendertarget and set positions to all your boxes into right position just a theory, lol 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...
AnniXa Posted June 17, 2012 Share Posted June 17, 2012 Hey this is cool! Could you make some kind of exporter for it that exports some kind of voxel map of this? I mean just a binary file with inital height, witdth, depth and then the bits or as bytes(0 and 1 if there is a cube or not) would be enough. i would love to load this into my blockmap. Quote Whuts wroong? Link to comment Share on other sites More sharing options...
Joh Posted June 17, 2012 Author Share Posted June 17, 2012 @Annixa an exporter is already ready. I'll upload it tomorrow. @Wh1sp3r a good idea, i could try it. Creating a good voxel render code it will take some time anyway. @Josh It will be amazing if i could have a callback when the engine renderize triangles. This is really usefull for the real time navmesh. As now my code spent something like 35 millisecs to check 5000 triangles, as i don't have directly access to the render source code i am checking all the triangles.. It will be faster if i will be able to skip this step with a callback. Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Josh Posted June 17, 2012 Share Posted June 17, 2012 The engine doesn't ever deal with triangles in the rendering routine. It just tells the GPU which vertex buffer to draw. In Leadwerks3D, it is possible to replace the rendering module with your own, so you could make a voxel ray-tracer without using my renderer at all. 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...
Naughty Alien Posted June 18, 2012 Share Posted June 18, 2012 ..actually, you should look for PolyVox library..it will voxelize mesh/cut off for you all unnecessary surfaces and pass it to renderer as a triangles..tested it and it works great with LE 2.x Quote Link to comment Share on other sites More sharing options...
Joh Posted June 18, 2012 Author Share Posted June 18, 2012 There is a beta of the exporter here: http://www.leadwerks.com/werkspace/files/file/353-voxel-exporter/ @Josh i see. Ok i'll try to improve my code. @Naughty Allen i know this lib, but if i use it i will lose the possibility to get fun doing this! 1 Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Roland Posted June 18, 2012 Share Posted June 18, 2012 @Naughty Allen i know this lib, but if i use it i will lose the possibility to get fun doing this! I know that feeling Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Joh Posted June 18, 2012 Author Share Posted June 18, 2012 Ahaha that's why i love my job! That feeling! Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Pixel Perfect Posted June 18, 2012 Share Posted June 18, 2012 Libs are ok until you need to do something they don't do, then you wish you'd written it yourself 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...
Benton Posted June 19, 2012 Share Posted June 19, 2012 You will also lose the possibility of more time Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Joh Posted June 19, 2012 Author Share Posted June 19, 2012 @Benton i used library many times, if you need to do a project you have limited amount of time. But this is not my case, i do this for fun! 1 Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Roland Posted June 19, 2012 Share Posted June 19, 2012 I fully understand what Joh is saying. I also do this for fun, no more, no less. Developers can have different goals. Some want to get things done as quickly as possible and care less about how. The main goal is to get things up working as fast a possible with as little effort as possible. I can fully understand the need for such an approach, specially if the output is going to be a commercial game giving some income. In that case, lib's that save time and effort is gold. Then we have another type of developer like my self. I'm not into this to get an income or hit the world with something spectacular. All this is just for fun, a hobby. Of course I also want to get things done, but in my case I care more about how its done and less about the time it takes to get it done. I guess that Joh may belong to this group of developers as I do. Both types of developers has their own justification and different methods, and that's a good thing. In my eyes there is no 'better' or 'worse' method of developing using lib's and third-party code. It all depends of what the intent is. So use lib's anytime you like to, or make your own if that's fun, as long as you are enjoying what you do. 3 Quote Roland Strålberg Website: https://rstralberg.com 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.