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 / No antialiasing on 3d objects?

Author
Message
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 22nd Mar 2015 12:26
Loading a obj file in AGK2 results in a very jagged render. Is this normal? Are there commands to antialias a 3D object in AppGameKit?

Harlequin
14
Years of Service
User Offline
Joined: 22nd Mar 2010
Location: Melbourne (AU)
Posted: 23rd Mar 2015 01:59
Hi Polaraul,

no there are no commands to AA an object, problem may be in either your object or the texture.

If you load up a screenshot or your object and texture for it to the forums somebody could look at it.

cheers

It's late, I'm tired, out of coffee and now I'm wet.
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 23rd Mar 2015 03:12
Thank you for the reply Harlequin.



The textures appear to be okay, and the model behaves fine in other rendering packages. In AppGameKit though I have these jagged edges!

Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 23rd Mar 2015 03:22
And here are the project files.

Attachments

Login to view attachments
Harlequin
14
Years of Service
User Offline
Joined: 22nd Mar 2010
Location: Melbourne (AU)
Posted: 23rd Mar 2015 04:09
Hi Polaraul,

when I look at the 6_packed0_diffuse.png file, I noticed the edges are very Jaggered, so I think this is where your problem is. other applications might have AA or smoothing features that mask this, while AppGameKit does not.


cheers

It's late, I'm tired, out of coffee and now I'm wet.

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Mar 2015 08:44
AGK does not have AA out of the box, it's not the texture it's any model. It will be possible to apply anti-aliasing through using shaders but I don't have a shader example for this and as yet I think nobody has posted one here.

Using AppGameKit V2 Tier 1
TDavid
11
Years of Service
User Offline
Joined: 7th Feb 2013
Location:
Posted: 23rd Mar 2015 09:10
The only way you have to reduce jagginess is to increase the resolution. I don't know for which plateform you're developing but AA is very demanding hardware-wise and I don't think any smartphone/tablet can cope with it.

Using shaders would be a decent compromise if the resolution is low. I don't think anyone would need AA on a full HD 6" device anyway.
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 23rd Mar 2015 10:10
Thanks for everyone's help and for taking a look. I was developing for the PC initially, but I am think this is yet another project that is not suited for AGK.

@baxlash A shader is what I was thinking too. Perhaps something along the lines of FXAA. I am not sure though whether it is worth the time to write this, or just cut my loses and start the project in Unity.

@TDavid I have done tests at various resolutions, and all produce jagged edges, even with models with a high polygon count I'm afraid.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 23rd Mar 2015 10:20
maybe the backbuffer useing a lower resolution.
the screenshot looks up scaled.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 23rd Mar 2015 10:48
@Markus Hi Markus. I thought that too. I used SetResolutionMode(1) and it did nothing I'm afraid.

unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 23rd Mar 2015 22:23
Many video cards can force AA in their settings...

Using AppGameKit v2 T1 + T2
Systems: Primary: Mac OS X 10.10
Secondary: Windows 7
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Mar 2015 01:06
i test your example.
i think the lightning looks wrong. maybe the surface normals.
also i think CreateLightDirectional need a unit vector (with length 1) not
1,1,1 at all x,y,z.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 24th Mar 2015 01:45
Hi Markus. The light was just an after thought and not really essential to the project. With or without the light, the model is still very much jagged.

Your help is appreciated though and thank you for taking a look. I guess I just needed to know that this was an AppGameKit thing again and not something I was doing wrong.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Mar 2015 12:30
i will try at home how it looks in shade 3d modeller.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 24th Mar 2015 18:50
@Markus Many thanks for all your help. I have just played around with the same model in CopperCube with antialiasing switched on for the Windows EXE target and it looks fine with no edges.

I just think that unless I write an FXAA shader, then AGK2 is not up to the job when it comes to rendering 3d objects.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Mar 2015 20:12
yes, with 2x2 antialiasing it looks better.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-04-23 09:09:08
Your offset time is: 2024-04-23 09:09:08