Thread: Fixing Black on NPCs

Results 1 to 10 of 10
  1. #1 Fixing Black on NPCs 
    Banned
    Join Date
    Apr 2012
    Posts
    479
    Thanks given
    36
    Thanks received
    72
    Rep Power
    0
    when you add new npcs, the black parts of npcs turn transparent

    only server i've seen with this fixed is grinderscape when i was trying to fix this, after a bunch of messing around i made this and it worked (made this few months back)

    just put this in entityDef with your custom npc loading

    Code:
    		if (entityDef.modifiedModelColors != null) {
    			for (int i2 = 0; i2 < entityDef.modifiedModelColors.length; i2++) {
    				if (entityDef.modifiedModelColors[i2] == 0) {
    					entityDef.modifiedModelColors[i2] = 1;
    				}
    			}
    		}
     

  2. #2  
    Registered Member
    Join Date
    Oct 2010
    Posts
    270
    Thanks given
    44
    Thanks received
    13
    Rep Power
    23
    Doesn't work.
     

  3. #3  
    Banned
    Join Date
    Apr 2012
    Posts
    479
    Thanks given
    36
    Thanks received
    72
    Rep Power
    0
    Quote Originally Posted by Fridder View Post
    Doesn't work.
    then you're not putting it in the right spot
     

  4. #4  
    Registered Member

    Join Date
    Jun 2012
    Posts
    204
    Thanks given
    61
    Thanks received
    77
    Rep Power
    104
    As far as I know, the reason this issue exists is because of the earlier models such
    as godswords and torsos which rendered a black triangle for some reason.

    (This can be found in the model class, method479)

    Code:
    for (int i2 = 0; i2 < numberOfTriangleFaces; i2++) {
           if (face_color != null && face_alpha != null) {//Triangle fix
               ///if (face_color[face] == 65535 
                     || face_color[face] == 16705 || face_color[face] == 0)
                     //face_alpha[face] = 255;
           }
     

  5. Thankful user:


  6. #5  
    Registered Member
    Join Date
    Oct 2010
    Posts
    270
    Thanks given
    44
    Thanks received
    13
    Rep Power
    23
    Quote Originally Posted by OnCue View Post
    As far as I know, the reason this issue exists is because of the earlier models such
    as godswords and torsos which rendered a black triangle for some reason.

    (This can be found in the model class, method479)

    Code:
    for (int i2 = 0; i2 < numberOfTriangleFaces; i2++) {
           if (face_color != null && face_alpha != null) {//Triangle fix
               ///if (face_color[face] == 65535 
                     || face_color[face] == 16705 || face_color[face] == 0)
                     //face_alpha[face] = 255;
           }
    Thank you, that fixed it.







    Before:


     

  7. #6  
    Registered Member
    3lv3n snip3r's Avatar
    Join Date
    Jan 2011
    Posts
    916
    Thanks given
    48
    Thanks received
    114
    Rep Power
    84
    Quote Originally Posted by OnCue View Post
    As far as I know, the reason this issue exists is because of the earlier models such
    as godswords and torsos which rendered a black triangle for some reason.

    (This can be found in the model class, method479)

    Code:
    for (int i2 = 0; i2 < numberOfTriangleFaces; i2++) {
           if (face_color != null && face_alpha != null) {//Triangle fix
               ///if (face_color[face] == 65535 
                     || face_color[face] == 16705 || face_color[face] == 0)
                     //face_alpha[face] = 255;
           }
    This causes triangles on items like skillcapes though.
    Spoiler for RuneScape:

    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
     

  8. #7  
    Registered Member

    Join Date
    Jun 2012
    Posts
    204
    Thanks given
    61
    Thanks received
    77
    Rep Power
    104
    Quote Originally Posted by 3lv3n snip3r View Post
    This causes triangles on items like skillcapes though.
    I kind of stated that already,
    As far as I know, the reason this issue exists is because of the earlier models such
    as godswords and torsos which rendered a black triangle for some reason.
    Solution: Use a later revision model, from what I believe it's because it's a 500- model?
     

  9. #8  
    Extreme Donator


    Join Date
    Nov 2009
    Posts
    1,427
    Thanks given
    559
    Thanks received
    266
    Rep Power
    236
    I think <= 602 is fine with that, 633 + it screws up.
     

  10. #9  
    Registered Member
    Join Date
    Oct 2010
    Posts
    270
    Thanks given
    44
    Thanks received
    13
    Rep Power
    23
    Quote Originally Posted by 3lv3n snip3r View Post
    This causes triangles on items like skillcapes though.



    Where?
     

  11. #10  
    Registered Member
    3lv3n snip3r's Avatar
    Join Date
    Jan 2011
    Posts
    916
    Thanks given
    48
    Thanks received
    114
    Rep Power
    84
    Quote Originally Posted by Fridder View Post



    Where?
    Spoiler for RuneScape:

    [Only registered and activated users can see links. ][Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Invisible black color on NPCs
    By Fridder in forum Help
    Replies: 2
    Last Post: 02-25-2013, 05:16 AM
  2. [PI] Fixing Pitch Black Models
    By Turbo X Repz in forum Snippets
    Replies: 6
    Last Post: 01-10-2013, 03:32 AM
  3. Fixing Black minimap
    By Pb600 in forum Snippets
    Replies: 9
    Last Post: 08-05-2011, 09:28 PM
  4. [cheaphax]Fixing black water for 508 maps
    By Mr Reece in forum Snippets
    Replies: 22
    Last Post: 06-25-2011, 05:30 AM
  5. Fixing Npcs
    By Bulby Strife in forum Tutorials
    Replies: 21
    Last Post: 12-03-2008, 05:58 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •