Author Topic: Problem with clipping  (Read 5861 times)

Nseries

  • Guest
Problem with clipping
« on: August 07, 2013, 08:52:30 AM »
Hi all, I have a problem with panels clipping. I need to clip panel, inside which have clipped panel.
-Panel - Clipping
--Table
---GameObject
----Panel - Clipping
-----Grid (Horizontal)
---GameObject
----Panel - Clipping
-----Grid (Horizontal)
Icons did not clipped. Why? ;(

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: Problem with clipping
« Reply #1 on: August 07, 2013, 10:01:38 AM »
bcoz you should use only one panel with clipping on a root object or set manually material with clipping shader inside a second panel of UIWidgets.
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

Nseries

  • Guest
Re: Problem with clipping
« Reply #2 on: August 07, 2013, 10:15:23 AM »
And what can I do with it? I really need to 2 clipping panels.

galuodo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 65
    • View Profile
Re: Problem with clipping
« Reply #3 on: August 07, 2013, 10:25:08 AM »
Be sure that the shader of your material is not some special shades.

Nseries

  • Guest
Re: Problem with clipping
« Reply #4 on: August 07, 2013, 10:41:35 AM »
I use SciFi Atlas with Transparent Colored Shader.  It is right?

galuodo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 65
    • View Profile
Re: Problem with clipping
« Reply #5 on: August 07, 2013, 11:12:01 AM »
I use SciFi Atlas with Transparent Colored Shader.  It is right?

my mistake, your problems comes from the  clipping panel has a root panel with clip
I have tried change the shader as  PoN's suggestion, but it does not work :(
« Last Edit: August 07, 2013, 11:20:39 AM by galuodo »

Nseries

  • Guest
Re: Problem with clipping
« Reply #6 on: August 07, 2013, 11:26:13 AM »
Yes, my problem comes from root panel. A have a 2 clip panels in hierarchy and the first panel (root panel) is dont want clip second panel. Root panel clipped all except for inside panel. I dont know how to force root panel clip second panel.
Thank you galuodo for try help me, and sorry for my English) Maybe somebody else know how make this clip?

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Re: Problem with clipping
« Reply #7 on: August 07, 2013, 09:57:50 PM »
When clipping Enabled on UIPanel that means  , set material with "*Clip" shader. On root panel you should to enable clipping ,but on a second panel - disable clipping and set MATERIAL (not shader) with clipping shader for UIWidgets in hierarchy of a second panel.
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Problem with clipping
« Reply #8 on: August 07, 2013, 11:55:31 PM »
I could be wrong, but it seems to me that the functionality of nested panels in ngui not provided.

Nseries

  • Guest
Re: Problem with clipping
« Reply #9 on: August 08, 2013, 04:06:53 AM »
When clipping Enabled on UIPanel that means  , set material with "*Clip" shader. On root panel you should to enable clipping ,but on a second panel - disable clipping and set MATERIAL (not shader) with clipping shader for UIWidgets in hierarchy of a second panel.
Do you tried do it? It doesn't work(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with clipping
« Reply #10 on: August 08, 2013, 09:17:51 AM »
You can't nest clipping. Each panel is only able to clip widgets directly underneath it.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Problem with clipping
« Reply #11 on: August 09, 2013, 01:31:54 PM »
You can't nest clipping. Each panel is only able to clip widgets directly underneath it.

but there is probably a way how to implement it (nested panels)?

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Problem with clipping
« Reply #12 on: August 11, 2013, 11:56:04 PM »
Aren, what constraint does not allow to add such functionality in NGUI?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with clipping
« Reply #13 on: August 12, 2013, 03:34:42 PM »
Correct. As I said, each panel can only clip widgets directly underneath it. Clipping is done by passing a matrix to a shader.