Program Announcements / D3DFunc V1.0 |
| Author | Message | ||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
I have now finished my DirectX additional functions dll. It allows you to do the following:- Create 3D text as a DBP object. Display fast antialiased text. In some cases up to 20+ times faster than standard DBP text (if you are using different fonts and attributes). Draw 3D lines. These are not DBP objects and currently output on top of everything. I am looking at a 3d point command. Text and Lines can be drawn with an alpha value as well. Here is a screenshot of some 3D text created by the dll ![]() The attached zip file contains help, examples and a keywords file as well as the dll itself, and should be extracted to the DBP installation directory. A big thank you to SilentS for his contribution of the base help files, and everyone who helped with testing. Also thanks to Mike Johnson who gave me alot of help in getting the creation of DBP objects to work. If you find any bugs or have any suggestions please let me know and I'll see what I can do. Cheers, Cloggy |
||
| Back to top |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
WHAT? Good grief. Don't be scared, but a 3D text DirectX function call DLL???? Cloggy, sir, I hereby declare you to be my favourite person on the planet. Furthermore, if you get the 3d lines working so they are not on overwrite, I shall marry you. Philip Cheer if you like bears! Cheer if you like jam sandwiches! P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
You're welcome. I'm trying hard to figure out how to stop them printing on top. Hopefully I'll find something soon. I may release the source at some point in the future, and let a more competant c++ programmer finish the job. Cloggy |
||
| Back to top |
|||
|
Scilynt
User ![]() Joined: Wed Nov 13th 2002 Location: .-#-. |
Again, Nice DLL. I figured out, sort of, the problem I had with the text object function. You must be running the retail version of DX, as when I run with that everything works. Running with a debug version I get a warning and an error. First, I assume you are creating a Vertex Buffer, and according to the debug statements you have created it with POOL_DEFAULT but without a WRITEONLY flag. This is proberly for obvious reasons, but causes a slight problem though as it may introduce a 'severe performance problem'. The DLL will happily work like this. However, the error is to do with incorrect flags when attempting to lock the Vertex Buffer. This fails the lock and the text cannot be created. |
||
| Back to top |
|||
|
MikeS
Moderator ![]() Joined: Mon Dec 2nd 2002 Location: United States |
|
||
| Back to top |
|||
|
RossageSausage
User Joined: Sun Mar 9th 2003 Location: Cyberspace |
Congrats to you on the extremely useful dll. There are so many uses for this its not even funny. The text display speed is excellent. Keep up the great work! |
||
| Back to top |
|||
|
X Trade
User Joined: Thu Feb 19th 2004 Location: near bristol, UK |
well done! i can see this being very useful!! www.AoFP.co.uk |
||
| Back to top |
|||
|
spooky
User ![]() Joined: Fri Aug 30th 2002 Location: United Kingdom |
|
||
| Back to top |
|||
|
Baggers
User ![]() Joined: Mon May 31st 2004 Location: Yonder over dem dere hills |
|
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
Thanks for all the positive feedback. What I'd really like is for TGC to include a 3d Text option and antialiased text in a future release of DBP. I'm sure Lee could make this much more efficient than I can. My c++ knowledge is quite limited and I have cobbled this together maily through dissecting examples and pleanty of trial and error. Cheers, Cloggy |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
SilentS, I create the text using D3DXCreateText. I then reposition the vertices depending on the alignment chosen. Once this is done I change the vertex format to add normals and UV coords using the CloneMeshFVF method of the ID3DXMesh interface. This uses the option D3DXMESH_MANAGED. I now have a mesh with the same FVF as a DBPro object. I then use some internal DBpro dll functions to create a new DBP object and copy the vertex data from my mesh to the new object. When I get round to commenting the code I will post the source for this dll. Cheers, Cloggy |
||
| Back to top |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
How about a create 3D curve option? You could do this using bezier curves? Cheer if you like bears! Cheer if you like jam sandwiches! P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home |
||
| Back to top |
|||
|
Keaz
User Joined: Mon Sep 22nd 2003 Location: Somewhere in south Texas |
Sweet! Me likey |
||
| Back to top |
|||
|
spooky
User ![]() Joined: Fri Aug 30th 2002 Location: United Kingdom |
|
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
Spooky, The D3DXCreateText method gives no option for size. I hadn't really considered this, but I could take a size parameter and manually resize the object in my dll before making it into a DBP object. I'll check it out tonight if I get the chance. Cheers, Cloggy |
||
| Back to top |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
This is more of a workaround aimed at a DBPro bug rather than necessary extra functionality in Cloggy's great DLL though. Cloggy, this is a REALLY useful DLL. You are seriously to be congratulated for this. Faster 2d text and 3d text are major contributions to the community. Philip Cheer if you like bears! Cheer if you like jam sandwiches! P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home |
||
| Back to top |
|||
|
Tartopom
User Joined: Sun Jun 27th 2004 Location: Cyberspace |
If you can do something for fast 2d drawing, dot, box, line, this plugin can be more than great Cheers |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
I have made a slight amendment to the 3d Line command. The lines now do not draw if the are behind another object. Sorry Philip but I wont be able to marry you Also managed to squeeze another 5% onto the fps. won't be able to do anything about the 3d text size, but I am having a look at 2d lines etc. Also does anyone think a 3d point command would be useful? Cheers, Cloggy |
||
| Back to top |
|||
|
Kohaku
User ![]() Joined: Mon May 3rd 2004 Location: The not very United Kingdom |
That's an awesome plugin there. ![]() You are not alone. |
||
| Back to top |
|||
|
Baggers
User ![]() Joined: Mon May 31st 2004 Location: Yonder over dem dere hills |
|
||
| Back to top |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
Aura,Baggers, Thanks. Glad you like it BTW I've added a 3d point command :- Point3d x#,y#,z# Will redo help files when I get the chance. Cheers, Cloggy |
||
| Back to top |
|||
|
Philip
User Joined: Sun Jun 15th 2003 Location: United Kingdom |
Great. But how about a 3D curve command? Cheer if you like bears! Cheer if you like jam sandwiches! P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home |
||
| Back to top |
|||
|
Baggers
User ![]() Joined: Mon May 31st 2004 Location: Yonder over dem dere hills |
|
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
Hey! Next you'll want the moon on a stick! If you can help me out with the maths I'll gladly give it a go. Cheers, Cloggy |
||
| Back to top |
|||
|
David R
User Joined: Tue Sep 9th 2003 Location: 3.14 |
@Cloggy; Haven't had a chance to try your plugin, but about lines; would it be possible to create lines as actual 3d objects (with a certain thickness etc.) I know its probably a severely crazy/stupid idea, but the ability to put 3d lines (in actual 3d) in my current program (editor for my RPG) would be very useful. Just an idea |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
David, It isn't possible to make the lines into actual DBP objects, Also I am certain you cannot create them in varying widths unfortunately. But if you try them out they are completely 3d, you just have to define them in each game loop. This actually makes them more flexible than if they were objects because you do not need to keep changing the vertex information using the DBP vertex manipulation code. I hope this makes sense. Thanks for you input, Cheers, Cloggy |
||
| Back to top |
|||
|
David R
User Joined: Tue Sep 9th 2003 Location: 3.14 |
Okedoke Cloggy; I knew my idea was impossible/pointless Still a great plugin though. Can't wait to integrate it into my current RPG. Thanks for the plugin! |
||
| Back to top |
|||
|
qwe
User ![]() Joined: Wed Sep 3rd 2003 Location: place |
i tried putting the 3d line command in and my game got sort of screwed up and the line doesnt show screen without 3d line command: screen with: If you want anything DB related hosted, log in (with ws ftp or something) www.lysergium.net with username public@lysergium.net and password public. you'll be directed to lysergium.net/public |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
qwe, I've tried a few tests here. You need to put the initd3d command after any 'set display mode' commands. Also you need the 'set view' command. The best place to put this is just above you main game loop. Let me know if that helps. Cheers, Cloggy |
||
| Back to top |
|||
|
Sephnroth
User Joined: Thu Oct 10th 2002 Location: United Kingdom |
Hey cloggy, looks like a great dll. I tried adding you to msn but you havnt appeared online yet DarkSDK suffers the same problem as dbpro when it comes to text - my gui drawing routine takes about 20 fps off my game which i get back if comment out the text commands! Would be very interested in making a version of your faster commands usable in darksdk I could open my dx help file and do it manually i suppose but im wrapped up in my puzzle game competition and looking for a short cut XD let me know through here or msn what you think. [07:16:59-pm] « Sephnroth » you were dreaming about lee... [07:17:13-pm] « Mouse » stfu [07:17:22-pm] « Mouse » he was hanging himself lol |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
I have updated the dll. 2 new commands :- D3D_Line x1,y1,x2,y2 - Faster version DBP Line command D3D_Dot x1,y1 - Faster version DBP Dot command Also changed Point3D command to be D3D_Point. I intend to prefix all commands with D3D_ in my next version, and update my help files. Here is some code to test the speed improvements over the native Dot and Line commands. + Code Snippet On my Athlon 2600 with a Radeon 9700 and 1024MB Ram, I get a 6 time speed increase! Cheers, Cloggy |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
Strange, I've just tried this on my work PC which has just intel graphics and the D3D commands produce no output! Currently not sure why but would appreciate someone else testing this. Cheers, Cloggy |
||
| Back to top |
|||
|
RossageSausage
User Joined: Sun Mar 9th 2003 Location: Cyberspace |
Hey Cloggy, I've ran into a snag. When I put the AA text in the main loop the text seems to just continually overwrite itself making the text pixelated. I don't quite know what to do, I have copied and run your main example just fine and the only difference that I have noticed is that you used a line command and a dbp text command in your loop. Any help with it would be excellent. I've attached my code for you to look at so you know I am not just making a crazy error. Or maybe I did...its bedtime Thanks! |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
RossageSausage, You get this problem if you have some image commands between the starttext and endtext. This is what you should do. + Code Snippet This does slow it down a little, but it is still way faster the the standard commands. I am trying to find a resolution to this though. Attached is a new version of the dll. This update fixes the 2d commands to render correctly on a no accelerated graphics card. On testing at work with an intel graphics chip my 2dline and dot commands work about 30 times faster than DBPro's own commands, I've just got to get the box command working correctly now. Cheers, Cloggy |
||
| Back to top |
|||
|
RossageSausage
User Joined: Sun Mar 9th 2003 Location: Cyberspace |
Hey Cloggy, HAHA I found out the issue. You have to set backdrop on in order for the text to not overwrite itself in the loop. Must be some weird dll quirk....god I am glad I figured that out. Anyways thanks for the response and be sure to get the word out about the issue. Btw: If you are still unsure as to what I am talking about, remove the backdrop on: color backdrop 0 line from your example, compile it and look at the pixelization goin on with the d3d text. Any way to fix it? Thank you for listening and creating an extremely useful dll. |
||
| Back to top |
|||
|
Cloggy
Valued Member ![]() ![]() Joined: Sun Oct 31st 2004 Location: Rayleigh, Essex |
RossageSausage, Interesting! I'll take a look tonight. Pretty sure I can sort that one out. Glad to hear you're finding the dll useful. Let me know if you find any more 'features'. Cheers, Cloggy |
||
| Back to top |
|||
|
Benjamin
User Joined: Sun Nov 24th 2002 Location: France |
|
||
| Back to top |
|||
|
Jess T
Moderator ![]() Joined: Sat Sep 20th 2003 Location: Over There... Kablam! |
Ben's got it right there It's like having a 25% alpha'd image on one layer, then copy + pasting that layer on top a few times, and you'll start to see it more and more clearly... The problem is the same thing, but the screen isn't being cleared before you put the new Text ( rather than the new layer in my example ), so the alpha'd parts get more and more visible each loop untill they are 100% alpha Setting the backdrop on fixes this 'cos when you call the "Sync" command, it completely whipes the screen, and just renders what has been updated since the last Sync ( the same explanation goes for the Paste Sprite command If you don't turn on the backdrop, but have a CLS command, you should be fine Also, Cloggy, thought you might like to know that I used your DLL for all the text in my Puzzle Compo entry RoboMen. And found that I can create a sexy-looking beveled effect by offsetting alpha'd Text Thanks for the DLL, it really helped to add that extra touch to my game, and I didn't want you to go un-credited Jess. |
||
| Back to top |
|||
|
Scraggle
User Joined: Thu Jul 10th 2003 Location: Teesside University |
|
||
| Back to top |
|||
|
warship45
User Joined: Sat Jul 24th 2004 Location: uk |
just tryed it it is great lone land the rpg web site coming soon |
||
| Back to top |
|||
This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.
Go to the last page to check if you can reply to it.
Forum Search
Enter a word or phrase to search our Forum for:
|
|



















