Jump to content

Portals


VeTaL
 Share

Recommended Posts

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?

Working on LeaFAQ :)

Link to comment
Share on other sites

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.

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

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.

Working on LeaFAQ :)

Link to comment
Share on other sites

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?

Working on LeaFAQ :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Working on LeaFAQ :)

Link to comment
Share on other sites

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 by DaDonik

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

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?

Working on LeaFAQ :)

Link to comment
Share on other sites

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 ;)

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

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

Working on LeaFAQ :)

Link to comment
Share on other sites

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.

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...