Jump to content

SetDetail Textures?


Yue
 Share

Recommended Posts

3 hours ago, Marcousik said:

Just use Texture:GetDetail() to get the answer ;)

Texture:GetDetail() only return number 1.

The thing is that if I set values from 0 to 10, the texture degrades in quality. I don't understand GetDetail. 
image.thumb.png.33792263e0d725393895e4fcc8cfafea.png
 

 

 

 

Link to comment
Share on other sites

Ok, it seems that the GetDetail returns true in case mipmaps can be used, and the corresponding value is for the mipmaps that are generated in the texture for the level of detail in the distance.
image.png.0ac4dedbb21d946973e64c2dfe9fbaca.png

Mipmas Level 11

image.thumb.png.b40fa6e406af6aaf7a8655a48df764ee.png

 

Mipmap level 0

image.thumb.png.d5032e4c6fd14e0a845e531948de30ee.png
 

  • Confused 1

 

 

Link to comment
Share on other sites

		function this:Update()

			d = self.group1.cTextures:GetSelectedItem()

				if d == 0 then 
					d = 5
			
				elseif d == 1 then 
					dT = 2
				elseif d ==2 then 
					d = 0
				end
		
			Texture:SetDetail(tonumber(d))
			World:GetCurrent():SetLightQuality(tonumber(self.group1.cShadows:GetSelectedItem()))
		end

 

I think the non-existent documentation causes us tremendous headaches :, I have this to update the quality of the textures.

 

 

Edit : 

Quality Low

image.thumb.png.74d70cf4a9c57a052ee72c4a4e08fba4.png

Quality High

image.thumb.png.52e6ceaa9104ab48ddd66eb2d24d39ef.png

 

I have tested with an animated model my code, and it seems to work as it should with mipmaps to set the quality of the textures.

  • Like 1

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...