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.

Program Announcements / D3DFunc V1.0

Author
Message
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 19th Oct 2005 07:06
To show off the alpha'ed 2D boxes you can try out this code.

Simple background, with gradient box, both the top points have alpha set to 0 and the bottom points 255. Background image attached.



Screenshot:

Attachments

Login to view attachments
Maleck
20
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 19th Oct 2005 23:10
Thanks for providing the new version for us.
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 20th Oct 2005 03:23
No problem.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 15th Nov 2005 14:29 Edited at: 17th Nov 2005 21:01
[EDIT]
Ok, forget about this one as I was testing it in DBSDK (trying to convert it), now I found that works great with DBPro.
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 9th Dec 2005 00:08
Sorry for bumping the thread but all I get is an error saying it can't find the initd3d function. I have 5.9, all the .dlls are in the right place, what's wrong? I also tried getting the most recent version and that didn't even recognize the initd3d command.



Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 9th Dec 2005 00:54 Edited at: 9th Dec 2005 00:54
I have not done any work on this dll for quite a while and have put the source in the public domain. Not sure if it needed recompiling for 5.9, but I can tell you all the commands are now prefixed D3D_.

Here is a list of commands

D3D_Init
D3D_TEXT
D3D_FONT
D3D_3DText
D3D_Line3D
D3D_Color
D3D_EndText
D3D_SetView
D3D_Line
D3D_Dot3D
D3D_Dot
D3D_Box
D3D_BoxAlpha

I think the examples need to be changed to reflect the new command names.

