Thread: Texture Support Fix [Black triangles]

Results 1 to 3 of 3
  1. #1 Texture Support Fix [Black triangles] 
    Registered Member
    Deku's Avatar
    Join Date
    May 2016
    Posts
    151
    Thanks given
    37
    Thanks received
    121
    Rep Power
    165
    If you added the support that I released, there are 2 bugs that was found by Zion,

    -When attaching a graphics to the player model, no texture would show
    -When attaching a graphics to the player model, the black triangle as shown below, would render

    Preview:


    Code:
    	public final void method480(int intensity, int fall_off, int x, int y, int z) {
    		for (int face = 0; face < faces; face++) {
    			int a = edge_a[face];
    			int b = edge_b[face];
    			int c = edge_c[face];
    			short texture_id;
    			if(texture == null) {
    				texture_id = -1;
    			} else {
    				texture_id = texture[face];
    				/**
    				* black triangle fix in texture models
    				*/
    				if(alpha != null && color != null)
    					if(color[face] == 0) {
    						if(render_type[face] != 0) {
    							alpha[face] = 255;
    						}
    					}
    			}
    In
    Code:
    	//Players - graphics + player model
    	public Model(Model model_segments[]) {
    		int length = 2;
    Code:
    if(texture_flag) {
    	if(build.texture != null) {
    		texture[faces] = build.texture[segment_index];//change segment_index to face
    	} else 
    		texture[faces] = -1;
    	}
    if(coordinate_flag) {
    	if(build.texture_coordinates != null && build.texture_coordinates[segment_index] != -1) //change segment_index to face
    		texture_coordinates[faces] = (byte) (build.texture_coordinates[segment_index] + texture_faces);//change segment_index to face
    	else 
    		texture_coordinates[faces] = -1;
    						
    }
    Should be it, I've noticed no errors but if any occur please contact me so I can solve it.
    (As far as I'm aware that black triangle on models is due to how they are dumped? Not to sure yet though but force dumping seems to corrupt a lot)
    wut
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    Join Date
    Apr 2017
    Posts
    30
    Thanks given
    7
    Thanks received
    0
    Rep Power
    11
    or you could use metasqua and remove the black triangle
    Reply With Quote  
     

  4. #3  
    Registered Member
    Deku's Avatar
    Join Date
    May 2016
    Posts
    151
    Thanks given
    37
    Thanks received
    121
    Rep Power
    165
    Quote Originally Posted by D E T H View Post
    or you could use metasqua and remove the black triangle
    If you know how to retain the texture mapping when exporting from meta then by all means go for it, otherwise all that will do is brick the model
    wut
    Reply With Quote  
     


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. fix black triangle and invizible midle of walls
    By Romania Clan in forum Buying
    Replies: 1
    Last Post: 09-12-2013, 05:34 PM
  2. Replies: 33
    Last Post: 03-15-2013, 09:18 PM
  3. Black triangle fix
    By Dust R I P in forum Help
    Replies: 7
    Last Post: 05-20-2012, 12:45 AM
  4. Buying Black Triangles fix
    By BasedWorld in forum Buying
    Replies: 15
    Last Post: 05-18-2012, 11:32 AM
  5. [PI] Black triangles fix
    By Xseil in forum Help
    Replies: 6
    Last Post: 10-28-2011, 03:22 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
  •