Gandi Posted December 30, 2012 Share Posted December 30, 2012 Is it possible to create and remove terrain holes at runtime, via code? Quote Link to comment Share on other sites More sharing options...
Gandi Posted January 11, 2013 Author Share Posted January 11, 2013 Bump Quote Link to comment Share on other sites More sharing options...
ChrisMAN Posted January 11, 2013 Share Posted January 11, 2013 What is a hole? Is it something you see through. Something you can fall through? Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 11, 2013 Share Posted January 11, 2013 The Leadwerks Terrain has the feature to allow holes to be placed in it to allow you to pass into Cave/Underground systems etc. I'm not aware of any functions being exposed to allow manipulation of these in code but I could be mistaken. 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...
Gandi Posted January 11, 2013 Author Share Posted January 11, 2013 I tried to generate an .sbx file with a proper .vis file at runtime and then loading that generated scene, but it just messes up the terrain. I guess I will have to apply some kind of invisibility-shader to the terrain, but I am not so quite sure how to do that. I was hoping that someone knows how th leadwerks scene does this. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted January 11, 2013 Share Posted January 11, 2013 Without using bmx it will be impossible as the required functions are not exposed. But for bmx here is the part of code from my extended dll which handles the TileVisibility. Located in EX_Sceneloader.bmx from this package http://www.leadwerks.com/werkspace/files/file/289-extension-dll-source-release/ : If Int(String(map.ValueForKey("hiddentiles"))) > 0 Local vfile:String = StripExt(SBXReadFile) + ".vis" Local vstream:TStream vstream=ReadFile(vfile) If vstream If vstream.size()=terrain.resolution*terrain.resolution Local x:Int Local y:Int For x=0 To terrain.resolution-1 For y=0 To terrain.resolution-1 terrain.SetTileVisibility(x,y,vstream.ReadByte()) Next Next 'vstream.readbytes(terrain.newtonHeightFieldCollisionTag.m_attributes,terrain.resolution*terrain.resolution) terrain.UpdateVisibilityTexture() Else AppLog "Visibility file is wrong size.",APPLOG_WARNING EndIf vstream.close() Else AppLog "Failed to load file ~q"+vfile+"~q.",APPLOG_WARNING EndIf loader._progresscount:+1 EndIf You might find other useful info in the dll source like manual vegetation painting etc. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Gandi Posted January 12, 2013 Author Share Posted January 12, 2013 Hell yeah! I created a new .dll with these two simple functions: Const COMPILE_DLL:Int = True Function SetTileVisibility(terrain:TTerrain,x:Int,y:Int,state:Byte) "Win32" 'EXPORT If COMPILE_DLL Then GCEnter() terrain.SetTileVisibility(x,y,state) EndFunction Function UpdateVisibilityTexture(terrain:TTerrain) "Win32" 'EXPORT If COMPILE_DLL Then GCEnter() terrain.UpdateVisibilityTexture() EndFunction And now it works Thank you very much for the extension dll source. An amazing piece of work you did here. Quote Link to comment Share on other sites More sharing options...
Flexman Posted January 17, 2013 Share Posted January 17, 2013 How up to date is the ENGINE.BMX for making the DLL? Is it required for fixes made to the TEntity hierarchy? Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
klepto2 Posted January 17, 2013 Share Posted January 17, 2013 If you compile it with the latest version (up to date bmx module) all fixes of the delivered dll should be included in the extended dll as well. Only completely new functions might be missing, but this should be easy to fix. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Flexman Posted January 20, 2013 Share Posted January 20, 2013 Cheers, got it working now. All I need now is a work free weekend to exploit the cool possibilities your extensions have opened up. Thanks . Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
paramecij Posted January 20, 2013 Share Posted January 20, 2013 Would any of you two fine gents be willing to share the up to date extended ,dll perhaps? I'd do this myself but don't have bmax, or would the demo version of bmax suffice ? (only 30day time limit is mentioned) Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 20, 2013 Share Posted January 20, 2013 +1 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...
klepto2 Posted January 20, 2013 Share Posted January 20, 2013 I will upload a new dll with these 2 new extension tomorrow. Unfortunatly i don't have time today, to test it properly. So i need till tomorrow. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 20, 2013 Share Posted January 20, 2013 Much appreciated but take whatever time you need 1 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...
klepto2 Posted January 21, 2013 Share Posted January 21, 2013 the latest extension dll (release and debug build). I have integrated the latest Terrainfunctions. I will provide a header later this week. If will update the asset upload when the headers are ready. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 22, 2013 Share Posted January 22, 2013 A big thank you 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...
xtreampb Posted January 29, 2013 Share Posted January 29, 2013 Confusion, can someone please better explain what this DLL does, and is it for C++ use of the engine? Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Pixel Perfect Posted January 29, 2013 Share Posted January 29, 2013 It's an extended version of the standard engine dll which exposes additional functionality that Josh did not include in the standard DLL but is accessible in BMax. Can be useful depending on what you are attempting to do with the API. Look at the Asset Store entry for this to get a list of the additional functionality. 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...
paramecij Posted January 29, 2013 Share Posted January 29, 2013 Thanks klepto! Much appreciated! 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.