Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: KARMA on May 22, 2003, 05:13:56 pm

Title: shields-maybe stupid-
Post by: KARMA on May 22, 2003, 05:13:56 pm
i was surfing the code last week and i've seen -if i'm not wrong- that the engine already counts the position of hits, for particles/fake debris, if i remember well.
Now as you know i'm a -shield for caps freak- and i was thinking:
surely the best would be to use the decal code for virtual shields for caps, but what about maybe a particle effect?
i was looking the image in the thread about 3d shockwaves made with particles and i noticed that they look somehow like glows: http://www.hard-light.net/forums/index.php/topic,15117.0.html
now, imagine one of these particles appearing at the coordinates of the hit and then fading out.
The particle/glow may be of the same color of the laser that hit the ship, or maybe the color may be determined by the race, like thrusters.
It will fade after some istants after the end of the hit (beams)
the size will be determined by the size of the laser, or maybe by the shielddamage received.
It will have a 3d effect that may be cool, like in some anime, and ther will be no problms of polys, normals, neighborood etc etc.....
the only poblem i can think of is about beams: those particles will probably be partially inside the hull, now with too big particles (beams) the effect may be somehow odd
well what you think?
Title: shields-maybe stupid-
Post by: Nuke on May 22, 2003, 07:03:15 pm
i added a shield mesh to the lucifer model thanks to the import data button in pcs. and they work, but beams, fighters, and bombers kinda go through shields.
Title: shields-maybe stupid-
Post by: Nico on May 23, 2003, 01:47:43 am
Quote
Originally posted by Nuke
i added a shield mesh to the lucifer model thanks to the import data button in pcs. and they work, but beams, fighters, and bombers kinda go through shields.


I can't count shielded lucifer pofs anymore :p
yeah, shields work on capship, tbut they look bad, right now.
Title: shields-maybe stupid-
Post by: Bobboau on May 23, 2003, 01:53:44 am
that's becase they arn't dense enough, I think shields are dynamicly loaded so they can be as dense as you want.
someone make a shielded cap ship with a 8,000 tri shield mesh
Title: shields-maybe stupid-
Post by: Nuke on May 23, 2003, 02:30:32 am
i dont think it has to do with the number of triangles in the mesh, but with the fact that the energy distortion animation, which appears to be dynamicly mapped onto the mesh, is scaled up with the mesh for some reason. we need a way to better control the resolution of the distortion animation, such as scale it up with the damage of the weapon hitting it.
Title: shields-maybe stupid-
Post by: Bobboau on May 23, 2003, 02:37:06 am
I _know_ it has to do with the number of tringles on the mesh (or more accurately the size of the triangles)
Title: shields-maybe stupid-
Post by: KARMA on May 23, 2003, 04:22:02 am
actually i was looking for a way not using a 8000 polys/2 hour work shield mesh, that may look better, and that could be probably easyer to do and less performance hit than decals (but obviously decals remain the best way to do virtual shields, when they will be optimized and implemented)
and i thought that a 3d effect (the glow sphere) could be very cool (or very odd, i think that it has never be done in other games)
Title: shields-maybe stupid-
Post by: Fry_Day on May 23, 2003, 10:57:56 am
The blurry shield effect is due to triangles having a large area. The shield effect is mapped to the nearest triangles in the shield mesh, so if the triangles are very large, as is the case with the lucifer shield (compare sizes to fighter-sized shields), it'll be big.
Title: shields-maybe stupid-
Post by: TrashMan on May 23, 2003, 11:02:25 am
Mabe changing the shieldhit ani would help?
Title: shields-maybe stupid-
Post by: Nico on May 23, 2003, 01:23:16 pm
Quote
Originally posted by Bobboau
that's becase they arn't dense enough, I think shields are dynamicly loaded so they can be as dense as you want.
someone make a shielded cap ship with a 8,000 tri shield mesh


but you can't... you can only have one shield subobject, and the limit is about 820, remember?
Title: shields-maybe stupid-
Post by: Nuke on May 23, 2003, 04:36:05 pm
if you can find a way to scale down the mapping coordinates so that the animation will render in a smaller area, i think it would look better. then all you have to do is add a "solid shields" tag so that players cannot fly their bombers through them.

while were on the subject, id like to see more shield rendering options, such as custom impact effects.
Title: shields-maybe stupid-
Post by: Bobboau on May 23, 2003, 09:25:43 pm
shields are completly diferent from ship subobjects, they are completly loaded dynamicly meaning that they can have as many polygons as you want (suposedly)

the way shields are rendered is by shrink raping UV coordanants onto the mesh, if you don't have enough triangles then they will be too big, you need a denser mesh, or they will look bad

someone with an hour of free time make a high density mesh around the lucifer and test it out, you can probly use TS's nurbs tool to do this quickly
Title: shields-maybe stupid-
Post by: Nuke on May 24, 2003, 12:51:57 am
good point, i will give it a go and see what it looks like.
Title: shields-maybe stupid-
Post by: KARMA on May 24, 2003, 07:50:55 am
but will this shield mesh cause slow downs due to pcount, or not?
Title: shields-maybe stupid-
Post by: Bobboau on May 24, 2003, 12:44:54 pm
maybe
Title: shields-maybe stupid-
Post by: TrashMan on May 25, 2003, 05:41:32 am
Mmmmm..... capship shielding....;7

gonna give it a try
Title: shields-maybe stupid-
Post by: Bobboau on May 26, 2003, 01:33:42 am
anyone done it yet?