Hope this helps, if not I know SilentS has done some more work on this and he may be able to look at the source more closely (I currently have no VC++ compiler.

Cheers,

Cloggy
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 9th Dec 2005 15:54
The last package I posted should be working, assuming 5.9B3 is 5.9 final, all the help, the cut down example and plugin have the new function names. Try running the example, and see if that works.
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 9th Dec 2005 17:15
Awesome man. This DLL is great... all I needed it for was the text (with multiple fonts ), and it speeded up my FPS & added anti-aliasing at the same time...

Anybody mentions anything about text, I always direct them towards this DLL...

16-colour PNGs pwn.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 9th Dec 2005 22:05
This dll is great. I haven't actually used it yet, but you can clearly see that it's great. Unless you're all kidding. If you were all kidding then I'd look like an idiot..

Great dll there. Good on you for releasing it to the world.


You are not alone.
Humanoid
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 10th Dec 2005 19:06
can you put next versio..

D3D_Line3D=object number, X1#, Y1#, Z1#, X2#, Y2#, Z2#, ZEnable
D3D_DOT3D=object number, X#, Y#, Z#, ZEnable
D3D_Delete=object number
D3D_position3D=object number, x#,y#,z#,[x2#,y2#,z2#]

if want change line3d position or delete, currently possible

Great plugin

Suomi Finland PERKELE!
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 10th Dec 2005 23:30
Sinkomies,

You don't need to delete the 3d line, you have to draw it with the D3D_Line3d in every display loop.

Think of it as a copy of the standard line command but in 3d.If you don't call Line3d on a loop it doesn't get created.

Cheers,

Cloggy
Humanoid
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Finland
Posted: 11th Dec 2005 00:20
aah, ok

Suomi Finland PERKELE!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 12th Dec 2005 12:07 Edited at: 12th Dec 2005 12:09
Cloggy, how could it be that 3d lines painted with D3D_Line3D appear over other 3d objects, even when called with "1" flag for ZEnable?

Also, I'm getting this with D3D_Dot3D:


It's like 3D dots do not appear as dots, but as squared sprites. Don't know the reason why either. Do you have any clue?

Attachments

Login to view attachments
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 12th Dec 2005 20:43 Edited at: 12th Dec 2005 20:50
morcilla,

That's very strange! I'm just upgrading to 5.9, than I'll install the latest version and see what I get. Haven't got VS2003 installed at the moment as my pc was rebuilt recently, but I'll try to install it this week.

If you have example code could you post it please.

EDIT - I have just tried the latest version and the D3D_Line3D and D3D_Dot3D commands bothe seem to work ok.

Cheers,

Cloggy
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 13th Dec 2005 14:37
Yes, when I run the example, they work pretty well. But I inserted the commands in a very big project and it happens what I told you.

I've done all kind of test, and I don't even know the reason. I cannot even force it to work wrong with my own examples. So maybe you could have some idea of what could be causing this.

To complete the history, I ported the .dll source code to DBSDK, and the same is happening there, that is, it works fine with a simple test, but wrong in my project. Here is the link : http://forum.thegamecreators.com/?m=forum_view&t=65202&b=22
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Dec 2005 20:31
Morcilla,

Do you use the set camera view command?

If so you need to use the D3D_SetView command with the same parameters otherwise you get some strange graphical problems. Try removing the command from the showcase example in the help to see what I mean.

If that isn't the problem then if you are prepared to send me the project I will try to resolve the issue. I understand that you may not want to do this, But I'm only interested in sorting out the problem.

Cheers,

Cloggy
Thebeely
19
Years of Service
User Offline
Joined: 4th May 2005
Location: Croatia
Posted: 13th Dec 2005 21:00
@Cloggy: Great plugin! What should I put in credits in program?

Za dom - spremni!
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Dec 2005 21:30
Thebeely,

Not really bothered about credits. You could just point people to this link if you want. SilentS has made changes to this now and hold the latest source, so you may want to check with him to.

Morcilla, I have done some more research and found that the make particles command has an affect on the d3d_dot3d point sizes. The size is directly related to the radius size defined in the make particle command. When I get VS2003 installed (hopefully thursday) I will see if I can get round this.

SilentS has the current source so I will speak to him next time he is on MSN.

Cheers,

Cloggy
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 13th Dec 2005 22:47
Not too bothered about credits here either, 99.9% Cloggys work. Attached the latest source for anyone who wants to have a look. I use Codeblocks, but this should still compile fine with VS.

Attachments

Login to view attachments
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 13th Dec 2005 23:29
Was the problem with the Z depth on the 3d line command ever fixed?

Damn useful plugin. Huge respect to Cloggy and everyone else who has had input into it.

Cheer if you like bears! Cheer if you like jam sandwiches!
RiiDii: "I highly recommend Philip's vector tutorials"
P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Dec 2005 23:36 Edited at: 13th Dec 2005 23:40
Philip,

Cheers. Not sure of the problem exactly. I can recreate the 3d dot problem. Have you an example of the zdepth problem for me to try?

SilentS will hopefully make the dot3d change as I am currently without a c++ compiler, but as of thursday I will load VS2003 and spend a bit of time on it.

EDIT - the D3D_Line has an zenable option as the last parameter, 1 to enable 0 to disable I think.

Cheers,

Cloggy
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 13th Dec 2005 23:56
Cloggy solved the problem, so I've recompiled. The Dot3D function now has an alternate parameter list.

Using D3D_Dot3D x, y, z, zenable will act as usual.
You can also specify size with D3D_Dot3D x, y, z, size (float), zenable.

Updated zip attached.

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 14th Dec 2005 14:55 Edited at: 15th Dec 2005 12:05
Cloggy, yes! Particles were causing D3D_Dot3D problem! I use them spreadly in my project.

And about D3D_Line3D Zenable problem, it seems to happen when there is a locked object in screen! I only have a DBSDK example, but it should be easy to reproduce it in DBPro.

Also, I use D3D_SetView just after initial camera setup, and initial fov never changes.

SilentS, Good work! Please, could you post the last source, so we can port it to DBSDK?

Thanks a lot, I'm also thinking about crediting both of you.

EDIT:

This is the setup of the object that causes D3D_Line3D Zenable problem (DBSDK):



EDIT_2:

SilentS, thanks a lot for posting the code at the DBSDK forum. http://forum.thegamecreators.com/?m=forum_view&t=65202&b=22&p=0
Now I discovered that 3d dots also have that zenable problem with locked objects.
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 20th Dec 2005 09:52 Edited at: 20th Dec 2005 09:53
SilentS,

Could you possibly post the latest source for this please. I think I'm slightly out of date at the moment.

Cheers,

Cloggy
Scilynt
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 20th Dec 2005 15:32
Sorry, meant to do this for Morcilla.

This should work, I actually use Codeblocks, so the VC project files haven't been touched, don't think I changed anything project-wise anyway.

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 22nd Dec 2005 13:12
Thanks, I'm still after zenable the issue. As a workaround, I'm going to try something similar to this:
http://forum.thegamecreators.com/?m=forum_view&t=67110&b=6
It is a "manual" lock on, that makes unnecesary to use Lock Object On.
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 22nd Dec 2005 20:47 Edited at: 22nd Dec 2005 21:49
morcilla,

I have knocked up a small test program to attempt to find out what's going on with the 3d line command.

It looks to me like lock object on is working by itself. It's when you use it in combination with ghosting or diable zwrite that you get the problem.

Here's the test code



'z' toggles zwrite
'l' toggles lock object
'g' toggles ghost object

Ghosting appears to have no effect on the 3dline command (it acts as if the object is still solid)

zwrite makes the line appear on top regardless.

Lock works when used on its own.

Let me know if you see the same results.

EDIT - On further investigation, I can't see what more I can do with this. I've exausted my limited knowledge. I'll plow on but I'm not really getting anywhere.

Cheers,

Cloggy
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 26th Dec 2005 12:46 Edited at: 28th Dec 2005 17:34
Yes, it happens like you describe. I've seen problems also with enabling/disabling zdepth and zread.

I don't know either what else can be done. Using lock object workaround...

EDIT:
I found a new problem regarding lights and 3dlines/dots. They suddenly get brighter or dimmer, when another object is faded or there is not other object in the screen. Not totally sure

EDIT2:
To solve the light issue I added this to the render states at the source code:

So the primitives are not affected by lights anymore. The zenable problem is still there...uh.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 3rd Jan 2006 00:34
I think I may have found two other problems with the plugin.

See my thread on steering behaviours: http://forum.thegamecreators.com/?m=forum_view&t=68477&b=1

The first problem is that multiple cameras appears to throw the plugin. I've tried fixing this with set current camera but no apparent joy.

The second problem is that under certain circumstances other DBPro objects appear to disappear. I think this is a D3D plugin problem for the reasons explained in the other thread.

Cheer if you like bears! Cheer if you like jam sandwiches!
RiiDii: "I highly recommend Philip's vector tutorials"
P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 3rd Jan 2006 15:21
Phillip,

I am aware that there is a problem with multiple cameras and I'll have a look at what I can do to enable them.

I have had a look at your path following example and if you run the update_heading function in your code the green cubes disappear. This happens even if you comment out all the commands referenced from my dll. This would suggest the problems actually lies withing the update_heading function itself.

Cheers,

Cloggy
Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 3rd Jan 2006 23:06
Can someone please just put the whole thing together with all the new stuff all in a .rar or .zip that can just be extracted to the dark basic proffessional directory?



Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 3rd Jan 2006 23:08 Edited at: 3rd Jan 2006 23:34
Antidote,

I'll have a look and sort that out for you.

EDIT - Attached are the latest files in zip format.

Cheers,

Cloggy

Attachments

Login to view attachments
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 7th Jan 2006 00:42 Edited at: 7th Jan 2006 00:47
For anybody who is interested I have managed to get 3d lines and dots to work with multiple cameras!

The one issue is with d3 dots. I have multiple versions of the command with different parameters



This causes some confusion as when you call either of the middle 2 versions you cannot tell if you have provided the camera number or the size parameter, unless you specify the types of the fields you are passing.



My questions are.

Would it be better to make the size parameter compulsory and still allow the camera parameter to be optional?

For those people who use this, what would you prefer?

EDIT - Actually I've thought about it and I think the following would be best



I may also add a color parameter rather than setting it separately.

Cheers,

Cloggy
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 8th Jan 2006 22:57
I'm all for having the camera as a mandatory parameter. I think its good coding technique to specify everything. But I'm not really concerned either way - Cloggy do whatever you think is best. Ta mate once again for all your excellent work with this super plugin.

PS: Have you checked if the 3d txt also works ok with multiple cameras?

Cheer if you like bears! Cheer if you like jam sandwiches!
RiiDii: "I highly recommend Philip's vector tutorials"
P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 8th Jan 2006 23:04
What I'm doing is having the camera as an option, but have the color as mandatory, this is closest to the way I think TGC would create this command.

D3d_DOT3D [Camera],x1,y1,z1,size,color,zEnable

As far as 3D Text goes, the text is created as a DBPro object and therefore it is like any other object.

I'm planning on releasing this new version within the next couple of days (including source code for those who want it.

I would also like to thank DmitryK for supplying me with the method for getting all the camera info.

Cheers,

Cloggy
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Feb 2006 17:17 Edited at: 6th Feb 2006 17:18
I've just tried to replace standard text with D3D_TEXT. I have hit a problem...the image below shows D3D text first, followed by standard text. They are both size 24, and are sprites with a height of 24. What's all that about then?!?!?!



Attachments

Login to view attachments
Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 6th Feb 2006 20:38
BatVink,

In order for D3D_TEXT to work you need to make sure there are no Sprite commands between the D3D_STARTTEXT and D3D_ENDTEXT commands.

Also a size of 24 relates to pixels. Not sure what it relates to with standard text.

Cheers,

Cloggy
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Feb 2006 17:46
Here ya go, the problem in action...



Cloggy
20
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 10th Feb 2006 20:23
Please note that the latest version of this plugin can be found here http://forum.thegamecreators.com/?m=forum_view&t=69221&b=5&p=0

All queries should be raised there now.

Cheers,

Cloggy

Login to post a reply

Server time is: 2024-11-23 00:11:29
Your offset time is: 2024-11-23 00:11:29