One unit, 2 meshes, one mesh cloaked, can it be done?

One unit, 2 meshes, one mesh cloaked, can it be done?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
FireStorm_
Posts: 666
Joined: 19 Aug 2009, 16:09

One unit, 2 meshes, one mesh cloaked, can it be done?

Post by FireStorm_ »

Simple and sort of technical question: Can a Spring model have some of the meshes (or tris/surfaces) have cloak-visuals and other-ones not?

And assuming I'm not the first with this idea; why not? Could I hack it by displaying 2 (let's say static) models, and one is cloaked, and let them make up a single unit? It's a translucency question.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: One unit, 2 meshes, one mesh cloaked, can it be done?

Post by zwzsg »

I suppose you could Lua it. As in, disable engine rendering for that unit, and coding yourself the OpenGL calls to draw it.

Don't worry, it's easier than it sounds.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: One unit, 2 meshes, one mesh cloaked, can it be done?

Post by Funkencool »

I don't know much on the subject but this comes to mind as maybe being useful http://springrts.com/phpbb/viewtopic.ph ... 47#p539947
User avatar
FireStorm_
Posts: 666
Joined: 19 Aug 2009, 16:09

Re: One unit, 2 meshes, one mesh cloaked, can it be done?

Post by FireStorm_ »

Not only did someone else already had the idea, but I have seen that post and seem to have sort of forgot about it.

So I suppose I'd have to look into "Pressure Line piecechange thing" as knorke calls it (I figure that is what smoth uses for his one-script-for-all-units-thing), in order to get i.e. 2 meshes in one unit with 2 different textures, 1 for each.

Then I would have to manipulate one of the textures using OpenGL calls in a gadget.

Of course I'm in way over my head. I never managed much working code without reliable examples, and I don't think the "piecechange thing" is already used in a game. For now I'm going to model some more instead. And merely take the possibility of using translucency into account while doing so. In any case, thanks for the replies guys.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: One unit, 2 meshes, one mesh cloaked, can it be done?

Post by FLOZi »

FireStorm_ wrote:I figure that is what smoth uses for his one-script-for-all-units-thing
Totally unrelated

fwiw, I did it first. :P
User avatar
FireStorm_
Posts: 666
Joined: 19 Aug 2009, 16:09

Re: One unit, 2 meshes, one mesh cloaked, can it be done?

Post by FireStorm_ »

Oh well, no matter, as said, I won't be pursuing trying it myself. :-)
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: One unit, 2 meshes, one mesh cloaked, can it be done?

Post by Funkencool »

FireStorm_ wrote:Oh well, no matter, as said, I won't be pursuing trying it myself. :-)
Well if you ever do, or someone who does sees this thread, here's the pressure line gadget spoken of
http://springrts.com/phpbb/viewtopic.ph ... 16#p524274
Post Reply

Return to “Game Development”