Thread: Fog is not Rendering Properly on Textured Objects

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Fog is not Rendering Properly on Textured Objects 
    Registered Member
    Join Date
    Jun 2012
    Posts
    221
    Thanks given
    30
    Thanks received
    32
    Rep Power
    54
    The title should explain it all. Here are some examples:





    As you can see in this last picture, the texture of the roof is unaffected, as are seemingly all roofs, water and so on.




    I'm not sure how to go about this. All help is appreciated, thanks in advance.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Nov 2014
    Posts
    124
    Thanks given
    1
    Thanks received
    32
    Rep Power
    80
    upload your scene, model & rasterizer class
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    May 2011
    Posts
    1,785
    Thanks given
    854
    Thanks received
    853
    Rep Power
    0
    Seems your not setting the perspective Z value everywhere in your Model class such as in method443 (or whatever the method is called the one that implements Animable)
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2012
    Posts
    221
    Thanks given
    30
    Thanks received
    32
    Rep Power
    54
    Quote Originally Posted by Poesy700 View Post
    Seems your not setting the perspective Z value everywhere in your Model class such as in method443 (or whatever the method is called the one that implements Animable)
    I poked around a bit and couldn't tell much myself. It seems that the objects look fine when facing dead-on, they just get obliterated when you see them otherwise.
    Here's my current 443:

    Code:
        	public final void method443(int i, int j, int k, int l, int i1, int j1,
        			int k1, int l1, int i2) {
        		int j2 = l1 * i1 - j1 * l >> 16;
        			int k2 = k1 * j + j2 * k >> 16;
        			int l2 = anInt1650 * k >> 16;
        							int i3 = k2 + l2;
        							if (i3 <= 50 || k2 >= 3500)
        								return;
        							int j3 = l1 * l + j1 * i1 >> 16;
        				int k3 = j3 - anInt1650 << 10;
        				if (k3 / i3 >= DrawingArea.centerY)
        					return;
        				int l3 = j3 + anInt1650 << 10;
        				if (l3 / i3 <= -DrawingArea.centerY)
        					return;
        				int i4 = k1 * k - j2 * j >> 16;
        				int j4 = anInt1650 * j >> 16;
        				int k4 = i4 + j4 << 10;
        				if (k4 / i3 <= -DrawingArea.anInt1387)
        					return;
        				int l4 = j4 + (super.modelHeight * k >> 16);
        				int i5 = i4 - l4 << 10;
        				if (i5 / i3 >= DrawingArea.anInt1387)
        					return;
        				int j5 = l2 + (super.modelHeight * j >> 16);
        				boolean flag = false;
        				if (k2 - j5 <= 50)
        					flag = true;
        				boolean flag1 = false;
        				if (i2 > 0 && aBoolean1684) {
        					int k5 = k2 - l2;
        					if (k5 <= 50)
        						k5 = 50;
        					if (j3 > 0) {
        						k3 /= i3;
        						l3 /= k5;
        					} else {
        						l3 /= i3;
        						k3 /= k5;
        					}
        					if (i4 > 0) {
        						i5 /= i3;
        						k4 /= k5;
        					} else {
        						k4 /= i3;
        						i5 /= k5;
        					}
        					int i6 = anInt1685 - Rasterizer.centerX;
        					int k6 = anInt1686 - Rasterizer.centerY;
        					if (i6 > k3 && i6 < l3 && k6 > i5 && k6 < k4)
        						if (aBoolean1659)
        							anIntArray1688[anInt1687++] = i2;
        						else
        							flag1 = true;
        				}
        				int l5 = Rasterizer.centerX;
        				int j6 = Rasterizer.centerY;
        				int l6 = 0;
        				int i7 = 0;
        				if (i != 0) {
        					l6 = modelIntArray1[i];
        					i7 = modelIntArray2[i];
        				}
        				for (int j7 = 0; j7 < anInt1626; j7++) {
        					int k7 = anIntArray1627[j7];
        					int l7 = anIntArray1628[j7];
        					int i8 = anIntArray1629[j7];
        					if (i != 0) {
        						int j8 = i8 * l6 + k7 * i7 >> 16;
        				i8 = i8 * i7 - k7 * l6 >> 16;
        							k7 = j8;
        					}
        					k7 += j1;
        					l7 += k1;
        					i8 += l1;
        					int k8 = i8 * l + k7 * i1 >> 16;
        				i8 = i8 * i1 - k7 * l >> 16;
        		k7 = k8;
        		k8 = l7 * k - i8 * j >> 16;
        		i8 = l7 * j + i8 * k >> 16;
        		l7 = k8;
        		anIntArray1667[j7] = i8 - k2;
        		vertexPerspectiveZB[j7] = i8;
        		if (i8 >= 50) {
        			anIntArray1665[j7] = l5 + (k7 << 10) / i8;
        			anIntArray1666[j7] = j6 + (l7 << 10) / i8;
        		} else {
        			anIntArray1665[j7] = -5000;
        			flag = true;
        		}
        		if (flag || anInt1642 > 0) {
        			anIntArray1668[j7] = k7;
        			anIntArray1669[j7] = l7;
        			anIntArray1670[j7] = i8;
        		}
        				}
    
        				try {
        					method483(flag, flag1, i2);
        					return;
        				} catch (Exception _ex) {
        					return;
        				}
        	}
    I've tried swapping the ints around and out for others several times.



    Quote Originally Posted by Eternal View Post
    upload your scene, model & rasterizer class


    Here is my Drawingarea:
    [Only registered and activated users can see links. ]
    and Rasterizer:
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Nov 2014
    Posts
    124
    Thanks given
    1
    Thanks received
    32
    Rep Power
    80
    Not DrawingArea, i meant the WorldController
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2012
    Posts
    221
    Thanks given
    30
    Thanks received
    32
    Rep Power
    54
    Quote Originally Posted by Eternal View Post
    Not DrawingArea, i meant the WorldController
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Feb 2009
    Age
    24
    Posts
    2,851
    Thanks given
    90
    Thanks received
    216
    Discord
    View profile
    Rep Power
    675
    Why not use a renamed client? You'd be less likely to run into issues like this.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jun 2012
    Posts
    221
    Thanks given
    30
    Thanks received
    32
    Rep Power
    54
    Quote Originally Posted by Ambokile View Post
    Why not use a renamed client? You'd be less likely to run into issues like this.
    Mostly because I'm working with a client that I like in general. This has been the only issue I've run into so far.
    Reply With Quote  
     

  9. #9  
    Registered Member

    Join Date
    Feb 2009
    Age
    24
    Posts
    2,851
    Thanks given
    90
    Thanks received
    216
    Discord
    View profile
    Rep Power
    675
    Quote Originally Posted by Juuichi View Post
    Mostly because I'm working with a client that I like in general. This has been the only issue I've run into so far.
    Then I recommend that you go through your client manually and rename everything so that it is workable. Is it any wonder you run into issues when everything has an obfuscated name?
    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Nov 2014
    Posts
    124
    Thanks given
    1
    Thanks received
    32
    Rep Power
    80
    Show your whole model class
    Reply With Quote  
     

Page 1 of 2 12 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. Replies: 4
    Last Post: 12-15-2011, 10:25 AM
  2. Replies: 61
    Last Post: 11-19-2009, 12:43 AM
  3. Sendmail function is not working on this forum
    By Dj Java in forum Complaints
    Replies: 10
    Last Post: 11-08-2009, 03:40 AM
  4. Walking on a object not trough
    By supra s in forum Help
    Replies: 6
    Last Post: 02-27-2009, 01:53 AM
  5. my music on client is not looping?
    By Gluon in forum Help
    Replies: 0
    Last Post: 01-23-2009, 11:52 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
  •