Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Research on the memory cap -> advices needed

Author
Message
Wolf
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 1st Dec 2012 23:18
Dear Community,

some of you know that Bugsy and I are working on a larger project. It is in preproduction for a while now and we start all out in 2013.
I took a couple hours to dig deep into the entire memorycap issue and came to a variety of solutions. However, some of them are still theoretical...

...and I would like to hear the opinion of some more advanced and technically talented people than I. Especially people who know off the code behind FPSC and people who are more experienced 3D modelers.

First of all: I lowered the resolution of most elements. The game will have detailed and artsy aesthetics but poorer graphics. Its a given process in an FPSC game like this.
However: What if a couple of models use the same texture? Will the texture be loaded a couple times in the buildprocess and consume as much as multiple unique textures.

Lets say I have 5 Elements of wooden furniture. Having them all use the same texture rather than having a 5 different textures would lower the memorycap siginificantly, correct? Are there any issues if I have all the items in a level source from the same texture map?

Characters are often similar with variations. What if I have soldiers whou roughly wear the same uniform have source from the same texture. Lets say its a 2048*2048 texture that include the bodytexture they all use and a couple faces and detail objects that vary...would this decrease the memorycap more than having a half dozen 1024*1024 sized textures? Would it be problematic shaderwise if a couple different meshes use the same textures? It shouldnt be, I know...but I want to be absolutely sure!

Do polygons consume a lot of memory?

Does the memoryconsumption in 1.18 and 1.19/20 differ a lot?

Do animations consume memory. Lets say I have a character who is playing a "typing" animation in a loop but does have all other animations saved in the file...does this character consume more memory than if I convert it in an entitie that only has one animation.

Is it advisable in FPSC to have lower resoluted shader maps compared to its diffuse texture?

I would really like a definite answer to these questions before I get all over this project.

Every hint is welcome! Thank you!



-Wolf

Section 812
16
Years of Service
User Offline
Joined: 24th Feb 2008
Location:
Posted: 1st Dec 2012 23:56 Edited at: 2nd Dec 2012 00:01
well from what I know:
It would seem to me that using 1 texture for multiple objects would
be good, I believe it's only loaded once.

polygons do matter in the memory department

there is a great difference in memory since 1.19

when a model is loaded, all animation is loaded with it, less animation means less mem resources. (I think)

another big memory killer would be the scripting and calling other scripts from a script.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 1st Dec 2012 23:57 Edited at: 2nd Dec 2012 00:01
Maybe, wait for FPSC-R? Sorry this hasn't answered any of your questions.

I don't pretend to be advanced or technically savvy in this area, but, what I do know is that when the game is being compiled into a stand alone each level is compiled and saved. During this compilation data is being stored in virtual memory rather than to disk so that it will be faster.

What seems to take up the most memory is light mapping. When you see "Calculating Object Light" is where the memory hits it's max. Calculating object light is dependent upon two settings in the ini file.

lightmaptexsize=512
lightmapquality=5

The default values are shown. A lot of people worry about what they see even when they are testing a small level. There is a certain amount of memory that is taken up regardless of the size. However, the size of the level will effect if there is enough memory left in order to process the light mapping. I found that if you can keep the amount of memory used, by the time it gets to that part of the processing, to 1700-1750, you can even increase the texture size to 1024 and light map quality to 75.

Before I make the next comment I would say that v120 will be the best bet to use as there as been some changes made to make better usage of memory used. That said I believe if you use v120 that you will not have any issues with memory increasing as each level is built. It pretty much resets itself before each build. Older versions have had problems with not releasing some memory and adding to each consumption for each level.

That said, I would just take a level you have currently been toying with for your new game and just play around with the parameters of the above two settings.

As far as polygons, I have no idea how they effect memory usage but I don't think there is that much usage. Textures is important and as far as model making and such, again, I have no idea.

But, to reiterate what I had mentioned in the start. FPSC-R is going forward. I would suspect betas released in about six months and maybe an initial first release by the end of next year for Christmas.

