Author Topic: Expose existing functionality  (Read 2388 times)

0 Members and 1 Guest are viewing this topic.

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Expose existing functionality
I noticed FSO uses two very useful features, but doesn't allow developers to take advantage of them.
Both are used for 3d shockwaves.

The first one is the animated scaling of meshes and the second one is a fade-out effect.


3d shockwaves can be very efficient effects. If I use a simple sphere mesh with a static, tiling texture, it uses very little memory and thanks to the mentioned features it can still look fine.

Many simple effects could be done this way and I would prefer it over the expensive frame animations we currently use.

--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: Expose existing functionality
in what way is this not now exposed?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Re: Expose existing functionality
Well, lets say I want it for the glow particles in the "flashy deaths" script, or really just for any other effect. How do I do that?
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Nighteyes

  • 211
Re: Expose existing functionality
all I can say is don't get you'r hopes up about this "feature", there was a time where I was doing extensive testing with different mesh types, and the engine can't handle shockwaves with "complex" meshs, what I tested was 2 things:
1. I took the normal shockwave mesh(a cylinder) and duplicated it a few times(i think it was 6), and rotated them to be on the same axis but so it will form a sphere of sort, this didn't work at all, the shockwave didn't render.
2. I took 3 planes, put them in a X shape, this method worked but produced a few strange effects, such as looping animations, not scaling properly, rendering only when it wanted to and such.

so all in all, I'm surprised the 3D shockwaves work as well as they do, but for sure something in the code there isn't working properly.

 

Offline Nighteyes

  • 211
Re: Expose existing functionality
Well, lets say I want it for the glow particles in the "flashy deaths" script, or really just for any other effect. How do I do that?

and to answer this question, if you want to test stuff, you won't be able to do it through the flashy deaths script, but you can test it on weapons, just add a shockwave to a weapon, or even just test it on capships when they die, and adjust the pof of the 3d shockwave(pof file itself as well as glow texture/animation).

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Expose existing functionality
Somewhere, there was a spherical shockwave model, which did worked.
I recall that it was said to look ugly, but if somebody still has it, could he post it?
I'd like to check it out.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: Expose existing functionality
i believe it was galemp testing it and the reason it was ugly was the fact that it didnt have any apparent "volume" to it. One of the things neccesary for any truly voluminous effects was the use of shaders. Nowadays, its possibly doable, but i wouldnt count on it.



(this was around the time that 3D shockwaves first appeared and there were massive ragefests on visual preference from various people. basically the great 2D vs 3D shockwave debate)
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: Expose existing functionality
when 3d shockwaves were first invented I had a sphere model used for testing it, that was the aforementioned spherical shock wave model.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Expose existing functionality
Could you post this, along with some shockwave texture?
I'd like to see how does it looks now.

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Re: Expose existing functionality
Looks like this went a bit off-topic.

I'm not talking about new shockwave effects. I just want to be able to use the two mentioned features for other effects.

FS2 and FSO(-based games) use frames for almost all effects, while modern games only use them in some special cases.


If you can time it right the scaling and fade-out can be pretty efficient techniques.

Haegemonia is a good example. They use frame animations for the smaller exposions, but only single frames for the bigger ones and scale them up and fade them out.
They often cover it up with big flares, which work the same way.

http://www.youtube.com/watch?v=wQhrYm6UB5w#t=3m05s
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Tomo

  • 28
Re: Expose existing functionality
I'd say that you should probably wait for the new materials system - I think The_E is working on that.

That is intended to allow you to use any shader you like on any item you can currently apply a discrete texture to, with custom data (eg size scalers) that can be set by to Lua, so you can have a shader that scales an arbitrary mesh according to values set by Lua.

Vertex shaders can do very fast transformation of geometry. (Not collideable of course, but doesn't sound like you need that.)

 

Offline DaBrain

  • Screensniper
  • 212
    • Shadows of Lylat board
Re: Expose existing functionality
Right, I know about the material system, but I recall asking The E about scaling via vertex shader and afaik he said "no".

Of course you can use the mapping coordinates for a scaling effect, but that's not easy to use and your mesh/particle needs to be at 100% of the size all the time... (-> fillrate)
--------------------------------------------------
SoL is looking for a sound effect artist
Please PM me in case you want to apply
---------------------------------
Shadows of Lylat - A Freespace 2 total conversion
(hosted by Game-Warden)
----------------------------------

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Expose existing functionality

Geometry Transformation via Vertex is possible. Caveat: You're not going to see any SM (Shader Model) 2.0 cards doing it.

And if a developer can't test a feature or a function, they're not going to create towards it, so I think in this "no" means "It might be on the list, but not in the current iteration as it is being worked on as somebody else will have to do it".

I could be wrong though.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

  

Offline Tomo

  • 28
Re: Expose existing functionality
Not quite, Zacam.

SM2 cards are able to handle a simple scaled transform - after all, the basic vertex shader is doing a transform into screen space anyway, and it's only a slight variant of that.
If the deformation of the entire model can be described by a small number of values, eg "scale vertex position in model space X by some_value, then transform to screen space", then that is fine.

However, more complex transformations eg using (animated?) textures to define the deformation may well require newer cards, which not everyone has access to.

So it depends what you want to do.
Blowing up a mesh like a balloon in any combination of model X, Y and/or Z is pretty easy, as this can be described by a single variable and a constant transformation matrix.
- Multiply one by the other, transform (effect), transform (screen).

More complex stuff on the other hand - you'll hit the limits of older cards pretty quickly.