Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / mipmaps took my baby

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Oct 2017 01:37 Edited at: 31st Oct 2017 01:38
Well, not quite. They did skew my texture though. This is a road texture that is repeated around a path
attached is the model and texture

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 31st Oct 2017 03:25
Can you change the texture filtering on the object?

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Oct 2017 04:03
I tried SetImageMag/MinFilter() and they didnt't have any effect. Is ther another command maybe?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 31st Oct 2017 09:11
From the top of my head, theres a set generate mipmaps command? Could it be used to not generate mipmaps?
Click here for VR Legend of Zelda stuff
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Oct 2017 10:03
Yes it can but it causes the distant textures to flicker which is very distracting
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 1st Nov 2017 20:25
Quote: "They did skew my texture though. "


Quote: "Can you change the texture filtering on the object?"


Changing the texture is what I had in mind.

I would probably just use less defined graphics for the road, like dusty gravel instead of painted pavement.

It looks like your system and idea are working out, so don't let the texture stop you.

Don't sweat the petty stuff, pet the sweaty stuff.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Nov 2017 09:33
Does OpenGL have it's own native texture format, like DirectX has DDS? That way we could create our own mipmaps to prevent this issue.
Click here for VR Legend of Zelda stuff
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 2nd Nov 2017 13:24
I think, the answer is, to use a more complex road. You could use more details in the object and use smaller texture-tiles. Maybe some texture for the border and some for the road itself.

In my humble opinion, you need more vertices. Not from one side of the road to the other. But maybe a more definded border, road between borders and to the center, you need also something like a border. So that the distortion would be less.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 2nd Nov 2017 13:58
i looks like overlapping polygons with any uv coords.
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.9.3) Radeon R7 265 : Mac mini OS High Sierra (10.13)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Nov 2017 20:12
@Xaby I'm trying to keep the polys to an absolute minimum. Hopefully it will run ok on mobile devices
@markus I don't think there are any overlapping polys. You can have a look if you want. The model/texture is in the first post
In any case i'm just not going to use it (mip mapping). It will probably slow things down in the long run. I just thought TGC might want to fix it
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 2nd Nov 2017 22:49 Edited at: 2nd Nov 2017 22:50
What are you doing with the road model or the Texture ?
I tested it with my AGK-Model-Viewer and it looks fine !?

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Nov 2017 03:30
Add SetGenerateMipmaps(1) to the start of your app
I am trying to get rid of that grainy yellow in the distance (it flickers when the camera moves)
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 3rd Nov 2017 08:29
@blinkOk

absolutly low poly minimum ... why did you not use "tiles", with drawn textures, maybe for the curve other than for the roads? I understand, that you would need maybe some more textures, but you could autorender them before, and your tiles would be square planes only. The next problem with your track would be, that you can't "hide" some of your track tiles now, because it's one giant object. I can't tell you, if it would make a difference, but objects behind the camera will not drawn, but your object is allways in the view of the camera.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Nov 2017 08:34
@Xaby : Yes I think i'm headed down that track. I liked the idea of a road with one .png texture but i think i'm going to have to go with parts and put them together like a puzzle. Really turns my design up side down
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Nov 2017 10:27 Edited at: 3rd Nov 2017 10:48
Quote: "I'm trying to keep the polys to an absolute minimum. Hopefully it will run ok on mobile devices"

Don't have a solution for your flicker/mipmapping problem yet but you can optimize your road much more.
There are long straight road parts which you can change to only 2 triangles (Picture in attachment)
And your texture doesn't need to be 512x512 but 512x1 should work.
Also I think individual meshes get culled if they aren't in view space...or was it children ?
So make one huge object but separated in a few meshes.

Attachments

Login to view attachments
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 3rd Nov 2017 10:52
Quote: "You can have a look if you want."

i made some tests, i agree this mipmap do something odd at your track. @paul
AGK (Steam) V2017.09.25 : Windows 10 Pro 64 Bit : AMD (17.9.3) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 3rd Nov 2017 13:28

in theory you do a vertical super sample, so you'd render to a version of the screen that;s twice the display height, then use a shader to sample the surface down to the display outside size.. You might also push the UV's inside the texture bounds so they don't wrap,

you could try and make the mesh of 3 quads say.. So the gutters are a tall rect 10% of chunks width, the road is like 80% and the right edge is the other 10% wide. More polygons. but you should less bleeding and better edges.




PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Nov 2017 15:25 Edited at: 3rd Nov 2017 15:29
Quote: "in theory you do a vertical super sample"

nice idea
I tested it but I think AppGameKit can't render to a target that is larger than the screen resolution ?!
Made this fullscren shader to down sample the rendertarget in vertical direction to half the size
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Nov 2017 20:28 Edited at: 3rd Nov 2017 20:28
Quote: "There are long straight road parts which you can change to only 2 triangles (Picture in attachment)
And your texture doesn't need to be 512x512 but 512x1 should work."


I have since changed to a texture like this because it shows the movement better when you are traveling along straights so it can't be a column



In mapping the texture (peel UV's) it will map one image per square poly so i can't combine those polys unfortunately.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 08:22:15
Your offset time is: 2024-11-24 08:22:15