You don't' have to commit any monies but if you want the betas, you will need to do so. Otherwise just wait for the official release. The memory cap will be handled much more efficiently in that version of FPSC.

I don't know if this answered any of your concerns. You already have experience in making a great game and have used light mapping very effectively.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 2nd Dec 2012 00:24
Hi Wolf, you have the open Into the Dark files at hand, you can dig in there. The game is designed so that with the default dividetexturesize=2 and picking up all weapons, the max. memory usage in the last level is at 99% of the max. But even that resoltued in memory-related crashes. The patch lowers the memory usage by reducing some textures. So that goes straight to your first question:

Quote: "
However: What if a couple of models use the same texture? Will the texture be loaded a couple times in the buildprocess and consume as much as multiple unique textures."


It will load only once.

Quote: "Lets say I have 5 Elements of wooden furniture. Having them all use the same texture rather than having a 5 different textures would lower the memorycap siginificantly, correct? Are there any issues if I have all the items in a level source from the same texture map?"


No, but keep those which share textures in the same folder. Just to be on the safge side.

Quote: "Do polygons consume a lot of memory?"


Not THAT much. I tested a 14k poly giant terminal with a 2048*2048 texture vs a 5k reduced model with the same texture, it was around 7MB difference.

Quote: "Does the memoryconsumption in 1.18 and 1.19/20 differ a lot?"


Yes, 30 - 90MB depending on the level. 1.20 gives me the best results.

Quote: " Do animations consume memory. Lets say I have a character who is playing a "typing" animation in a loop but does have all other animations saved in the file...does this character consume more memory than if I convert it in an entitie that only has one animation. "


Yes. All animations stored in the X files are loaded. Less animations, less memory usage. But it`s not that much we are talking about...

Quote: " Is it advisable in FPSC to have lower resoluted shader maps compared to its diffuse texture?"


Definately not except for cloudy spec maps and illu maps. Lowered Normal maps give awful results.

Quote: "That said I believe if you use v120 that you will not have any issues with memory increasing as each level is built. "


This is true, but don`t forget that some memory-consuming stuff is carried from one level to another. Weapons, Scary Tinker assets e.t.c.

Even if the build process shows only 1750MB used, a player carrying many of those weapons and items will hit the RAM limit upon loading this level and crash it.

Come to where the madness is:http://www.homegrowngames.at
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 2nd Dec 2012 00:37
Quote: "This is true, but don`t forget that some memory-consuming stuff is carried from one level to another. Weapons, Scary Tinker assets e.t.c."


I knew some was carried over but I didn't know what was the worst offender. I tinker around a lot with Scary Tinker. Sorry, I had to do it. But I do love Scary Thinker stuff.

michael x
15
Years of Service
User Offline
Joined: 10th Jan 2009
Location: Cybertron
Posted: 2nd Dec 2012 00:46
you are on the right track about the textures. 2048 takes too much of the memory 1024 is better for the best of both memory and graphics. but 512 will take less memory than 1024 texture. notice how pack 53 will hog all the memory. the maps are large but yes if they use the same texture it will take the same. i have also notice the lightmap is not as bad if set on the right number. there is really a 40 mb difference with and without lightmap. the more entities ans different type of segments you use the more memory is used.and that because of their texture use. we never had this problem because our level was never so complex. but now we use more entities to give our levels that complex look. 512 texture and lower will allow you to have a larger level and the lightmap set at 25 will allow this as well. characters take a great deal of this because their texture are 1024 and higher as well weapons textures. but 1024 is good as long the texture is compress in dds format using only 512KB of memory. tga format eat up the memory taking large amounts of it. why because compress with a larger memory taking the same dds file at 512KB and making it 300mb. this is why we lose so much memory. all I have said was tested out and not in theory. which will help me in fpscR.

but if you use the same character in a level you will be able to have as many of that same character as you want. with taking any extra memory. about weapons if you use the same weapons as the characters and the character the same weapons. this can prevent load crashes for the next level save more memory.small objects like paper using 256 maps can help. dds format ready models can help in so many way then one.using mip can help with rendering and performance but without mip can save a little memory to. there is so much to explain on this but i have told as much is needed to understand.

