Cloud system successfully revived!

Ask questions, discuss ideas, get answers
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Cloud system successfully revived!

Post by Swaffy »

So if we create a "spherical" 3D object for the skybox, we can have a "round" skybox?
I used quotation marks because no 3D model can be perfectly round, but appear so.

Then add the animated "cloud" texture to the sky, the cloud system, on top of the new skybox.

So if the skybox appears as "spherical" then you guys can do your fancy animated texturing work and make it appear as if it's rotating. Because it would be harder to do that with a box rather than a sphere.

I have no clue. :| Damn, I need sleep.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Cloud system successfully revived!

Post by Apache Thunder »

Pretty much. All it does is animate the texture by scrolling it across the UVmap of the mesh. So you could use the cloud mesh as the sky.

BUT, here's the thing. The bottom of the cloud mesh is NEVER visible. Anything below the zero plane gets removed and isn't displayed. So if you have something important on the bottom of the sky sphere mesh you want to use as a cloud mesh, it will not show up ingame.
ImageImageImage
I have cameras in your head!
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: Cloud system successfully revived!

Post by POTAmatt »

I just wanted to say thanks on another great discovery! It has certainly added an extra dimension to some of my moodier maps. I tried it in BFV as well, but it looks like they ripped out that subsystem entirely.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Cloud system successfully revived!

Post by Apache Thunder »

The cloud system might work in BFV still, but when I try to add a cloud system BFV always CTDs saying that the "cloud" object isn't precached. Which is impossible to do since a objecttemplate for said cloud does not exist and can not exist since it doesn't use the object template system. I tried ignoring the error in the debugger, but the end result is the clouds never showed up ingame. Seems BFV refuses to display/load anything that isn't "precached"
ImageImageImage
I have cameras in your head!
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: Cloud system successfully revived!

Post by POTAmatt »

Thanks for the confirm. That's exactly where i gave up on it before losing power from the hurricane. Hopefully, i'll be able to revisit this, and modding in general, without life, work, and mother nature getting in the way.
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Cloud system successfully revived!

Post by cajunwolf »

I remember when BFV came out there were memory issues, meaning that the game required more memory to "run well" than most gamers had or could afford at the time. I imagine that was one more thing EA hard coded and modified to use as little memory as possible to make the game playable for more people. I remember when I bought bf1942 in December of 02 I couldn't really play it until early February when my tax returns allowed me a new video card and memory. In 2005(?) myself and DACV had pre ordered BFV and once again I had to do a memory upgrade before I could play it very well. It was lack of memory that caused the bots to suck so bad when the game series first came out, but now days on a modern machine with lots of fast and cheap memory, it rocks with bots.

So Apache, I remember you doing something on the snow also. I have at least two winter maps I think I will complete and would really love to add that effect along with slowly moving clouds. My question is, (if you have a thread please point me to it) how is the snow and rain effect set up? Is it a proximity effect or emitter placed statically and cannot move, or can it be attached to something that can move, say something like the clouds? I was thinking how kewl that would be, to have rain or snow or both, depending on the maps theme hit you at random moments as you move around the map. In one map I would like it to start with the appearance of a cold freezing and rainy day down in the valley, and turn to snow as you climb in elevation. The addition of the cloud system will add greatly to the effect - atmosphere. Great find BTW, they had added clouds to DC NO Fly Zone, but I don't think they had the cloud system working like you do. They were just statics best I had remember, I will have to look and see, they might be usable.

In the mean time I need to adsorb this thread to get my around these clouds and how I am going to apply them, so kewl.

Edit: Just found your snow tutorial Apache, and thanks, you have contributed a lot to the bf community.
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Cloud system successfully revived!

Post by Apache Thunder »

Ahh yes the snow and rain effects. After I got those working I ended up using those mainly in my BFH maps. They are basically a whole bunch of emitters tied to a bundle to form a "grid" of sorts. So each area within a certain view range had it's own emitter and only one emitter was active at one time from the players view point. This was especially important with the snow fx since those used sprites. The game has a limit of around 5000 sprites at any one time. If the game goes over that, it will CTD. Particles on the other hand there is no limit. Just more = more lag. :P

I forgot who made some of the original coding for the rain fx, but that was the base I used when upgrading the rain fx and creating the snow fx. I didn't create the weather fx coding from scratch, but it is most certainly heavily modified from it's original version. :D

You can most certainly have different areas have different fx or have some fx move. The original coding simply had the same emitter object tiled across via duplicate addTemplate entries. But you can certainly introduce more unique emitters in place of repeating the same one across the grid.

You can probably put the whole bundle group on a rotational bundle and alter when and where certain weather activates. Like off and on rain that comes and goes.

An extreme example. Have some areas with snow and some areas with rain:

Image

Tile that bundle 4 times to cover an area exactly 4 times the size of the map to ensure there is no gaps during rotation. R = Rain S = Snow

You can get creative with the patterns and types of weather in each area to achive different FX while the rotation bundle pans the whole group across the map. I prefer to have the center of rotation positioned at 0/0/0 of the map instead of putting it in the middle since then you have to figure out exactly how large the combat area is and do some math and such to figure out where the center point is. So instead I just make different size groups of the weather fx bundles and for example, have a 512x512 sized bundle grid set at 0/0/0 on the map. So if you have a rotational bundle set up then you have to have 3 more of that bundle on each corner of the center point for the rotational bundle so that the total area covered by the weather fx is 4x the size of the map it's used on so that there is always an effect bundle on the combat area while it rotates. If it's on a stationary bundle, you would then only need a bundle grid that is the same size as the map.

