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.

DarkBASIC Professional Discussion / Smoothing Edges in DBPro

Author
Message
KingL
16
Years of Service
User Offline
Joined: 27th Jun 2010
Location:
Posted: 27th Jun 2010 14:07
Hi guys,

I just started working with DBPro so bear with these simple questions- I was wondering how to smooth the edges of a 3D model when a program is run? Basically i want to preview one one my 3d models in a game environment. I have managed to get all the objects loaded etc but cant get the nasty jagged line around the straight edges of models to disapear. One other thing is that textures seem to be slightly blured.

Any help on these two issues would be greatly appreciated
Conor B
21
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 27th Jun 2010 17:03
Put anti-aliasing into the search button. Only prob is that in the current release you cannot use anti-aliasing and sprites. Think they might have fixed it in the 7.5 Beta.

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 27th Jun 2010 17:13
It sounds like you have the resolution set too low. Make sure you set the resolution to the values returned by 'desktop width()' and 'desktop height()' for best results.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Jun 2010 22:20
Quote: "One other thing is that textures seem to be slightly blured."

I use the Anisotropic filtering dll by @kaedroho for this it works really well and has little to no impact on FPS!

Link:
http://forum.thegamecreators.com/?m=forum_view&t=159383&b=5

Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 27th Jun 2010 23:22
would you please post a screen shot, so we can see what kind of jagged edge's were talking about?

Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 28th Jun 2010 01:16
I think he's talking about aliasing.

If it hasn't exploded yet, I haven't touched it.
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 29th Jun 2010 15:33
in that case, I think the set display mode command has an optional flag to turn it on, but when aa is turned on you can't use sprites or get/paste image...


IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Jun 2010 23:15
You can't use GET IMAGE, that's true. Sprites prior to the latest 7.5 release would disable anti-aliasing, but I fixed that for this release.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Jun 2010 12:31
Quote: "You can't use GET IMAGE, that's true"

Darn, then I won't be using it in EnviroSCOPE after all...

I was hoping to improve the edge drawing but I need "get image" to make the skybox textures as using "point" is too slow.

Does the STYX plugin work with get image I assume not?

Conor B
21
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 30th Jun 2010 14:59 Edited at: 30th Jun 2010 15:01
STYX dissapointinly doesn't work with the sprites. I wouldn't say it works with get image either :S

Edit: Are you running in full screen exclusive mode? This smooths the screen and gives better performace than the regular full screen mode.

Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 30th Jun 2010 17:56
you can try using memblocks instead of 'get image' to make the textures..
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th Jun 2010 18:24
Quote: "you can try using memblocks instead of 'get image' to make the textures.."

I'm no good with memblocks, how do I get from screen to memblock without using "get image"? Are you suggesting I use "point" as this has been too slow by far compared to "get image"?

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 30th Jun 2010 18:33
I doubt that memblocks will work. You may be able to use 'copy bitmap' however, to copy the data to an off-screen bitmap, and then use 'get image' on that/

[b]
Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 30th Jun 2010 23:19
i think memblocks are faster.. and you can set an alpha channel

With memblocks you can

1. Copy the backbuffer to a memblock and convert it to an image
2. Create the image directly on the memblock

but that would be hard to do if you dont know about mems. I tested what diggsey said, that works too and seems a lot easier :

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 30th Jun 2010 23:32
Yes but memblocks don't work with a multisampled backbuffer, which was the problem to solve

Try it yourself:


[b]
Sepnon
16
Years of Service
User Offline
Joined: 7th Feb 2010
Location: Brazil
Posted: 1st Jul 2010 00:55
i think the crash is because bitmap 0 is not really a 'bitmap'

im trying to make my own 'get image', help!
whats wrong here? i think those pointers are wrong, i dont know how to use them correctly


Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 1st Jul 2010 01:27 Edited at: 1st Jul 2010 01:27
No the crash is because you can't convert a multisample bitmap into a memblock. Try disabling multisampling and the code will work fine.

Bitmap 0 is as much a bitmap as any other

[b]
KingL
16
Years of Service
User Offline
Joined: 27th Jun 2010
Location:
Posted: 2nd Jul 2010 13:18
Hey guys,

thanks for all the responses! Sorry for the slow reply - was away this week but will test these solutions out over the weekend. I will upload a photo of the edge issue I was talking about later today.

Thanks for helping me out!

/Francesco

Login to post a reply

Server time is: 2026-07-25 08:30:07
Your offset time is: 2026-07-25 08:30:07