nebulae

Discuss the Star Trek mod(s) for the Vega Strike Engine

Moderators: tillias, Jennos, peteyg

esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

nebulae

Post by esgaroth »

Just wanted to state that i finally managed to get the nebulae working. Not exactly what i wanted, but without volumetric shaders probably the best solution.

Image
Image
Last edited by esgaroth on Sun Jan 15, 2012 12:21 pm, edited 1 time in total.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

I've been meaning to fix nebulas for a while now.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: nebulae

Post by Deus Siddis »

Sorry for the off topic but...

I can't help with the nebulae, but esgaroth if you are looking to improve the general environmental graphics of vega trek, I did some higher resolution asteroid graphics a ways back that might be useful to you. The download links are dead atm but I can re-upload them when my shaky internet connection stabilizes.
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

Hi Deus,
I would be very interested - however, iirc, i downloaded them long time ago and did not manage to get the normal maps working (dont know the syntax for the .obj file to add normal maps). So if you have working bfxm files, i would be really glad and incorporate them immediately - if not, i could give it another try but dont know whether i succeed...
Nevertheless, another upload would be fine so that, even if i fail, others could try (just read that klauss added normal maps to some models so he should know...).
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: nebulae

Post by Deus Siddis »

Yes I believe I got them working with all features- normal maps, LoDs, etc. I'll give you the completed bfxm files and textures then:

Download
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

OK, got them. I´ll try to implement them and post some pics as soon as it works...
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

OK, tried them in a few experiments. First, they look way better than the old ones, although i am not sure whether the normal maps work cause i cannot see those craters. Nevertheless, an order of magnitude better than the old ones. However, when i approach the asteroid field, my framerate drops from 50 to 3 ! (when i have the whole asteroid field in my field of view). Onve i have entered the asteroid field, the framerate climbs again to 13-15.
I have no high-end graphics card (only an ati radeon hd4330), so for die-hard gamers with the respective equipment this might not be a problem-i dont know. Reducing the texture size was not effective in increasing the framerate.
Ideas ?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

LODs
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

LODs
And how do I implement them ? Is there an example somewhere ?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

In UTCS, the Relay, Starfortress, Mule and a few other units have LODs.

You can convert them to xmesh and see how they work. Maybe the wiki has some info too.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

Interestingly, those bfxms from Deus siddis already do have lods (found out when i converted them to xmeshs)....
However, the textures for all lods are the same.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

Maybe it's that. Or maybe the size argument on the lods isn't right.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

OK, I made a few experiments.
Approaching the standard asteroid field drops the framerate from 50 to 22. The standard asteroid field consists of 1052 asteroids (same mesh, same texture 128x128).
Replacing all asteroids by the new ones with lods (lod sizes in the xmesh file are 12 and 4) decreases framerate to 3 when approaching.
Same as before but with textures reduced (from 2kx1k) to 512x256 reduces framerate to 5-6, same is true when i use the new asteroids, largest mesh alone without lods.
Using the new asteroids, smallest lod mesh alone gives a framerate of 22 again.
More to follow...

EDIT: Tested a bit more. It works with a decent framerate when using up to about 350-400 new asteroids (with lods, small texture, 512x256). So it seems that I could use either less asteroids with lods or using more asteroids, but with lower detailed meshes. Have to see which looks better.
Probably one could make different asteroid fields with the different possibilities.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

12 and 4 are veerry smal sizes.

The size parameter is the "pixel area". So 4 is little more than one pixel radius.

Put their square if you were thinking about diameter.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

We´re closing in. I changed the bfxm with pixel areas of 900 and 100 for the smaller lods, and with much smaller textures for the smaller lods. It´s getting better now, although I doubt that 1000 asteroids will be manageable. Need some testing over the weekend and will report next week.
Thanx for the hints and help !
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

You'll need batched asteroids to manage that number.

That means putting more than one asteroid in a mesh, so your meshes could be asteroid "groups".

But then they're not individually selectable/destructible.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

Well, some of the older asteroids are like those, that is in groups. I´ll have a look at them although i fear they have to be made from scratch if I want to go into this direction. Or how it looks when i combine them with new ones. At the moment, I would be happy with a nice, good-looking asteroid field with 400 asteroids and this seems manageable.
If you want the modified files of Deus´ asteroids, just tell me.
BTW, still looking for a nice texture for ice asteroids... anyone out there ?
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: nebulae

Post by Deus Siddis »

Sorry about the LoD settings, apparently I misinterpreted klauss' instructions and used (conservative) values for pixel radius rather than area.

And yes there's no mipmapping (texture LoD) since I didn't (know how to) use the texture compression VS uses, which handles mipmap generation.
esgaroth wrote: OK, tried them in a few experiments. First, they look way better than the old ones, although i am not sure whether the normal map work cause i cannot see those craters.
If you can't see the craters then yes that means something is not working with the normal maps (the crater detail is exclusively in the normal maps unfortunately).

The first question is does your GPU support normal mapping in the first place. Old cards won't, so if you have never seen functioning normal maps in games running on your machine then that might be the issue. Also might be worth trying them in vega strike to make sure vega trek isn't using older, nonfunctional code for handling normal mapping.

The next possibility is that all the ambient vertex lighting in the scene is 'washing out' the effect. Cephid 17 in vega strike has this issue I noticed when testing these textures there.
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

Hi Deus,
Sorry about the LoD settings, apparently I misinterpreted klauss' instructions and used (conservative) values for pixel radius rather than area.
No problem, with values of 100 and 900 it is now really better.
And yes there's no mipmapping (texture LoD) since I didn't (know how to) use the texture compression VS uses, which handles mipmap generation.
Well, i dont know how mipmapping works, but i created new, lower res textures and assigned them to the lod files and this also improves the speed.
The first question is does your GPU support normal mapping in the first place.
Dont know. The radeon4330 is not that old, though, so i guess it should be possible to handle normal mapping.
Also might be worth trying them in vega strike to make sure vega trek isn't using older, nonfunctional code for handling normal mapping.
Hmm, i might try once i have a bit of time.
The next possibility is that all the ambient vertex lighting in the scene is 'washing out' the effect. Cephid 17 in vega strike has this issue I noticed when testing these textures there.
How could i remove this problem ? I guess the lighting settings in the systems file, but what do i have to change ? Do you know a system where it works ? I could transfer the systems file to vegatrek, this is quite easy...
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: nebulae

Post by Deus Siddis »

It seems like that card should have support for this. I think the thing to do next is see if you can see any normal mapping effects in vega strike. I think at least the llama uses some but also try importing the asteroid bfxms into VS. If you for sure can't see or get any normal mapping to become visible in VS at all (even if with reversed/broken bumping/engraving effects) then it may be a problem between your card and the VS engine.

If normal mapping does work for you in VS, including with the asteroids, then it would seem the problem is VT specific. VT might need to be updated to a more current version of the VS engine at some point.

If it is only the asteroid's normal mapping that is nonfunctional in VS then this is an interesting problem because I know they worked with a very modern card on VS 0.5.0.
esgaroth wrote:
The next possibility is that all the ambient vertex lighting in the scene is 'washing out' the effect. Cephid 17 in vega strike has this issue I noticed when testing these textures there.
How could i remove this problem ? I guess the lighting settings in the systems file, but what do i have to change ? Do you know a system where it works ? I could transfer the systems file to vegatrek, this is quite easy...
I am not sure, this might not even be a data-side issue, it might be that the engine is not turning off vertex lighting effects when per-pixel lighting is supported and enabled or something. But even in Cephid 17 the normal mapping was very apparent if you looked closely at the side of the mesh facing away from the strong vertex lighting effect. So if you do some testing in vega strike you should at least see some craters or else there is a bigger issue.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

I remember I had ported some (if not all) of the graphics techniques from VS to VT.
Check stdout/err, if you launch it with -debug=3, it will spill out its guts, including shader compilation errors and warnings.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

Probably I expect too much. When looking very close, there probably is a very tiny effect - I simply dont know what to expect. I´ve added a video with a short flight in the asteroid field. Should there be more crater effect ?
Image
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: nebulae

Post by travists »

The pock marks look fine to me, just not enough of them. That would indicate a texture not shader issue. But then I have not seen the original texture.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: nebulae

Post by klauss »

I had a neat asteroid + textures + LOD I was developing to test parallax occlusion mapping.

I wonder where I left it...
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
esgaroth
Confed Special Operative
Confed Special Operative
Posts: 317
Joined: Mon Jan 19, 2004 12:48 pm
Location: Konstanz, Germany

Re: nebulae

Post by esgaroth »

I wonder where I left it...
Folder 51 ?
Post Reply