VeTaL Posted September 22, 2010 Share Posted September 22, 2010 I have a question about indoors and portals: i remember, there were a post from Josh with "tunnel" level, there were something about portals. So, it "portaling" works by default, or i must enable it? I mean, if i have a labyrinth from separate models like this = \ || || \====/ would the invisible portals be culled by default? Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 23, 2010 Share Posted September 23, 2010 Hi Vetal, Sorry but I do not entirely understand what you are asking. With 'portals' you mean doorways like in the game "Portal" by Valve? Quote Link to comment Share on other sites More sharing options...
DaDonik Posted September 23, 2010 Share Posted September 23, 2010 AFAIK the only things which get culled by default are animated models. Besides that, everything which is not in your field of view is also culled. To answer you question: Your portals will not be culled by default when they are in front of you. Also not if they are behind several walls. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
VeTaL Posted September 23, 2010 Author Share Posted September 23, 2010 Sorry but I do not entirely understand what you are asking. With 'portals' you mean doorways like in the game "Portal" by Valve? No, its just indoor optimization: indoor level consists of portals and engine calculate, which portals are visible, and which are not visible and cull them. AFAIK the only things which get culled by default are animated models. Yes, occlusion culling works only with expensive models. I'm asking about another culling... and i'm really disappointed if LE dont use portals, because i saw something about them in blog, but cant find it now. http://www.gamerendering.com/category/optimizations/culling-optimizations/ Very nice article about different types of culling. Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 23, 2010 Share Posted September 23, 2010 besides cullfacing, you can also define groups for certain models. There used to be an article on the wiki about this, but I can't find atm. Quote Link to comment Share on other sites More sharing options...
VeTaL Posted September 23, 2010 Author Share Posted September 23, 2010 Aha, i found it Damned, this is one of the oldest blog notes: http://leadwerks.blogspot.com/2008/10/here-we-see-how-scene-can-be-divided-up.html I'd be very disappointed, if the feature from 2008 year is not implemented yet Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 23, 2010 Share Posted September 23, 2010 That is exactly the one I meant! This works though. I am sure that I have seen this topic on the wiki. Quote Link to comment Share on other sites More sharing options...
VeTaL Posted September 23, 2010 Author Share Posted September 23, 2010 I am sure that I have seen this topic on the wiki. I was sure that i saw this in nearest blog, so i watched through all Leadwerks blog Okay, lets return to topic. 1) How can i make groups of objects dynamically, in code? 2) Is "linking" in Editor is this grouping? So i need to link all 1000 objects (like table, doors and so on) to the tunnel? Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 23, 2010 Share Posted September 23, 2010 I believe the commands were very easy like SetGroup(entity, groupID) A good idea would be to make a topic about Level groups. I am 100 convinced that this once worked because I used it to test level loading. Linking is deffinetly not the same although you could use it for grouping. But that wouldn't be smart to do at all. Think of all those links in your scene omg. With linking you can send messages to one another or you can get the target that an object is linked to. Quote Link to comment Share on other sites More sharing options...
VeTaL Posted September 23, 2010 Author Share Posted September 23, 2010 Well, thanks, i'll try to make the same tunnels level, as on that Josh's picture and test SetGroup (just want to know that for sure ), it must take not more than 5 minutes. With linking you can send messages to one another or you can get the target that an object is linked to. Can you add some details about this? i did find nothing about linking in tutorials. Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
DaDonik Posted September 23, 2010 Share Posted September 23, 2010 (edited) Don't forget: TGroup CreateGroup(TGroup parent=NULL); Might come in handy Never messed around with groups myself... Edit: To group models together at runtime, i would add another property to the lua file and set the group in the editor via this property. You can then easily loop over each model and group them together accordingly. Edited September 23, 2010 by DaDonik Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
VeTaL Posted September 23, 2010 Author Share Posted September 23, 2010 To group models together at runtime, i would add another property to the lua file and set the group in the editor via this property. You can then easily loop over each model and group them together accordingly. Had the same idea Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
VeTaL Posted September 23, 2010 Author Share Posted September 23, 2010 Hm, there is about Groups on the Wiki: http://www.leadwerks.com/wiki/index.php?title=Category:Groups But there isnt link about Groups on the main page. Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 23, 2010 Share Posted September 23, 2010 kinda odd. You would think this is a function that many people could use don't you think? Quote Link to comment Share on other sites More sharing options...
VeTaL Posted September 23, 2010 Author Share Posted September 23, 2010 I just think that this may be published somewhere Okay, then some another questions: How can we calculate visibility? By the group parent? For example, i have a house with tables inside... when i group tables with house, how may i say to engine that we may check visibility of house? Or it automatically checks for summary Bounding Box? Other question about LODs, as i would change house LOD, what would happen with tables? Would physical shape of LOD change, or it stays as from original model? Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
macklebee Posted September 24, 2010 Share Posted September 24, 2010 Hm, there is about Groups on the Wiki: http://www.leadwerks.com/wiki/index.php?title=Category:Groups But there isnt link about Groups on the main page. kinda odd. You would think this is a function that many people could use don't you think? Groups were removed several months ago when Josh rewrote the vegetation layering i believe... http://leadwerks.com/werkspace/index.php?/topic/1354-project-werkflow/page__view__findpost__p__12728 if you try the script I posted in that link, it no longer works... it doesn't cause an error, but instead doesn't do anything... So unless Josh has some other method that would enable you to group entities, I don't think its possible anymore with LE commands... i guess you could always just add the entities to a table/array, then perform whatever against that table/array Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
VeTaL Posted September 24, 2010 Author Share Posted September 24, 2010 Thats not good... so, we may wait for octree... On the other hand, there is http://www.leadwerks.com/wiki/index.php?title=EntityCulled so, if i would be able to add all things that are "inside the house" and check them if they visible... Another variant is really to gather them into one list and if player far enough - make them all invisible... but i dont like this solution Quote Working on LeaFAQ Link to comment Share on other sites More sharing options...
DaDonik Posted September 24, 2010 Share Posted September 24, 2010 In case your levels are buildt very linear, you can place invisible triggers around your scene and show/hide your models when the player comes across a trigger. That would be the fastest way i can think of, because you don't need to loop over all models and check their distance to the player and such. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
VeTaL Posted September 24, 2010 Author Share Posted September 24, 2010 Yes, also i think of LOD usage with simplest last LOD... looking like its the faster solution for now, if it wouldnt fast enough, i'll use triggers... But it would be better to use build-in octree or even grouping. Quote Working on LeaFAQ 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.