actualy someone try this (http://freespace.volitionwatch.com/blackwater/corvette2t-01.zip)
it will not open up in any model veiwer, but I think it might work in game
Title: shields-maybe stupid-
Post by: TrashMan on May 26, 2003, 03:38:53 am
Quote
Originally posted by Venom


but you can't... you can only have one shield subobject, and the limit is about 820, remember?



Actually, the limit is 1600..:eek2:
I made a shielded capship (about 1490 polys shield)..
Title: shields-maybe stupid-
Post by: KARMA on May 26, 2003, 03:51:12 am
as said from bobbau above, the shield mesh can probably be of any pcount you want
Title: shields-maybe stupid-
Post by: TrashMan on May 26, 2003, 05:43:11 am
No..it's 1600. Tried it.
I have the newest PCS version and it didn't want to convert.
WARNING shield poly>1600!
Title: shields-maybe stupid-
Post by: karajorma on May 26, 2003, 06:06:16 am
That could be a PCS limitation though. Have you tried converting the shield seperately (maybe with another converter) and then importing it?
Title: shields-maybe stupid-
Post by: Bobboau on May 26, 2003, 10:12:49 am
did anyone try what I just posted?
it has a poly count of 2930 and PCS had no problem converting it
Title: shields-maybe stupid-
Post by: Woomeister on May 26, 2003, 10:26:32 am
Quote
Originally posted by Bobboau
anyone done it yet?

actualy someone try this (http://freespace.volitionwatch.com/blackwater/corvette2t-01.zip)
it will not open up in any model veiwer, but I think it might work in game

(http://www.3dap.com/hlp/hosted/inferno/deimos.jpg)
:wtf:
Title: shields-maybe stupid-
Post by: Bobboau on May 26, 2003, 10:39:11 am
hmm I must have done it sideways... :blah:
(we realy need one of thouse 'I am a tard' smilies)
how were you able to get MV to open it? speacal build?

try it again, hopefully I got it right this time
Title: shields-maybe stupid-
Post by: Krom on May 26, 2003, 12:21:49 pm
Seems to me the best way to do capship shields is to make then almost skin tight, rather then a large sphere around the ship.  Otherwise you would have to make ships and bombs collide with the shield instead of the ship.

-Krom
Title: shields-maybe stupid-
Post by: Starks on May 26, 2003, 01:07:07 pm
How were the Lucifer's shields made so loose?
Title: shields-maybe stupid-
Post by: Bobboau on May 26, 2003, 01:14:17 pm
I updated my zip...
is anyone going to try it?
Title: shields-maybe stupid-
Post by: KARMA on May 26, 2003, 01:38:04 pm
as soon as i return home i'll give it a try
Title: shields-maybe stupid-
Post by: Galemp on May 26, 2003, 04:43:11 pm
You guys might be interested to know that DTP made a conforming shield mesh for the Lucifer in the FSPORT. It's been sitting there the whole time. Take a look.
Title: shields-maybe stupid-
Post by: KARMA on May 27, 2003, 11:58:14 am
just gave a look at it, the model cant be opened by modelview (shield>1600) but in game works, result is a bit odd btw:
Your shields are smaller than original model and intersect the mesh, causing zbuffer/clippings near intersections, and not covering the hull when they are inside the model. Also the shield effect is wide (a bit too much, but still acceptable) in some areas and narrow in others, depending by edge density.
Also the shield effect  was looking like when you have low details(that's normal since my settings were low), but when i setted the shield details at max the effect remained low detial(somehow like a white glow). i don't think this is caused by the ship btw.
Title: shields-maybe stupid-
Post by: Solatar on May 27, 2003, 06:46:19 pm
Model opens fine in Modelview. No special build...

I think this is our problem:
Shield mesh is sized wrong.
(http://www.3dap.com/hlp/hosted/14_year_war/hades/corvette.jpg)
Title: shields-maybe stupid-
Post by: Solatar on May 27, 2003, 06:53:39 pm
Resizing the shield to about 1.6 times it's size will do it, but modelview crashes when I try and save it.
Title: shields-maybe stupid-
Post by: Bobboau on May 28, 2003, 10:46:18 am
damnit what the hell did I do to the model that I based the shield on
Title: shields-maybe stupid-
Post by: Kazan on May 28, 2003, 09:42:56 pm
Quote
Originally posted by Bobboau
anyone done it yet?

actualy someone try this (http://freespace.volitionwatch.com/blackwater/corvette2t-01.zip)
it will not open up in any model veiwer, but I think it might work in game


correction - it will open in POF CS

btw the shield mesh is malesized (or perhaps i need to check my shield render code - checking... nope, it's right)
Title: shields-maybe stupid-
Post by: Bobboau on May 29, 2003, 12:09:59 am
yes it is mal sized, I should realy check scales when I use a cob that I havn't touched for a few years
Title: shields-maybe stupid-
Post by: KARMA on May 29, 2003, 04:01:12 am
btw althought the wrong size, we know that shields>1600 work in game, can't be too close or intersect the mesh or there will be clippings, the higher edge density, the smaller the effect
problems are
1: it can take a lot to make a shield mesh, you can't simply scale the hull mesh:
you have a use a certain edge density all over the mesh, or you will have effects of different sizes in different areas, and simply scaling an irregular mesh can cause the new enlarged mesh to intersect the hull mesh, you will have to create a completely new mesh or scale group of faces individually to avoid this.
2: th higher pcount will cause slowdowns?
Title: shields-maybe stupid-
Post by: Nico on May 29, 2003, 05:00:13 am
making shields in max is very easy, you have a modifier called push, it's about like scaling, excepted each poly follow s own normal. bah, it's hard to explain, just know that it works fine, it will fill holes and recessed areass w/o any pb, unlike a wild scaleup.
Title: shields-maybe stupid-
Post by: KARMA on May 29, 2003, 12:54:04 pm
that's interesting