2 registered members (Martin_HH, TipmyPip),
1,279
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Tips on using directx or opengl functions
#244315
01/04/09 00:17
01/04/09 00:17
|
Joined: Jan 2009
Posts: 86 Brasil - RS
DiegoFloor
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2009
Posts: 86
Brasil - RS
|
Hi there I'm just starting to learn 3dgs. The advantage of using 3dgs is that it gives you great flexibility without having to deal with a lot of complicated stuff. But what if I need to change something a little more fundamental? I understand we can use directx functions and that's great! But all the examples in the 'work' folder (concerning directx and opengl) shows basically how to initialize and create vertex. But all of this we can do without using directx functions. How can we use this funcions as a complement to our 3dgs projects? Like editing entities or create a simple modeler software, for example. I expect this to be a very difficult task that cannot be achieved without a long and dedicated study of directx. So I'm not expecting tutorials, long explanations or anything like that. But I would apreciate if someone could simply point me in the right direction (like a project that deals with this, for example) I searched this forum and found very few people talking about this.
|
|
|
Re: Tips on using directx or opengl functions
[Re: DiegoFloor]
#244324
01/04/09 01:01
01/04/09 01:01
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Without any more specific questions, I cant help much, as Im only new to directx myself.
But check the 3DGS manual for any mention of "mesh", especially functions with 'mesh' in their name. When 3DGS talks of meshes, they ARE directx meshes extracted from the models by 3dgs functions.
If you are familiar with C/C++/C#, also look in the "D3D9.H" file in your gamestudio INCLUDE folder, that will give you an idea what directx interfaces are readily available.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Tips on using directx or opengl functions
[Re: EvilSOB]
#244339
01/04/09 03:15
01/04/09 03:15
|
Joined: Jan 2009
Posts: 86 Brasil - RS
DiegoFloor
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2009
Posts: 86
Brasil - RS
|
Well, I do have a more specific question! ( here ) My objective is to modify geometry in real time. But not only move vertex around, but create new ones, delete faces.. as I said earlier, I'm just exploring for now. :P So far it seems that this is not a trivial task at all...
|
|
|
Re: Tips on using directx or opengl functions
[Re: DiegoFloor]
#244344
01/04/09 03:50
01/04/09 03:50
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Ive read your other post and YES, this is not a trivial task at all! Adding polys and vertices is VERY maths hungry, and will eat HUGE amounts of processor time, slowing game response beyond acceptable limits.
But if you are just deleting polys and vertices thats easily managable in real-time, but it will leave actual holes in the model/entity that may screw up dynamic lighting effects of the rest of model that has been cut.
I would go for a more carefully designed model that has patches of polys that can be "lowered" using directx commands so they appear as 'deep pits' rather than 'holes', and lighting will be OK then. Thats the cleaner way to do it, and it will still be fast enough to be used in real-time.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: Tips on using directx or opengl functions
[Re: EvilSOB]
#244345
01/04/09 04:27
01/04/09 04:27
|
Joined: Jan 2009
Posts: 86 Brasil - RS
DiegoFloor
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2009
Posts: 86
Brasil - RS
|
Yep.. thought so. Actually, for simpler tasks, such as lowering terrain, simulate earthquakes, etc, there's the vec_for_mesh. I started wondering about this because of an idea I had a while ago. Something like a mining droid exploring the underground, collecting resources, installing defense turrets against underground creatures... all this through tunnels created by the player! lol Kind of a 'head in the clouds' idea. But no harm in asking, right? I have simpler ideas to work. Maybe I'll get back to this one someday. Thanks for the advices though!
|
|
|
|