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 / Tip to stop hitting the cap.

Author
Message
s4real
VIP Member
19
Years of Service
User Offline
Joined: 22nd Jul 2006
Location:
Posted: 19th Jul 2013 14:22
As a lot of you know people hit the cap pretty fast sometimes when making there game here a little tip to help not hit it so much.

Make your map with just static items only and no characters in your map.

Add your lights dynamic and static.

run a test map.

Now add your dynamic items like characters and boxes and so on in the map, the map should not build the lightmapping again as its already baked it to the map.

Things to remember if you add another light once the characters have been added it will rebuild the lightmapping again so make sure you have your lights where you want them before adding your dynamic stuff.

This is all based on theory and have not tested this out myself so if anyone can test the method and post your results that would be great.

Hope this helps best

s4real

Pack ya games with vishnu packer its free. Vishnu game launcher is now released.
Help keep vishnu free by pledging now :- http://vishnu.chipin.com/vishnu
ncmako
14
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 19th Jul 2013 17:52
s4real
This sounds like a good tip. Ran a couple quick tests with Lab prefab, placed my lights, entities, ect. Test ran-(771 megs). Then added couple charaters (821 megs). Then moved some lights around (968 megs, big jump) Then test ran again without changing anything, back down to 821 megs. Your theory seems to work.
Planning ahead is the key here
thanks
Disturbing 13
21
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 19th Jul 2013 21:32
Awsome!, will keep that in mind.

Model pack 66-99 high quality items...cheap!!
"Who loves ya baby!"
Madcow
12
Years of Service
User Offline
Joined: 17th Jul 2013
Location: Somewhere, but not over the rainbow.
Posted: 19th Jul 2013 21:49
But what about for dynamic scenery added with segments, like doors and glasses ?

"I like to keep this handy, for close encounters."
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 20th Jul 2013 00:20
another good tip is to make multiple objects use the same texture. if you create an atlas texture of a lot of different materials you need then map multiple objects to it, you can save space by only using 1 texture for a lot of items, and not having to load a lot of textures.

Hire Me! I model, animate, cook, clean, and texture!
Burger
13
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 20th Jul 2013 02:47 Edited at: 20th Jul 2013 02:57
Is this why the size of a test game varies so much when not much has really been changed? I will definitely take this into consideration, thanks for the hint.

Quote: "another good tip is to make multiple objects use the same texture. if you create an atlas texture of a lot of different materials you need then map multiple objects to it, you can save space by only using 1 texture for a lot of items, and not having to load a lot of textures."


Hey Bugsy, do you use atlas textures, and if so how effective are they? I don't really know anything about them.

- An Instinctive Fear IndieDB page, download demo today!
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 20th Jul 2013 07:25
I use them, and they are indeed quite effective.
level 2 of kshatriya uses just a few atlas textures, the rest being regular textures. it spans roughly 3/4 of the total map size leaving only 1 quadrant more or less empty, has 3 large outdoor scenes and a few more indoors scenes and confined outdoor scenes, and the testbuild uses 1700mb at most currently. In future kshatriya episodes i'm going to experiment with using atlas textures more frequently.

Hire Me! I model, animate, cook, clean, and texture!
Disturbing 13
21
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 20th Jul 2013 13:13
The entirety of modelpack 66 is based on atlas textures, allowing for multiple buildings, and objects to use the same texture.

Model pack 66-99 high quality items...cheap!!
"Who loves ya baby!"
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 20th Jul 2013 20:29
yet another reason why i really need to buy that pack. it's something i've been meaning to do. now I have been reminded

Hire Me! I model, animate, cook, clean, and texture!
Burger
13
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 21st Jul 2013 02:09
Is there are tutorial for atlas textures? They sound useful.

- An Instinctive Fear IndieDB page, download demo today!
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 21st Jul 2013 02:29
no, but it's very simple to use them. simply create a large texture map involving all of the different materials you'd want to use to texture an object, and then when you model your entities for the map, UVmap them all to the different places on the same texture.

Hire Me! I model, animate, cook, clean, and texture!
Burger
13
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: New Zealand
Posted: 21st Jul 2013 02:50
Quote: "simply create a large texture map involving all of the different materials you'd want to use to texture an object, and then when you model your entities for the map, UVmap them all to the different places on the same texture."


Thanks for the response. As it is I'm not familiar with the whole modelling process, I may learn one day though.

- An Instinctive Fear IndieDB page, download demo today!
unfamillia
15
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 21st Jul 2013 03:05
I did have an idea of creating an entire game from one texture, thinking it would save a lot of resources.

I would be interested to know how much memory is actually saved from using Atlas Textures?

Also, what texture size would you use? 2048x2048? That way you are getting 16 512x512 grids to use. This is what i was thinking initially.

Unfamillia

