Discussion Size of mesh files and textures

paddy2

Addon Developer
Addon Developer
Joined
Jul 21, 2012
Messages
384
Reaction score
1
Points
18
Location
Kent, UK
As a new (and not very good) mesh "writer" I have been trying to make a mesh for a road.

I started by putting the image into the bitmap of the surface tile but as my base tile is not 512 metres wide and every tile IS 512 the images left a lot to be desired. Made a "block" 0.1 metres tall and painted the roof but can not stop it from casting shadows!! Meshs yes blocks No

All I am making is a cube and painting / texture the top. One cube with a single face textured and then copy like a mad man. It keeps the texture file size down but now the mesh file size is growing to the point of getting me thinking is it worth it.

I am using Wings3D ( please don't say use blender as I have only just got into wings!!) and the exporter works a treat.

However I end up with 512 cubes to do 256 meters of road. ( Still fine tuning the cube size / texture size.) Each one of which has 5 faces that are "not earning their money", saved 511 texture files but still end up with an ever growing mesh size. By the time I have built the base its going to have maybe 10km of road. My plan was for a number of meshs 1km, 256m, 64m, 8m well you get the idea

As the cubes are copies when I looked at the file in notepad I was struck by the shear number of times a given value is repeated. So I did a find and replace and swapped a value of 0.57735027 for 0.578, a value of 4.0000000 for 4.0 . In the end a file of 70,218 bytes came down to 54,090. At first glance the image seems unaltered but have I "reduced" the mesh or just saved 20Kbytes disk space on a 200Gbyte disk i.e. a waste of time.

If as I suspect is is all down to the number of "triangles" does anyone know to reduce the head count. The faces of the cube seem to be made of 4 triangles, could this not be reduced to two?
I don't seem to be able to do it in Mesh Wizard and Wings either can not do it, wants to convert my cubes into amazing shapes or I just can not find it in what documentation I could find.

Also it struck me as to why no one else had done some thing like this? Is it because in the end its not worth the effort...

As you have done in the past gents, can anyone offer any ideas?
 

Capt_hensley

Captain, USS Pabilli
Donator
Joined
Oct 20, 2010
Messages
841
Reaction score
0
Points
16
Location
Alamogordo
Website
www.h-10-k.com
Have you tried using the shape called a "Plane" a Planar mesh uses the most efficient means of drawing a 2D surface in a 3D world that can be textured or "painted".
 

wehaveaproblem

One step closer
Addon Developer
Donator
Joined
May 18, 2008
Messages
913
Reaction score
0
Points
16
Location
London
Website
wehaveaproblem.wordpress.com
Is there any reason why you are using blocks and not just a single surface, ie one side of a block? You seem to be wasting a lot of vertices and triangles on the bottom and sides of the road. (edit: slight repeat of above post)

Deleting redundant decimal numbers in the mesh file will reduce the size of the mesh file, but does not reduce the size of the mesh, and hence its memory demand. Removing redundant surfaces and vertexes will do that.
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
First off, I'm glad the exporter is working for you, and if you run into any issues with it let me know.

It's been a while since I used Wings, but I *think* the following will work:
- Call the side of the cube you're actually using (the one that's "earning its money") the "top"...
- Using face-select mode (f), select the "bottom" face.
- Switch to vertex-select mode (v); this will select the "bottom" vertices.
- Press the backspace key on the keyboard.

This will delete all of the bottom vertices and leave you with a flat surface, which should reduce your polygon count by 67%.

To get rid of the "bottom" face in export, you can create a material named "_exclude_" in Wings3D and apply it to the bottom face. See the readme.txt in the Wings3D .msh Exporter download for more details.

That'll leave you with only the top surface of your cubes.

However, this isn't really the best way of doing things--you'll have hairline cracks between the cubes. Your best bet would be to make larger sections of road and use a larger texture. Even if the on-disk size ends up being a bit more, it'll look a lot better.
 

paddy2

Addon Developer
Addon Developer
Joined
Jul 21, 2012
Messages
384
Reaction score
1
Points
18
Location
Kent, UK
It Works It works

Thanks so much for the quick responses, you guys never fail to amaze me.
The reason I did not use Planar is I have only just found out about them !!!!!! Actually on this very thread ( joke)
Gives me a hope I can reduce the mesh size ..... off "google"ing I go.

---------- Post added at 07:38 PM ---------- Previous post was at 07:33 PM ----------

Just read post 3 after having written my response.

This really does sound promising.

Truth is all I really want to do is pretend I can play with the big boys. Your knowledge, help and add ons, blow me away if I can still use a dated expression
............
Just had a quick go in wings and yes yes yes Bye Bye cube Hello sheet of paper. Wonder what I am doing this weekend

Again Thanks
 
Last edited:
Top