blurred entity
Blitz3D Forums/Blitz3D Programming/blurred entity| 
 | ||
| When I'm displaying my entity it appears clearly when the camera is directly pointed towards it, but it is blurred when it is displayed sideways from it. Please help me solve this problem? Here is code you can look at to solve this problem 
Dim a(10, 10)
Dim b(10, 10)
Dim Cells(101)
Global cell                 ; main graphic model/mesh
Global cam                  ; the camera
Global Texture              ; texture for the main graphic
Global SWidth = 1024
Global SHeight = 768
; so far the main functions in the game
StartUp
LoadGraphics
Game
end
Function StartUp()
	
	Graphics3d 1024, 768, 32
	SetBuffer backbuffer()
	cam = createcamera()
	light = createlight()
End Function
Function LoadGraphics()
	
	cell = LoadMesh("C:\Documents and Settings\HP_Administrator\My Documents\workspace\life\media\cell.b3d")
	Texture = LoadTexture("C:\Documents and Settings\HP_Administrator\My Documents\workspace\life\media\marble3_bw.tga")
	HideEntity cell
	URF() 
End Function
Function Game()
	; copy the mesh that we loaded in LoadGraphics into the Cells array so
	; that we can have 100 copies of the same mesh
	
	For x = 1 to 100
		Cells(x) = CopyEntity(cell)
	Next
	;HideEntity cell
	;URF()	
	
	PositionEntity cam, 0, 0, -20
	
	; this is a test function to display the meshes in a grid 10 x 10
	For x = 1 to 10
		For y = 1 to 10 
			f = ((10 * (x - 1)) + y)  ;  convert x,y 1 - 11 to array 1 - 100
			PlaceMesh(Cells(f), x, y)
			URF()
				
			Debugcon("f = " + str(f), "x = " + str(x), "y = " + str(y))
			Flip
			WaitKey()
		Next
	Next
	
	WaitKey()
	
End Function
Function URF()
	
	UpdateWorld
	RenderWorld
	
End Function
Function Evaluate()
	Dim a(10, 10)
	Dim b(10, 10)
	For x = 2 to 9
		For y = 0 to 9
			c = 0
			if a(x - 1,y - 1) = 1 then c = c + 1
			if a(x - 1, y) = 1 then c = c + 1
			if a(x - 1, y + 1)= 1 then c = c + 1
			if a(x, y - 1) = 1 then c = c + 1
			if a(x, y + 1) = 1 then c = c + 1
			if a(x + 1, y - 1) = 1 then c = c + 1
			if a(x + 1, y) = 1 then c = c + 1
			if a(x + 1, y + 1) = 1 then c = c + 1
			if a(x, y) = 1 and (c <> 3 and c <> 2) then b(x, y) = 0
			if a(x, y) = 0 and c = 3 then b(x, y) = 1
		Next 
	Next  
End Function
Function PlaceMesh(mesh, x, y)
	 PositionEntity mesh, (x * 3) - 20, 11 - (y * 2), 0
End Function
Function Debugcon(Msg1$, Msg2$ = "empty", Msg3$ = "empty too")
	viewport 800, 500, 200, 200
	ClsColor 0, 0, 255
	Cls
	Text 800, 500, Msg1$
	Text 800, 530, Msg2$
	Text 800, 560, Msg3$
	viewport 0, 0, SWidth, SHeight	 
End Function
 | 
| 
 | ||
| Please post a screenshot of what you're getting. | 
| 
 | ||
| Having trouble copying (CTRL-C) and pasting (CTRL-V) image. I see the links in the forum codes section, but I have no website to upload the image to. | 
| 
 | ||
| Use the SaveBuffer command to save a screenshot. You can convert the screenshot from a BMP file to a web friendly format (JPG or PNG) using Irfanview: http://www.irfanview.com/ You can upload the image to: http://imgur.com/ | 
| 
 | ||
| How would you know which image is mine? | 
| 
 | ||
| Iirc, you can't solve it.  Blitz3d's mipmapping is the cause and it's either off, or blurred to the bowels of bloody hell. You can try ClearTextureFilters() before loading any models but I dunno if it's going to look much better. | 
| 
 | ||
|  Having trouble copying (CTRL-C) and pasting (CTRL-V) image. I see the links in the forum codes section, but I have no website to upload the image to. - Make your app run in Windowed mode. - Take a screenshot (use the Print Screen button). - Go to MS-Paint and paste your image. Save as JPG, PNG or TIFF. - Upload it to http://www.tinypic.com - Use the "direct link" provided by TinyPic with the [img www] forum tag. | 
| 
 | ||
| Ok, here's the link.  As you can see the entities at the left and right edges are blurred while as you get closer to the middle, they are good.   Last edited 2012 | 
| 
 | ||
| Not sure what you mean by 'blurred' exactly. This is a scene in 3D space so you are seeing the ones in the middle front-on while the ones further from the middle are slightly side-on. If you want to view them all as though they were front-on then try experimenting with the 'orthographic projection' mode of the 'CameraProjMode' command, although I'm not sure if it will give you the result you want. Using 2D images may be better. It really depends on what you are trying to achieve. You could also experiment with changing the field of view via the CameraZoom command. The default Blitz3D field of view value of 1.0 tends to produce a fishbowl effect. For 4:3 aspect ratio monitors a camera zoom setting of 1.6 produces a better result. Widescreen screen resolutions may require a different value, so you should provide a way for the user to change the CameraZoom setting to tweak it to suit their monitor setup and personal preferences. Last edited 2012 | 
| 
 | ||
| It's the way perspective works. There's no direct 'cure' for this, but you can attenuate the effect by using a slightly smaller FOV (= bigger zoom). Blitz3D's cameras start with a 90º degree FOV. That's a zoom factor of 1.0. - Without compromising peripheral vision too much, using a zoom factor between 1.0 ~ 1.6 should look nicer (you need to test this value range to find the best match for your scene). - You can also work with angles. Any angle between 64º and 90º should be good (with 90º taking you back to Blitz3D's default). To use angles you'll need this conversion function: http://blitzbasic.com/codearcs/codearcs.php?code=676 This problem doesn't happen with Blitz3D alone. Read this for more info: http://www.codinghorror.com/blog/2007/08/widescreen-and-fov.html | 
| 
 | ||
| Thanks guys! |