Thread: Fixing lines in transparent models (method converted from 508)

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43
  1. #1 Fixing lines in transparent models (method converted from 508) 
    Banned

    Join Date
    Jul 2008
    Posts
    3,523
    Thanks given
    188
    Thanks received
    696
    Rep Power
    0
    I know i am not the first to do this, but i have done this all on my own. This method was converted from the 508 client.

    What this method does is fix the lines that show up in transparent models on the 317 client.

    I wont show you where to put this method so youll have to figure that out yourself.

    Code:
    	public static void method375(int[] ai, int i, int l, int i1, int j1, int k1) {
    		int j;
    		int k;
    		int l1 = 0;
    		if (aBoolean1462) {
    			if (i1 > DrawingArea.centerX)
    				i1 = DrawingArea.centerX;
    			if (l < 0) {
    				j1 -= l * l1;
    				l = 0;
    			}
    		}
    		if (l < i1) {
    			i += l;
    			j1 += l1 * l;
    			if (aBoolean1464) {
    				k = i1 - l >> 2;
    				if (k > 0)
    					l1 = (k1 - j1) * anIntArray1468[k] >> 15;
    				else
    					l1 = 0;
    				if (anInt1465 == 0) {
    					if (k > 0) {
    						do {
    							j = anIntArray1482[j1 >> 8];
    							j1 += l1;
    							ai[i++] = j;
    							ai[i++] = j;
    							ai[i++] = j;
    							ai[i++] = j;
    						} while (--k > 0);
    					}
    					k = i1 - l & 0x3;
    					if (k > 0) {
    						j = anIntArray1482[j1 >> 8];
    						do
    							ai[i++] = j;
    						while (--k > 0);
    					}
    				} else {
    					int j2 = anInt1465;
    					int l2 = 256 - anInt1465;
    					if (k > 0) {
    						do {
    							j = anIntArray1482[j1 >> 8];
    							j1 += l1;
    							j = (((j & 0xff00ff) * l2 >> 8 & 0xff00ff) + ((j & 0xff00)
    									* l2 >> 8 & 0xff00));
    							int h = ai[i];
    							ai[i++] = (j
    									+ ((h & 0xff00ff) * j2 >> 8 & 0xff00ff) + ((h & 0xff00)
    									* j2 >> 8 & 0xff00));
    							h = ai[i];
    							ai[i++] = (j
    									+ ((h & 0xff00ff) * j2 >> 8 & 0xff00ff) + ((h & 0xff00)
    									* j2 >> 8 & 0xff00));
    							h = ai[i];
    							ai[i++] = (j
    									+ ((h & 0xff00ff) * j2 >> 8 & 0xff00ff) + ((h & 0xff00)
    									* j2 >> 8 & 0xff00));
    							h = ai[i];
    							ai[i++] = (j
    									+ ((h & 0xff00ff) * j2 >> 8 & 0xff00ff) + ((h & 0xff00)
    									* j2 >> 8 & 0xff00));
    						} while (--k > 0);
    					}
    					k = i1 - l & 0x3;
    					if (k > 0) {
    						j = anIntArray1482[j1 >> 8];
    						j = (((j & 0xff00ff) * l2 >> 8 & 0xff00ff) + ((j & 0xff00)
    								* l2 >> 8 & 0xff00));
    						do {
    							int i_61_ = ai[i];
    							ai[i++] = (j
    									+ ((i_61_ & 0xff00ff) * j2 >> 8 & 0xff00ff) + ((i_61_ & 0xff00)
    									* j2 >> 8 & 0xff00));
    						} while (--k > 0);
    					}
    				}
    			} else {
    				int i2 = (k1 - j1) / (i1 - l);
    				k = i1 - l;
    				if (anInt1465 == 0) {
    					do {
    						ai[i++] = anIntArray1482[j1 >> 8];
    						j1 += i2;
    					} while (--k > 0);
    				} else {
    					int i_62_ = anInt1465;
    					int i_63_ = 256 - anInt1465;
    					do {
    						j = anIntArray1482[j1 >> 8];
    						j1 += i2;
    						j = (((j & 0xff00ff) * i_63_ >> 8 & 0xff00ff) + ((j & 0xff00)
    								* i_63_ >> 8 & 0xff00));
    						int i_64_ = ai[i];
    						ai[i++] = (j
    								+ ((i_64_ & 0xff00ff) * i_62_ >> 8 & 0xff00ff) + ((i_64_ & 0xff00)
    								* i_62_ >> 8 & 0xff00));
    					} while (--k > 0);
    				}
    			}
    		}
    	}
    Enjoy!

    your result should be this:

    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    29
    Posts
    7,987
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    Not trying to insult you here, but do you guys actually learn what these methods to that you are ripping from the new engine clients, or do you just copy and paste until it works?


    Reply With Quote  
     

  4. #3  
    Banned

    Join Date
    Jul 2008
    Posts
    3,523
    Thanks given
    188
    Thanks received
    696
    Rep Power
    0
    Quote Originally Posted by Stewie View Post
    Not trying to insult you here, but do you guys actually learn what these methods to that you are ripping from the new engine clients, or do you just copy and paste until it works?
    Well ill admit that i dont analyze the whole method so that i know what every part of it does, but i do look at the problems i initially get and compare it to the 317 one, i look at the differences and figure out what it's changing and what it deals with, from there i fix things.

    The upper half of the method deals with models on the game screen, and the lower half deals with models that are displayed on interfaces and such.
    Reply With Quote  
     

  5. Thankful user:


  6. #4  
    Banned

    Join Date
    Sep 2010
    Age
    29
    Posts
    567
    Thanks given
    147
    Thanks received
    202
    Rep Power
    0
    Worked thanks

    Before:



    After:

    Reply With Quote  
     

  7. #5  
    Banned

    Join Date
    Jul 2008
    Posts
    3,523
    Thanks given
    188
    Thanks received
    696
    Rep Power
    0
    Quote Originally Posted by k3vin View Post
    Worked thanks

    Before:

    [I MG]http://i.imgur.com/7Ym5c.png[/IMG]

    After:

    [ IMG]http://i.imgur.com/c0NiU.png[/IMG]
    Youre welcome.
    Reply With Quote  
     

  8. #6  
    Registered Member
    Nya's Avatar
    Join Date
    Jul 2009
    Posts
    2,609
    Thanks given
    11
    Thanks received
    258
    Rep Power
    1398
    Quote Originally Posted by k3vin View Post
    Worked thanks

    Before:



    After:

    no diff?
    Reply With Quote  
     

  9. #7  
    Registered Member
    Join Date
    Jun 2010
    Age
    27
    Posts
    2,528
    Thanks given
    544
    Thanks received
    584
    Rep Power
    411
    Great, now find the method that fixes textures and convert it
    Reply With Quote  
     

  10. #8  
    Registered Member
    Nando's Avatar
    Join Date
    Feb 2009
    Age
    29
    Posts
    3,517
    Thanks given
    2,439
    Thanks received
    1,108
    Rep Power
    5000
    Quote Originally Posted by Nya View Post
    no diff?
    u really cant see those lines in the ghostly lol?


    Reply With Quote  
     

  11. #9  
    #extreme

    +Deus Ex's Avatar
    Join Date
    Nov 2009
    Posts
    2,964
    Thanks given
    236
    Thanks received
    214
    Rep Power
    411
    Hmm nice release but i thibk dust rip released almost the same thing? Correct me of im wrong
    Best regards,
    +Deus Ex
    Reply With Quote  
     

  12. #10  
    Banned

    Join Date
    Jul 2008
    Posts
    3,523
    Thanks given
    188
    Thanks received
    696
    Rep Power
    0
    Quote Originally Posted by TimeShift View Post
    Hmm nice release but i thibk dust rip released almost the same thing? Correct me of im wrong
    Read the very first sentence of the topic.

    He also removed it and didnt tell anyone what he edited.

    Sadistic has also found the fix but he didnt convert the method from the 508 client, he just fixed whatever it was in the 317 method.
    Reply With Quote  
     

Page 1 of 5 123 ... LastLast

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. 474 models all converted to 317 format
    By Slay No More in forum Models
    Replies: 38
    Last Post: 01-04-2010, 05:17 PM
  2. Replies: 4
    Last Post: 03-09-2009, 09:15 AM
  3. Request : All 317 models converted to 3DS
    By peterbjornx in forum Models
    Replies: 1
    Last Post: 11-20-2008, 09:46 PM
  4. Dump all of your models with 3 lines of code
    By James in forum Tutorials
    Replies: 10
    Last Post: 05-12-2008, 03:25 AM
  5. Three New Models - Could be cool if converted.
    By Oblakastouf in forum Models
    Replies: 5
    Last Post: 04-23-2008, 10:40 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •