Small repeating texture, huge map file size. Not sure why.

Discuss artwork in all of its forms here, from level design to GUI button themes. New MODs planning, work-in-progress and other samples are welcome in this forum as well.
Post Reply
Tatwi
Posts: 10
Joined: 2012-08-16, 23:13

Small repeating texture, huge map file size. Not sure why.

Post by Tatwi » 2012-08-16, 23:36

Hello! I've been having a lot of fun playing with this game engine. It's fantastic! However, I lack the knowledge to understand how to resolve the issue I am having.

I would like to make an entire world that looks as though it is made out of solid black areas with blue crossed lines. The idea being that it would look like those old wire mesh only 3D games, but still have fun lighting, particle, and explosion effects.

To test out the concept, I made a 40px by 40px png file (200 Bytes large) and applied it to all the surfaces on the map using 1:1 scale. The resulting effect was exactly what I wanted (see attached screen capture), but the map size was huge (21.5MB) and I am not sure why.

The map that I made isn't very big and only has a couple of large objects in it, so I assume it has something to do with the repeating texture being stored over and over again?

Any suggestions on how I can get the desired effect in a more efficient way?

I hope for the game to be playable on Linux machines with minimal graphics hardware and RAM, so memory optimization is important to me.

Thank you again for making this amazing open source project. It reminds me a lot of UnrealEd from way back when. :)

Sincerely,

Rob Bassett
www.tpot.ca
Attachments
RobMap2.jpg
Thank you for making Cafu!
- Rob from Canada.
www.tpot.ca
User avatar
Carsten
Site Admin
Posts: 2145
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Small repeating texture, huge map file size. Not sure wh

Post by Carsten » 2012-08-17, 23:44

Hello Tatwi,
welcome to the Cafu forums! :welcome:
Tatwi wrote:Hello! I've been having a lot of fun playing with this game engine. It's fantastic!
Great to hear this! Thanks!
The map that I made isn't very big and only has a couple of large objects in it, so I assume it has something to do with the repeating texture being stored over and over again?

Any suggestions on how I can get the desired effect in a more efficient way?
Did you write a custom material shader for your repeating texture?
If so, if you have included a line like

Code: Select all

lightmap $lightmap
please remove this line, and try to recompile the map.

I guess that the large mapsize is from the lightmaps that are normally created for most materials. As for your game you won't need any, the lightmaps can be omitted entirely (at least for the repeating texture with the grid pattern), which in turn should reduce the file size.

Please let me know if this helped. :up:

Btw., that's a very nice screenshot you posted! I really love the idea, and it looks very promising! :wohow:
Best regards,
Carsten
Tatwi
Posts: 10
Joined: 2012-08-16, 23:13

Re: Small repeating texture, huge map file size. Not sure wh

Post by Tatwi » 2012-08-18, 02:35

Awesome, that fixed the issue! Thank you so much Carsten!

Funny thing happened though with my second test map. Somehow I managed to group it all together into one object last night. When I opened it today, I couldn't compile it, because it was technically considered to be just one brush lol... lesson learned!

I made a new map, significantly larger than the original and when I compiled it without "lightmap $lightmap" in the shader file it turned out be only 9KB. That is fantastic!

Lots of work/play ahead, but it should be a fun little game. It will be kind of a Sonic the Hedgehog paced movement, FPS capture the flag, with colorful little sci-fi "tanks" instead of people. If I can program it properly, I am thinking that the tanks will act like bumper cars against each other and the walls, so you'll have to shoot your enemies to kill them and you'll need to control your motions to speed along the ramps, spirals, and loops, etc.

I haven't done any mapping or C++ in many years, so this will take me a while. But it's something to do for fun. I like making things. :)

Thank you again for your help and your amazing work on this project. You've been more productive in your 34 years that I have been with mine, that's for sure. :mrgreen:

- Rob.
Thank you for making Cafu!
- Rob from Canada.
www.tpot.ca
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest