Posted By: alibaba
Prevent views from rendering specified entites - 05/05/16 17:09
NOFLAG1 and NOCAST aren't enought. I need something like c_ignore but for views. Is there anything like that? If no, do you know any workaround?
It will be used for a splitscreen game.
Thanks in advance!
Posted By: Ch40zzC0d3r
Re: Prevent views from rendering specified entites - 05/05/16 17:11
view.genius is perfect for your needs.
All child entities (entity.parent = view.genius) will be ingored
Posted By: alibaba
Re: Prevent views from rendering specified entites - 05/05/16 17:22
So I need to do a chain of entites linked to each other by .parent?
That's really inconvenient.
But thanks for the input!
Posted By: Ch40zzC0d3r
Re: Prevent views from rendering specified entites - 05/05/16 17:29
You link all entities .parent to that one entity which is the camera.genius
I made a temp entity which follows the camera for this purpose only
Posted By: alibaba
Re: Prevent views from rendering specified entites - 05/05/16 17:31
Okay I'll try this. But one more question: This method seems like preventing the rendering only for one view. What if I have 4 views and the entity should only be rendered on one view? It's world model so view_entities are no possibiliy.
Posted By: Superku
Re: Prevent views from rendering specified entites - 05/05/16 17:53
Use Material events with the render_view pointer!
Posted By: alibaba
Re: Prevent views from rendering specified entites - 05/05/16 18:22
That sounds reasonable! Thanks, I'll try that out!
Posted By: Ch40zzC0d3r
Re: Prevent views from rendering specified entites - 05/05/16 18:26
That will work as long as you dont set a dif material as far as I remember.
Thats why I used my method
Posted By: alibaba
Re: Prevent views from rendering specified entites - 05/05/16 20:01
Can I accomplish the example I've written before with your method? If yes can you direct me to the right direction? In the meanwhile I'll play around with superkus idea.
Posted By: alibaba
Re: Prevent views from rendering specified entites - 05/06/16 08:11
Wow, render_view together with ENABLE_TREE works like a charm!
Ch40zzC0d3r: I'd like to try out your method, too! If you could explain a bit further how it works on many views, I'd be more than happy
Now let's see if I can combine Superku's method with existing shaders.
Posted By: Superku
Re: Prevent views from rendering specified entites - 05/06/16 15:10
Yes, those view events have always worked fine for me (sometimes I get confused with the events/ flags though).
Using this method with existing shaders is easy, too. You only have to set the "mtl" pointer in the event functon to the preferred shader in question.