EDIT:

Just noticed that you would need to add more on the edges so that it extends outside the combat area. Since the bundle grids are square and not a circle (a circle would be very difficult to code accurately anyway) then as the big square rotates there will be areas on the edge of the map that will end up no being under the weather grid. So tacking on some extras on the edge would ensure the map is always going to be under the rotating weather grid. Adding more then you need shouldn't hurt since only one or two single emitters are on at any one point for the player since only the area the player is in actually renders the sprites/particles. All the other emitters are inactive due to the emitter draw distance settings.
ImageImageImage
I have cameras in your head!
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Cloud system successfully revived!

Post by cajunwolf »

Kewl stuff for sure. Yea I seem to remember a long time ago someone coming up with a "sort of rain" and remember 4c mentioning it. I will have to study what you have in the thread and learn about emitters and such. I have always been more into ai and mapping than effects modding. Mainly because there were others within mods that handled this stuff and I had my hands full trying to get ai fixed or working from scratch in a whole lot of maps.

As for winter effects (map effects) I found this very interesting object created by AudioGod (from old fps forums), for a map by Augustus (fps forums and PoE) called AGM_Tundra. It is called Lake_Ice and from what I can tell it is a flat mesh with a collision that is set on the surface of the water. You stop the animation of the water and it makes a fantastic frozen lake you can walk or drive vehicles across. I have an old copy of MAX 6 I need to see if I can get going again so I can see what the thing looks like and it's size. I have no way of seeing it in either BC or ED42 because it lacks a texture. I can find a very small handle in ED42 by going under the water at the center of the lake and looking up. How would someone place this thing? I assume using the water level as elevation height and place it in the center of your lake, pond, or river. I was wondering if you could take a look at this thing, find out if I am right on how it works, and how easy it would be for a n00b like me at models to make in say various sizes. Now one of the mappers in DCX made an ice object (forget the map right off) but it was screwed up and sucked up resources so bad I had to eliminate it in SP coop mode or the map would crash. This one is fantastic to say the least. I have included the map for down load, you spawn at Axis base, lake is right behind you. It is a fun map to play and AI was added by Arc. It doesn't play that well in SP COOP for several reasons, it is a large map with to few CP's, bases to far apart, and the pathmaps need to be rebuilt. Arc and the others did not understand the smallones back then and the old method of creating and editing pathmaps with Photoshop and ED42 did not produce the best results. I plan a remake someday but it would be a large project to say the least.

AGM_Tundra by Augustus.

I also remember where I had seen or heard of the rain effect being used, it was in a couple BFV maps. The ole boy who created them was a buddy of the Arcane brother who ran the Legion of the Dragon site and I forget his name. LOG has been down for sometime but I still have those maps somewhere as I helped him add ai. I will see if I can find them.
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
cajunwolf
Posts: 115
Joined: Tue Jul 10, 2012 2:03 am
Location: Houston, Texas
Contact:

Re: Cloud system successfully revived!

Post by cajunwolf »

I just noticed your additions to your above post, interesting. I think I am seeing what you mean and yea I can see what you mean by the extras to edges as your rotating a square over a square.

Edit: I was also wondering if this grid (or a group of smaller ones) could have a plane or rocket motor added, where like the choppers we did in DCX Lost Village, would spawn in air, fly across the combat area, continue into the out of bounds area, then destruct to spawn again. You could have random waves then and would be simpler maybe than the large rotating bundle? Just a thought.
Last edited by cajunwolf on Sat Nov 10, 2012 7:34 pm, edited 1 time in total.
Image

"When you're up to your butt in alligators, you forget your original intent was to drain the swamp!"
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Cloud system successfully revived!

Post by Apache Thunder »

I happened to have made a custom ice mesh for one of my BFH map winter conversions:



There was some lag when I did initial testing. I solved that for the most part by creating a custom bounding box. The max tools allow you to use your own bounding box. I simply made one that was much smaller. Import my mesh and be sure to check the check box to include the bounding box and you will see how it is different then a standard one. By default the max scripts will make a bounding box that encases the entire mesh. (or the game does this on it's own if one is missing, not entirely sure which is the case) Large bounding boxes on a static mesh seem to contribute to significant lag when there are vehicle/projectile interactions with that mesh. If a vehicle or projectile enters the bounding box of said object, that is when the lag begins. Not entirely sure why myself, but reducing the size of the bounding box solved this for me.

The quickest way to make a correct bounding box is to import a mesh with the bounding box check box ticked, then edit the size of that box to be much smaller, then re-export and making sure to include the bounding box on export. It should help with the lag issues you might encounter when firing projectiles on the ice or driving vehicles on it.

I created that ice mesh entirely from scratch by the way. :D

EDIT:

Noticed your edit as well. Should be possible to have vehicles move across the map in that matter. Take a look at my DC Sea Rigs map . I modified the sea gulls to be PCO objects (which are basically vehicles in the eyes of BF1942) so that I could make them destructible. I put them on a rotational bundle. They are held to it via spawners and the hold object command. ;)
ImageImageImage
I have cameras in your head!
Post Reply