more than what meets the eye

Welcome to SciFi Summer
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 4th Dec 2012 04:40
I haven't used FPSC in a while(waiting for Reloaded), but I'll try and give a more technical viewpoint on the memory issue.

Do polygons consume a lot of memory?

No. Polygons are represented by three 3D positions(vertices) and sometimes can be optimized depending on their structure(triangle list,triangle fan,triangle strip,etc). A 3D position is generally made up of 3 floats which are 4 bytes each. 12 bytes for a single 3D position and there at least 3 of these positions per triangle(36 bytes per triangle). A 15k poly model takes up about half a megabyte for the position data. Low-poly is better for realtime performance, but I think the issue with the lightmapping is probably awkward handling of mesh data(lots of copying or even hanging references) and the mathematical calculations performed. Even then, polygon data won't be the worst offender for memory. Color data from textures is the worst culprit( (512*512)pixels * 4 bytes per pixel = 1 MB), with 1 MB of memory taken up by a single 512x512 image.

Do animations consume memory. Lets say I have a character who is playing a "typing" animation in a loop but does have all other animations saved in the file...does this character consume more memory than if I convert it in an entitie that only has one animation.

Animations take up a lot of memory, as the keyframe information for each and every single bone at each keyframe has to be loaded into memory and as such the memory footprint explodes when keyframes are added. DBP also has a performance issue with lots of bones.


I think that the best way to save memory during the build process would be to keep large textures at a minimum on static geometry, and also try to use animations as sparingly as possible.

Defy
FPSC BOTB Developer
VBOTB Developer '09
16
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 4th Dec 2012 11:20
Hey Wolf, how u been.
Im keen to jump in here and have a go at remembering certain things I was working around and or solutions.
Above comments are a greta insight and well put, texture size and complex model animations i.e. AI models are one of the main causes thats for sure in game run time rather than a build issue. However before I go any further I have a couple of questions first.


What is the big problem your trying to overcome?

Memory cap on final build?

lag - framerate drop on a single level?
i.e. general slow down with more assets added. or coming to a hault with random lock down in frame rate.

Being able to have more than a few levels in the final compile?


If I can think of more I will add, however if you can add your thoughts more in detail of the hurdle you both may be having a problem with or thinking may arise let us know.

Defy.

Wolf
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 5th Dec 2012 10:18
@Flatlander:
Quote: "Maybe, wait for FPSC-R? Sorry this hasn't answered any of your questions."