[
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 21st Jul 2013 03:38
2048's pretty good. the only issue comes in when you need to make large things and small things. how much texture space you want to give to a wall can affect how nice it really looks in game, but it will also eat up space that you can use for other things

Hire Me! I model, animate, cook, clean, and texture!
rolfy
19
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 21st Jul 2013 04:33 Edited at: 21st Jul 2013 06:59
@s4real, that makes a lot of sense.

Quote: "Things to remember if you add another light once the characters have been added it will rebuild the lightmapping again so make sure you have your lights where you want them before adding your dynamic stuff."
Also, placing new segments or static enity's will force it to rebuild.


Quote: "I did have an idea of creating an entire game from one texture, thinking it would save a lot of resources.
I would be interested to know how much memory is actually saved from using Atlas Textures?"

Atlas saves on memory GPU calls as textures are loaded and unloaded during game. There are some things to bear in mind when using these in FPSC.
It's not worthwhile unless using completely custom media and planning it all out from the start, or your looking at uvw mapping all media you do use (you will be looking at doing this for all shader maps too and unless all objects use a shader of some sort then that space is wasted.
FPSC uses more than one diffuse texture for segments which are selected randomly to prevent too much repetition. You have no way to randomly select them without putting these into an Atlas too and selecting them as individual segments. In other words you will have 3-4 meshes to uv map and 3-4 fps files to create and 3-4 individual segments to place randomly by hand just to get the same result.

If you only have one model in scene which uses a particular Atlas sheet then all the other space on that texture is a waste of memory. Same goes for shader maps such as illumination which not all objects will require, since the object uv's will be placed on the shader texture sprite sheet same as the diffuse your going to have a lot of unused space on these.
Since it looks like only entity's would be worth the time and effort using these then it would be important to ensure they are always used, I reckon that FPSC would drop a whole Atlas texture if none of these entity's were in view but it would certainly be a waste of memory if only one were in view and the whole Atlas is loaded. I am not up on the code so cant say exactly how it loads and unloads textures and to be honest don't have the inclination to sit testing memory consumption to see how it does with it all. Maybe someone else has looked into it and can give some definite figures.

Of course if your not going to use shaders on any of your objects and if your sure your going to use all textures on a sprite sheet throughout the level of your game then go for it and see what results you have, but for the reasons above I dropped any sort of idea of using these in any major way in FPSC, and don't see many first or third person PC games these days which do use them (maybe back when GPU cards didn't have the memory they do now, Doom comes to mind and characters were....well...sprites). Mostly they seem to be used nowadays for mobile app games.

DX9 limit is 4096x4096.
A dds 2048x2048 texture is 2.66Mb. A dds 512x512 is 170kb, making sixteen of these 2.72Mb. A 7% file size difference for textures doesn't seem worth the extra effort when it comes to build file size. It would need to be a huge saving on GPU in game to make it worthwhile and, for me at least, to think of all that extra uv work.

Sure using the same texture on multiple objects makes sense but putting ALL textures for multiple use into an Atlas only makes sense if using all textures on that sheet in a scene and it has a major impact on GPU memory usage.
Bugsy
17
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 21st Jul 2013 07:18
I don't put textures into large atlases for everything, but I've been using atlas textures to save memory and it's been working very well so far- here's some stuff i've learned in my travels:

-If you're going to use one object with an atlas texture, use most objects that have that texture too so as not to be wasting it.

-Atlas textures do not have to be big textures. if you want to make a lot of electrical-box and wires wall decorations, and they can all look similar, then use a 512 atlas texture.

-The only shader you should be using on your atlas textures is an illuminationmap as not everything in a scene should be shadered or fpsc will lag on a lot of machines.

-if an object you make does not use an illuminated part of the texture, simply do not give it the illuminationmap shader in the fpe, or comment it out. no need to make everything shaded it it's not affected by the shader map.

-atlas textures are great for big buildings and facades. instead of stacking a zillion segments and having their unneeded backfaces exist, i model large X by X segment facades and map them all to atlas textures of a few different window segments. doing this then mapping segment meshes to the same texture saves memory

AS SEEN HERE:


-obviously- just don't use too many different segments in a map.

-some things i don't use atlas textures for, but when modelling, I make sure that before I waste resources making a new texture map for something, i make sure i couldn't map it to another object's texture. one less texture loaded is a few hundred kb saved in the build process, where every little bit counts.

Hire Me! I model, animate, cook, clean, and texture!
rolfy
19
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 21st Jul 2013 08:35 Edited at: 21st Jul 2013 08:58
We may be talking at cross purposes here, it goes without saying that re-using the same textures on many objects reduces memory but thats not the main reason for using atlas..
It sounds like your using larger textures and selecting the areas of texture as Atlas textures appear to but there is a difference.

Although artists can create these by hand its seldom done for the many reasons I gave above.
Software is generally used to pack these and a coordinate remapping table is built and loaded in the engine, it will scale and offset texture coordinates for each object to select the appropriate region of the atlas, and these are usually entirely different areas (cells) with their own uv layout/texture for each object.

What your doing isn't Atlas as such but using the same texture regions for various objects from a single large texture albeit there are different textures built into one,sounds confusing...right?.

I know this sounds picky but it's confused me when you call these Atlas textures Even if they are.....large...or not

The whole point of Atlas textures is not the saving on file size (simply re-using standard textures achieves this) but to reduce texture state changes per frame.
Wolf
18
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 21st Jul 2013 12:00
@rolfy: Sorry, he has that from me. My bad. I thought using atlas textures ment just having the same texture for a bunch of stuff.

@s4real: I will test this and get back to you! Thanks for the info.



-Wolf

http://www.serygalacaffeine.com
There is nothing outside of yourself that can ever enable you to get stronger. Everything is within. Everything exists. Seek nothing outside of yourself.

Login to post a reply

Server time is: 2026-06-09 19:36:08
Your offset time is: 2026-06-09 19:36:08