Join also our Discord channel! Click here.

.aem (Android games)

Post questions about game models here, or help out others!
Post Reply
Posts: 137
Joined: Sun Apr 11, 2010 7:46 pm
Has thanked: 8 times
Been thanked: 6 times

.aem (Android games)

Post by TomWin » Fri May 23, 2014 3:21 pm

I found in couple of android games, .aem extension

I upload model from Sport Cars Challenge

User avatar
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 303 times

Re: .aem (Android games)

Post by Chipicao » Fri May 23, 2014 9:49 pm

I researched Sports Car Challenge a long time ago, but the format is stupid. Every triangle is separated from the mesh; there are no triangle strips, only single triangles. So the mesh ends up having lots of redundant vertices.
Whoever made this was either on drugs or didn't know what they were doing.
Plus the meshes aren't very good anyway, low details and lots of smoothing issues.
Image Image Image

Code: Select all

aemFile = getOpenFileName "Open mesh" types:"aem mesh file (*.aem)|*.aem"

f = fopen aemFile "rb"

fseek f 24 #seek_set
numinds = readlong f #unsigned

farr = #()
for i=1 to numinds/3 do
	i1 = readshort f #unsigned
	i2 = readshort f #unsigned
	i3 = readshort f #unsigned
	append farr [i1, i2, i3]

varr = #()
for i=1 to numinds do
	vx = readfloat f
	vy = readfloat f
	vz = readfloat f
	append varr [vx, -vz, vy]

tarr = #()
for i=1 to numinds do
	tx = readfloat f
	ty = readfloat f
	append tarr [tx, ty, 0]

narr = #()
for i=1 to numinds do
	nx = readfloat f
	ny = readfloat f
	nz = readfloat f
	append narr [nx, -nz, ny]

carr = #()
for i=1 to numinds do
	r = readfloat f
	g = readfloat f
	b = readfloat f
	a = readfloat f
	append carr [r * 255, g * 255, b * 255, a * 255]
fclose f

max modify mode
with redraw off
	amesh = mesh vertices:varr faces:farr
	meshop.setMapSupport amesh 0 true
	for i = 1 to numinds do setVertColor amesh i carr[i]
	meshop.setMapSupport amesh 1 true
	setMesh amesh tverts:tarr
	for face = 1 to amesh.numfaces do setFaceSmoothGroup amesh face 1
	select amesh
	addmodifier amesh (Edit_Normals ()) ui:off
	amesh.Edit_Normals.MakeExplicit selection:#{1..nArr.count}
	EN_convertVS = amesh.Edit_Normals.ConvertVertexSelection
	EN_setNormal = amesh.Edit_Normals.SetNormal
	normID = #{}
	--apply normals
	for v = 1 to nArr.count do
		free normID
		EN_convertVS #{v} &normID
		for id in normID do EN_setNormal id nArr[v]
	collapseStack amesh
	max select none
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.

Posts: 320
Joined: Mon Apr 26, 2010 6:51 am
Has thanked: 95 times
Been thanked: 13 times

Re: .aem (Android games)

Post by huckleberrypie » Sat May 24, 2014 2:07 am

Asphalt 8 and Real Racing 3 had way better models than this lol.

Post Reply