I am! And isn't it promised to be backwards compatible?
To be honest, while FPSCreator Reloaded is an obvious elephant in the room whenever I overlook my more serious projects (one day I'll release one...I just know it!) but its also still pretty theoretical for me. To specify: I don't know wether or not Fpscreator Reloaded will be all that has been promised so Bugsy and I are doing the prologue in the old Fpscreator. Fpscreator Loaded.

Quote: "What seems to take up the most memory is light mapping. When you see "Calculating Object Light" is where the memory hits it's max. Calculating object light is dependent upon two settings in the ini file. "


Thats fine! I have a perfect solution for that already but had to promise to keep it below the radar. I didn't follow recent development though but I think its integrated in 1.20 already but don't know for sure.

Quote: "
Before I make the next comment I would say that v120 will be the best bet to use as there as been some changes made to make better usage of memory used. That said I believe if you use v120 that you will not have any issues with memory increasing as each level is built. It pretty much resets itself before each build. Older versions have had problems with not releasing some memory and adding to each consumption for each level. "


That is very helpful! Thanks Flatlander.

Quote: "You already have experience in making a great game and have used light mapping very effectively."


Thank you!

@MichaelX:
Quote: "2048 takes too much of the memory 1024 is better for the best of both memory and graphics. but 512 will take less memory than 1024 texture."


True! However, these are really High-end texture sizes. If you know a little about aesthetics and basic texturing I would suggest to use 512*512 as a default... maybe even lower if possible. For the game I work on with Bugsy I even have some props using 128*128 sized textures. Its a lot about how you use it. I'm aware thats a tough sacrifice to make in 2012, the age of high definition gaming and next gen engines approachable for everyone...we just have to remember that we are not working in one and we desire to create an athmospheric game and can't afford to sacrifice too many detail props.
My point is that your post felt alot like you use 1024*1024 textures as a default and I think it might be good idea not to

@Dar13:

That clears up a lot! Thank you

@Crazy Ivan: Thanks for the reply! It was short and informative However:

Quote: "Definately not except for cloudy spec maps and illu maps. Lowered Normal maps give awful results."


If you use them to give polished tiles a little depht you get good results. BUT the normalmap needs to have only the tiling present. Any details such as little cracks etc. will produce ugly pixel artifacts (naturally). I use 128*128 shadermaps in our game on a variety of props. So far I got surprisingly acceptable results.
(maybe it gives you some idea for into the ...ice. You never know. I did however attach a screenshot of some tiled textures with ultra lowresolution shadermaps to this post)

Quote: "This is true, but don`t forget that some memory-consuming stuff is carried from one level to another. Weapons, Scary Tinker assets e.t.c.
"


I figured! Thats why I had in mind to remove the weapons occasionally between assignments. That way there are always only 3 to 4 weapons to load.

Quote: "
Even if the build process shows only 1750MB used, a player carrying many of those weapons and items will hit the RAM limit upon loading this level and crash it."


... thats new information too. Its so much fun making these games isn't it?

@Defy:
Quote: "Hey Wolf, how u been."
Still alive and swingin'

Quote: "What is the big problem your trying to overcome?"


The ridiculous content limitations per level that do not allow you to create level that last a certain amount of time even if you know how to solve it exactly. Having more models, props, sounds etc. in the game. Making a game thats a legit shooter and not some claustrophobic puzzle-horror-game where you have to look for some key in 4 barely lit rooms just to unlock the next loading screen.

Quote: "lag - framerate drop on a single level?"


I don't mind an occasional lagspike... and I'm pretty good at partitioning levels and spawning enemies at the right time to prevent that from happening. so no... no complaints there.

Quote: "Being able to have more than a few levels in the final compile?"


I can build them one by one and string the together later, thats not that big of a problem. Any insight would be appreciated.


* * * * * * * * * * * * * * *

Recent findings:

Low res texturing and having multiple assets source from a single texture work well and give splendid results.
Low res shader maps CAN be used but nor for everything. Specular maps can be very lowe res but need to be smooth and clowdy, otherwise the reflections are ugly pixels. being subtile is key here.
Characters sourcing from a single texture map is great but a lot of work to adjust the props.
Large, High poly objects tend to ignore lightmapping and cause problems collisionwise.
Collisionmodels have a strong impact on the framerate and you can boost it with simplified collisions. Most objects actually work best with boxcollisions. Really! I do however not know if it impacts the memory used... so here are some new questions:

Do the collisionsettings (polygonal, spherical, boxic...etc.) affect the memory used?
If I have a weapon as a static item, does FPSC sitll load in the entire gun?
Does FPSC use all DirectX files flawlessly no matter the conversion? Can it be a compressed file?
Do really low res textures get loaded flawlessly? Lets say I use some wires that are red and very small, would a 1*1 resoluted texture cause any unforseen problems?

Thanks! You guys have been great so far.



-Wolf

Attachments

Login to view attachments
Defy
FPSC BOTB Developer
VBOTB Developer '09
16
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 5th Dec 2012 11:15
Going to sit back and have a good read and go through some old notes I was able to save, it's been awhile.
I'll let u know if I come up with anything.

Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 5th Dec 2012 11:24 Edited at: 5th Dec 2012 11:32
Greetings Wolf, here are some of my findings; some echo others.
*Keeping animation to a minimum is definitely good. I'm personally setting up all my characters with only the animations needed. I used this method back in v1.03 and had some of the best results at the time when 30 fps was tops.
*Elimination of needless bones helps as well. If you seriously don't need a toe bone get rid of it, same with any other bone not being used in custom models. I used to be forced to add one bone in all my modeled buildings due to milkshape constraints;now I import into Fragmotion and export from there with no bone attached to the building and have tremendous results.The buildings in MP66 are somewhat high poly but I never dropped below 60 fps due to no bones and I use 1.19.( and that was with at least 4 talkers on the scene, and filling 2/3rds of the usable map space)
*I also use one texture for multiple models, so I think you are on the right track there.
hope that helps.

RelMayer
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: France
Posted: 5th Dec 2012 11:50
FPSC supports compressed X Models, i've gave it a try some time ago and it worked very well, the model ( a character ) was less bigger in size but i haven't noticed any performance loss or boost...

Excuse my grammar errors, I'm French.
Defy
FPSC BOTB Developer
VBOTB Developer '09
16
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 5th Dec 2012 13:36 Edited at: 5th Dec 2012 13:49
Back.
First Im going to drop in a convo I had back in 2009 with Magrand I found. Alot of members including u Wolf know this stuff, yet added for others for random reading...lol It may not apply however and Im not sure whats changed with recent engine updates. Though I would drop it in.
Hope u dont mind.


Mark says:
i got so much errors with virus, loading textures error initialising psyshics errors. Sometimes texture error and sometimes physic.
Defy says:
custom media? or re-edits of the sdk?, model packs?
Mark says:
custom
Defy says:
I noticed with the newer updates some media will test fine by itself, or with limited content. though when you add more detail.. a selected enitiy can trigger a error mainly due to the intensity of the object. faces, and or texture. Its a very strang glitch, here is some suggestions.
Once you get to a 0_0 error or something, it has alot to do with a enity, no matter where it is placed. I think a complex entity and/or texture can make the engine spin out. I had to scrap some I wanted, and run with more straight edge ones.
I had a hill entity, and even though I remade it a few different ways. static, dynamic, different texture. It seems the model itself, didnt work in a complex level design.
A glitch found 2 years ago, the editor thinks the model is still there when removed, like written into the code. and still makes the error, or lags out the level. I had one level near the end of completion. I added a few models. then a finishing threads errored appeared. because I made a save, tried one model at a time. test each go. Until I worked out which one played up. and scrapped the media. and replaced it with something else.
Mark says:
cool
Defy says:
Also the collision error, can be from a entity placed to close to another when light is added from random tests over time. Its trial and error. I found after light testing, more lights indoor can be faster loading, than less lights outdoor. though if you have shaders, shadows present, lights are rendered on the directions hitting models and back and forth of segments. like arrows or something, not really sure.
A complex entity, works nice by itself, add heaps around it, and boom. something may tweak.


Ok onto Textures.
I will be droping in various content here from other sources, however I will add links.


Quote: "I suggest you always use DXT 1 for your textures unless they have alpha (no RGB quality difference, so smaller files). Use DXT5 for alphas unless it's a simple alpha (uniform transparency, with a few shades), in which case use DXT3. -Avid"


Quote: "saved in DDS, DXT1-5 recommend DXT3 for no alpha, DXT5 with alpha using floating point NOT integer colours (this is so shaders can work better, especially HDR which really requires light-indexing and saves per-shader conversion) as these sit smaller in memory than ARGB/XRGB 32bit in memory

also highly recommend DDS with 3-6 MipMap Levels (depending on original size) and also use a Triangle Filtering for compression, as it comes out better quality and also produces higher quality with Bilinear or Trilinear Filtering. Aniostropic will ignore it, but then DBP doesn't support that so doesn't matter. In-fact I'm fairly sure it still only uses Bilinear.

You don't want the DBP Engine to take over MipMapping, EVER. It takes up far more space than it needs to; defeating the point. Not to mention their mipmap engine is truely crap quality.. it's right up there with Ogre3D which flips quite abruptly and becomes quite reminiscent of late 90s games when this technology was "new" - Raven"


Quote: "Quote: "Also of note is that FPSC automatically converts the textures to .dds format."

DDS itself, supports a buttload of formats.
It defaults to ARGB 32-bit (A8R8B8G8), and I'd be surprised if anyone at TGC had the common sense to change this default behaviour.. or feel it was worth their time using D3DX to convert them to DXT1-5 formats instead, that load quicker, run leaner and just do a better damn job than most engines texture systems for the advanced features as they're directly being done via the graphics card and api.

if FPSC detects a DDS is already in use it just copies it, so believe me creating them in that format to start with using the nvidia dds tools is just freaking invalueable.

especially when you consider:
an A8R8G8B8 512x512 DDS will take roughly 3s to load/commit
the same texture with pre-set mipmaps, filtering in DXT5 format will take <1s to load.

When we're talking the amount of media that FPSC loads on even a simple couple of room games we're looking at dropping loading time doing it with pre-set DDS over DBP DDS of almost 1/4 of the time, if not more.

This can mean the difference between a game loading in 10minutes and in 2.5minutes! - Raven"


http://forum.thegamecreators.com/?m=forum_view&t=114462&b=24


Quote: "The texture has to be in .dds format and no compression should be used. If you do use compression only dxt1 or dxt5 should be used. - FPSC google code."



This next section is for Celestia, however it has some good info that may apply.
Quote: "The pixels are assumed to be square. This size restriction is built into the design of most graphics chipsets. Display packages that allow surface textures with other sizes actually have to rescale the images before they use them. It's better to design your images at an appropriate size to begin with. This provides better performance and prevents loss of detail due to scaling."

Quote: "DXT1, DXT3 and DXT5. DXT1 is the smallest. It contains only a single highly compressed picture. much like a JPEG image. DXT3 contains two somewhat compressed texture maps: the primary image and an Alpha channel. It's often used instead of a PNG file. A DDS file created in DXT1C or DXT5 format can contain multiple texture images. These "Mipmaps" in a DXT file are at progressively lower resolutions and can be created automatically by the NVDXT utility. The graphics hardware will use the image which is at the appropriate resolution for the size that the object is being shown on the screen. This results in better performance for objects that occupy fewer pixels."

http://www.lns.cornell.edu/~seb/celestia/textures.html#1.0

Quote: "DXT is a lossy compression based on packing pixels into 4x4 blocks with paletted colors and interpolated colors. This results in an 8:1 DXT1 and 4:1 DXT5 constant compression file size. Since video memory and texture pool resources are fixed for a specific platform and hardware, a balance must be struck between texture resolution and resource usage. The following table lists the texture memory requirements for DXT1 and DXT5 textures at various common resolutions with full mips (1x1 up to full native mip0). Note that the memory requirements are near-constant multiples of the texture resolution ratio, and that DXT5 textures require near-twice the memory of their DXT1 counterpart.
Since the resolution to compression ratio is a constant, to calculate the memory requirements for a texture resolution not listed here simply multiply the resolution ratios. For example, a 1024x512 texture would be one-half the memory requirements of a 1024x1024 texture.
The table data was compiled from textures created by ATI's Compressonator using Box-Filter mip generation and DirectX Texture Compression."

http://udn.epicgames.com/Three/TextureSupportAndSettings.html
Go to this link for a great chart on memory size for DXT1 & DXT5

Quote: "What is mipmapping?

Smaller versions of the image will be created in order to make the thing look correctly at a very small size. The image is divided by 2 over and over to make new images.

So, imagine a 256x128 image. This would have smaller versions created of dimensions 128x64, 64x32, 32x16, 16x8, 8x4, 4x2, 2x1, and 1x1.

If this image was 256x192, it would work fine until you got down to a size of 4x3. The next smaller image would be 2x1.5 which is obviously not a valid size. Some graphics hardware can deal with this, but many types cannot.
Some hardware also requires a square image but this isn't very common anymore."

http://gamedev.stackexchange.com/questions/7927/why-would-you-use-textures-that-are-not-a-power-of-2
Above, Raven mentioned try not to access MipMapping.


Quote: "Summary:
DXT Compression is useful for:
Scenes with many large texture files that need to remain in memory
Internet delivery with small filesize

DXT Compression is NOT useful for:
Images that must look very clean or remain lossless
-------------------------------------------------------------------

DXT1 has an 8:1 compression ratio and is useful for:
Diffuse maps
Specular maps
"Clip Alpha" foliage (provided it works in the BGE)

DXT1 is NOT useful for:
Normalmaps
Smooth Alpha maps
-------------------------------------------------------------------

DXT5 has an 4:1 compression ratio and is useful for:
Normal maps
Alpha
Any other map (though it is a larger file than DXT1)

DXT5 is NOT useful for:
Images requiring high visual fidelity "

http://blenderartists.org/forum/showthread.php?154090-DDS-Texture-compression-resources


http://en.wikipedia.org/wiki/S3_Texture_Compression
Article on DXT compression.
http://www.fsdeveloper.com/wiki/index.php?title=DXT_compression_explained
Another great read on compresion in DDS.


Alot of this may be pointless info for u, however I found it interesting enough to add just in case others wanted links etc.
Great posts from the 2 above me
Defy

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 5th Dec 2012 14:58
Very interesting thoughts and links. I knew many of statements and opinions already, something was new to me.

Come to where the madness is:http://www.homegrowngames.at
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 5th Dec 2012 20:23
Do the collisionsettings (polygonal, spherical, boxic...etc.) affect the memory used?
They affect the physics system, so it could use more memory in the generating physics section of the build. Otherwise collision models shouldn't adversely effect build memory.

If I have a weapon as a static item, does FPSC sitll load in the entire gun?
It will load it in as it would an entity, not as a weapon.

Does FPSC use all DirectX files flawlessly no matter the conversion? Can it be a compressed file?
As long as the DX files are formed properly, then yes they will use it properly as FPSC uses DBP's Load Object command which in turn uses the DirectX SDK command for loading DX meshes.

Do really low res textures get loaded flawlessly? Lets say I use some wires that are red and very small, would a 1*1 resoluted texture cause any unforseen problems?
Perhaps. DBP has a tendency to force textures into a power of 2. If you have any detail it'll be blurred.

kingofmk98
12
Years of Service
User Offline
Joined: 30th Jul 2011
Location: Everywhere
Posted: 6th Dec 2012 00:11
Wolf i know this is a little off topic but when FPSC:R comes out you should total redo Euthanasia. One of the best FPSC games ive played.

http://fpscfree.webs.com/
Donations to the site are welcome. Your donations will be used to upgrade the site. Donations are only 2 dollars.
michael x
15
Years of Service
User Offline
Joined: 10th Jan 2009
Location: Cybertron
Posted: 6th Dec 2012 01:10
Quote: "My point is that your post felt alot like you use 1024*1024 textures as a default and I think it might be good idea not to"


@wolf no I dont try to use 1024 or go higher. I only meant that other model packs or custom pack I have gotten or bond1 characters or pack 53 use this high end textures for their models. I on the other hand will change or lower some models not all depending on size. but what you said to me I agree we are on the same page about that.your segment packs I have use 512 which is great but bond1 zombies use 1024 or 2048 and when you lower them it shows. so his models I pass as is. but the memory cap is not much of my problem anymore since I discover this. I only explain my understanding of why memory is being use up quickly. out of everyone here I do not plan the bring old maps to FpscR. it will be a fresh start for me.

more than what meets the eye

Welcome to SciFi Summer
Defy
FPSC BOTB Developer
VBOTB Developer '09
16
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 6th Dec 2012 10:03 Edited at: 6th Dec 2012 11:15
Great posts above.

Just going to continue where I left off.

Quote: "We would have actually run into problems with a lack of video memory many years ago, if it wasn't for something called compression. A single 128 x 128 texture, in 24 bit colour (8 bits for each channel), is only 48kB in size but a 1024 x 1024 "alpha" texture (some of it is transparent) can be as large as 4MB! Fortunately, textures can be compressed without losing too much of their original detail and they can be squashed up to 8 times smaller. There are different types of textures, though, and not all compress without causing problems - one culprit in particular is called a normal map.

These are used with the "base" texture (the surface of a wall, for example) to make them look rougher or have more detail; they also tend to be pretty big too. Normal (or bump, or parallax) mapping is ubiquitous in 3D games today and quite often a game has several texture maps for a single surface"


Quote: "The most common side-effect is something called "texture thrashing" - if there isn't enough onboard memory to store all of the textures needed, then some will remain in the system memory. When the graphics processor wants to use them, it copies them across into its RAM, deleting other stuff to make room. Cue a spot of stuttering or slow down in the frame rate; this is because it takes quite a bit longer to swap textures around than just accessing them in the onboard (or to give it the correct name, local) RAM.

Some graphics cards, mostly low-cost, budget models, only have sufficient local memory to store rendered frames and a few other bits and bobs: nearly all of the textures remain in the system memory. One might think that this is a stupid idea but budget cards are low in performance (compared to their high end relatives) anyway, so there's no point in slapping on several hundred MBs of high speed GDDR3, when the rest of the card will just slow things up. However, if you're an enthusiast gamer, and you want the best possible performance with greatest of visuals, then you want to avoid running out of VRAM."

http://www.yougamers.com/articles/13801_video_ram_-_how_much_do_you_really_need-page2/

Texture files can require a large amount of memory -- potentially many megabytes each -- and a game may display dozens of them at once. Reading the textures from the hard drive, or even the system's memory, before processing each image would result in lag, so the graphics card must store active textures in its own memory.


Seen how collision has been mentioned, I'll add some points here also.

Rolfy post, its fpsc related and a good read.
http://forum.thegamecreators.com/?m=forum_view&t=197834&b=21


Quote: "Collision with static meshes, however, can require some optimization, simply because of the large number of triangles involved. The main job here is using simpler shapes for collision than for graphics. There are 2 reasons for doing this:
• Faster. With the number of triangles now in a level, using just the graphics triangles for collision can get really slow.
• Smoother. It can be really annoying to get 'snagged' on some small graphical detail in the middle of a firefight!"

http://udn.epicgames.com/Two/CollisionTutorial.html
UDK tut, however has some good info that address's collision.

Quote: "For dynamic entities the value 0 specifies polygons, 1 specifies boxes and 2 specifies reduced polygon shape (made from boxes). You can also specify 3 for cylinder shapes and 4 for a rough sphere. For static entities the polygons are always used and so special attention should be made to ensure static entities would not cause the static entities to push the player out of the scene or cause erratic behaviour. A special trick to setting up a large static entity as a box shape is to create the entity as dynamic, but set the ISIMMOBILE flag to one to ensure it never moves. You can then set the collision mode to 1 to set the whole entity as a box. - FPSC GOOGLE CODE"



From what Ive been reading, overlapping static objects with collision is not a great idea. I remember from playing some games, it was like a complete transparent wall was blocking my way when trying to get to a certain area (like computers against a wall, etc.) This may have something to do with what I mentioned above in another post with shaders.
It may just been the object placement too close to each other with overlapping collision and or both. Just an idea, I may be wrong.
It looks like Box would be best in terms of faster speed, however if the model is a statue with a arm, your not able to walk under it. Maybe some testing is at hand.

Also on the texture size, I keep reading a medium size is good. Such as 256x256 or 512x512, due to the downscale and up scale properties.
i.e. 256x256 can scale down to 128x128 and up scale to 512x512 for example. However Im not sure if or how upscaling works in fpsc.

One other thing I thought I might add was Trigger zones for AI.
I found adding triggers caused frame rate drops and/or Ai not responding when using too many compaired to 2 or 4, or none at all. Im not sure whats changed with recent updates/versions. However I was at a point where I wouldnt use them at all for AI, unless I had to.


Anyway I'll be back later. Great work guys, really good posts.


2 more good links and pictures on collision.
http://content.gpwiki.org/index.php/Polygon_Collision

http://rbwhitaker.wikidot.com/collision-detection

Login to post a reply

Server time is: 2024-04-19 05:26:00
Your offset time is: 2024-04-19 05:26:00