An-Cadsolutions      Imgsystems

Kirjoittaja Aihe: Flashin testausta  (Luettu 4868 kertaa)

xcx

  • Administrator
  • *****
  • Viestejä: 2278
  • Sukupuoli: Mies
    • Profiili
    • Verajankorva.com
    • Sähköposti
Flashin testausta
« : Maaliskuu 26, 2007, 10:15:51 am »
Peligraffaosio kumisee tyhjyttään, joten postataan tänne flash 3d-enginen alkuni. Oikeastaan paljoa pidemälle en flashilla pääse, kun tehot eivät tahdo riittää. Parin sadan facen malli alkaa tökkiä jo todella pahasti, mutta kuutio pyörii hyvin :). Tarkoitus tällä olikin testata flashin tehoja pyörittää 3d graffaa.

http://www.verajankorva.com/temp/flash/GnosisENGINE7/gnosisENGINE.html

Teksturemappaus toimii samaan tapaan kuin Sandy3D:ssä tai Papervision3D:ssä. Eli skewataan kuvaa sopivasti. Oikeaa rasterointia ei tehdä, koska se on AS2:lle aivan liian raskas operaatio eikä tuota hardware tukea löydy flashille :). Ongelmana tietysti on ettei tekstureita voi näin perspektiivikorjata :( eikä myöskään voi tehdä kunnollista zbufferia. Koodi on edelleen varsin optimoimatonta ja uskoin saavani tuon pyörittämään 500-1000 polya kohtuullisella frameratella, kun saisin tehtyä mielessäni olevat optimoinnit. Siltikin ongelmana olisi nopeus. AS3 mahdollisesti korjaa asiaa ainakin hiukan, mutta siirrytään siihen kun retail versio ilmestyy. Jos joku haluaa nuuskia koodia niin tuossa on sorsaa.

http://www.verajankorva.com/temp/flash/GnosisENGINE7/gnosis.zip

Malli expotteri maxille myös löytyy, joka tekee xml muodossa olevia 3d malleja joita tuo suostuu näyttämään. Exportteria ei kyllä ole minulla mukana tässä, joten voi postaa sitä mukana.

Koodi on kaikkien ihan vapaassa käytössä. Saa varastaa ja muuttaa ja myydä ja jne. jos siltä tuntuu :). Varsin mukava projekti tämä on kuitenkin ollut vaikkei nopeus päätä pääse huimaamaan. Flash vain onnistuu potkimaan persiille vähän joka kohdassa ja kuka saat....na on keksinyt että flashissa tiedostot luetaan omissa threadeissa! Kai se sitten sopii nettiin tai jotain, mutta pelkkää riesaa siitä on ollut tähän asti. Yritä nyt sitten lukea tiedostoja oikeassa järjestyksessä kun kakki tiedostot alkaa tunkea muistiin samaan aikaan :(. Saahan tuon kierettyä turbohaksokikkailulla.
Anyways. Jos jollain on über ideoita saada tuo nopeemmaksi tai parantaa sitä jotenkin niin pistäkää toki ideoita threadiin.

FPS mulla kuution kanssa 50fps, koneella AMD64x2 4200+, GeForce 8800 GTX, 2Gt.
Technical Artist - Remedy Games
http://www.verajankorva.com

yardan74

  • Full Member
  • ***
  • Viestejä: 220
  • Sukupuoli: Mies
    • Profiili
    • Sähköposti
Vs: Flashin testausta
« Vastaus #1 : Maaliskuu 26, 2007, 01:31:50 pm »
Täällä fps ~37 Ihan jouhean näköisesti pyöri se kuutio vielä.. Tuossa on vähän tietojakin jos niistä mitään apua on..

Win XP
AMD Sempron 2600+  512Mt
GeForce 4MX (integroituna)

(= tarviin uuden koneen ennen pitkää)


..Tämä on harrastus..

diffa

  • Hero Member
  • *****
  • Viestejä: 501
  • Sukupuoli: Mies
  • Code/Art/Design
    • Profiili
    • Sähköposti
Vs: Flashin testausta
« Vastaus #2 : Maaliskuu 26, 2007, 01:39:12 pm »
mulla FPS ~63 ja koneena oli :  intel E6600,2G,Geforce 7800GTX

Jaztee

  • Jr. Member
  • **
  • Viestejä: 63
  • Sukupuoli: Mies
    • Profiili
    • Sähköposti
Vs: Flashin testausta
« Vastaus #3 : Maaliskuu 26, 2007, 02:49:28 pm »
Jokuhan teki joskus sen Eight legged Freaks pelin flashille jossen ihan täysin väärin muista ja oli ihan 3D, ei se kyllä mikään hieno ollut mutta kuitenkin.
Hienoa työtä.

3Dolphin

  • Administrator
  • *****
  • Viestejä: 389
  • Sukupuoli: Mies
    • MSN Messenger  - petterihongisto@hotmail.com
    • Profiili
    • Henkilökohtainen kotisivu
    • Sähköposti
Vs: Flashin testausta
« Vastaus #4 : Maaliskuu 26, 2007, 08:59:09 pm »
Win Vista Business 32 bittisenä
core duo 2,1 +2048Mt
GeForce 7300 GT (MS ajureilla)

~65 fps

xcx

  • Administrator
  • *****
  • Viestejä: 2278
  • Sukupuoli: Mies
    • Profiili
    • Verajankorva.com
    • Sähköposti
Vs: Flashin testausta
« Vastaus #5 : Maaliskuu 27, 2007, 08:59:20 am »
Toinen testi kappale mikä testaa samalla zsorttia.
http://www.verajankorva.com/temp/flash/GnosisENGINE8/gnosisENGINE.html

Ja tossa exportter scriptiä maxiin

Koodia: [Valitse]
---------------------------------------------------------------
-- Gnosis export
--
-- Export selected model as Gnosis format.
--
-- 3.0
-- * Write model data as XML format. Version 2 and 1 write
--   model data as custom gml ascii format
--
-- FileFormat v1
-- * Vertex Data
-- * Face Data
--
-- FileFormat v2
-- * Vertex Data
-- * Face Data
-- * Normal Data
-- * UV Data
--
-- FileFormat v3
-- * Vertex Data
-- * Face Data
-- * Normal Data
-- * UV Data
--
-- http://www.verajankorva.com
---------------------------------------------------------------

-- Functions
GExport = -1
GExport_V1 = -1
GExport_V2 = -1
GExport_V3 = -1

---------------------------------------------------------------
-- Export model
---------------------------------------------------------------
fn GExport _o _v =
(
case _v of
(
1: GExport_V1 _o
2: GExport_V2 _o
3: GExport_V3 _o
default:messageBox ("Error!\nCan not write version "+(_v as string))
)
)
---------------------------------------------------------------

---------------------------------------------------------------
-- Version 3 fileformat
---------------------------------------------------------------
fn GExport_V3 _o =
(
o = _o
f = GetSaveFileName "Save Gnosis Model" types:"*.xml|*.xml"

if f != undefined do
(
file = createFile f
format "\n\n"
sName = o.name
iVertCount = o.vertices.count
iFaceCount = o.faces.count
iTVertCount = getNumTVerts o
format "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" to:file
format "<GnosisModel>\n" to:file
format "\t<Version>3</Version>\n" to:file
format "\t<ModelName>%</ModelName>\n" sName to:file
format "\t<VertexCount>%</VertexCount>\n" iVertCount to:file
format "\t<FaceCount>%</FaceCount>\n" iFaceCount to:file
format "\t<TextureVertexCount>%</TextureVertexCount>\n" iTVertCount to:file
format "\t<VertexData>\n" to:file
for i=1 to iVertCount do
(
format "\t\t<Vertex%>\n" i to:file
format "\t\t\t<index>%</index>\n" i to:file
v = Point3 (o.vertices[i].pos.x) \
(o.vertices[i].pos.y) \
(o.vertices[i].pos.z)
format "\t\t\t<x>%</x>\n" (v.x) to:file
format "\t\t\t<y>%</y>\n" (v.y) to:file
format "\t\t\t<z>%</z>\n" (v.z) to:file
n = getNormal o i
format "\t\t\t<Normal>\n" to:file
format "\t\t\t\t<x>%</x>\n" (n.x) to:file
format "\t\t\t\t<y>%</y>\n" (n.y) to:file
format "\t\t\t\t<z>%</z>\n" (n.z) to:file
format "\t\t\t</Normal>\n" to:file
format "\t\t</Vertex%>\n" i to:file
)
format "\t</VertexData>\n" to:file

format "\t<FaceData>\n" to:file
for i=1 to iFaceCount do
(
aFace = getFace o i
format "\t\t<Face%>\n" i to:file
format "\t\t\t<index>%</index>\n" i to:file
format "\t\t\t<a>%</a>\n" (aFace[1] as integer) to:file
format "\t\t\t<b>%</b>\n" (aFace[2] as integer) to:file
format "\t\t\t<c>%</c>\n" (aFace[3] as integer) to:file
n = getFaceNormal o i
format "\t\t\t<Normal>\n" to:file
format "\t\t\t\t<x>%</x>\n" (n.x) to:file
format "\t\t\t\t<y>%</y>\n" (n.y) to:file
format "\t\t\t\t<z>%</z>\n" (n.z) to:file
format "\t\t\t</Normal>\n" to:file
format "\t\t</Face%>\n" i to:file
)
format "\t</FaceData>\n" to:file

format "\t<TextureVertexData>\n" to:file
for i=1 to iTVertCount do
(
tv = meshOp.getMapVert o 1 i
tv[2] = 1.0-tv[2]
format "\t\t<TextureVertex%>\n" i to:file
format "\t\t\t<index>%</index>\n" i to:file
format "\t\t\t<u>%</u>\n" (tv[1]) to:file
format "\t\t\t<v>%</v>\n" (tv[2]) to:file
--format "\t\t\t<w>%</w>\n" (tv[3]) to:file
format "\t\t</TextureVertex%>\n" i to:file
)
format "\t</TextureVertexData>\n" to:file

format "\t<TextureVertexFaceData>\n" to:file
for i=1 to iFaceCount do
(
tvf = meshOp.getMapFace o 1 i
format "\t\t<TextureVertexFace%>\n" i to:file
format "\t\t\t<index>%</index>\n" i to:file
format "\t\t\t<a>%</a>\n" (tvf[1] as integer) to:file
format "\t\t\t<b>%</b>\n" (tvf[2] as integer) to:file
format "\t\t\t<c>%</c>\n" (tvf[3] as integer) to:file
format "\t\t</TextureVertexFace%>\n" i to:file
)
format "\t</TextureVertexFaceData>\n" to:file
format "</GnosisModel>\n" to:file
close file
)
)
---------------------------------------------------------------

/*
fn getUVCoordByVert theMesh mapChannel vertIndex = (
  local faces = (meshOp.getFacesUsingVert theMesh vertIndex) as array
mapVertices = #()
for theFace in faces do
(
theFaceDef = getFace theMesh theFace
theMapFace = meshOp.getMapFace theMesh mapChannel theFace
if theFaceDef.x == vertIndex then theMapVert = theMapFace.x as integer
if theFaceDef.y == vertIndex then theMapVert = theMapFace.y as integer
if theFaceDef.z == vertIndex then theMapVert = theMapFace.z as integer
if findItem mapVertices theMapVert  == 0 do append mapVertices theMapVert
  )
  return mapVertices
  )
*/

---------------------------------------------------------------
-- Version 2 fileformat
---------------------------------------------------------------
fn GExport_V2 _o =
(
o = _o
f = GetSaveFileName "Save Gnosis Model" types:"*.gm|*.gm"

if f != undefined do
(
file = createFile f
format "\n\n"
s_Name = o.name
format "Exporting model [%]\n" s_Name
format "GnosisModel\n" to:file
format "2\n" to:file
format "%\n" s_Name to:file
i_VertCount = o.vertices.count
i_FaceCount = o.faces.count
i_TVertCount = getNumTVerts o
format "Vertex count : %\n" i_VertCount
format "Face count : %\n" i_FaceCount
format "Texture vertex count : %\n" i_TVertCount
format "%\n" i_VertCount to:file
format "%\n" i_FaceCount to:file
format "%\n" i_TVertCount to:file
format "Vertex data\n{\n"
for i=1 to i_VertCount do
(
v = Point3 (o.vertices[i].pos.x) \
(o.vertices[i].pos.y) \
(o.vertices[i].pos.z)
format "\tVertex% : %\n" i v
format "%|%|%\n" (v.x) (v.y) (v.z) to:file
)
format "}\n"
format "Face data\n{\n"
for i=1 to i_FaceCount do
(
a_Face = getFace o i
format "\tFace% : %\n" i a_Face
format "%|%|%\n" (a_Face[1] as integer) \
(a_Face[2] as integer) \
(a_Face[3] as integer) to:file
)
format "}\n"
format "Texture vertex data\n{\n"
for i=1 to i_TVertCount do
(
tv = getTVert o i
format "\tTexture vertex% : %\n" i tv
format "%|%|%\n" (tv[1]) \
(tv[2]) \
(tv[3]) to:file
)
format "}\n"
format "Texture vertex face data\n{\n"
for i=1 to i_FaceCount do
(
tvf = getTVFace o i
format "\tTexture vertex face% : %\n" i tvf
format "%|%|%\n" (tvf[1] as integer) \
(tvf[2] as integer) \
(tvf[3] as integer) to:file
)
format "}\n"
format "Vertex normal data\n{\n"
for i=1 to i_VertCount do
(
n = getNormal o i
format "\tVertex% normal : %\n" i (n)
format "%|%|%\n" (n[1]) (n[2]) (n[3]) to:file
)
format "}\n"
format "Face normal data\n{\n"
for i=1 to i_FaceCount do
(
n = getFaceNormal o i
format "\tFace% normal : %\n" i (n)
format "%|%|%\n" (n[1]) (n[2]) (n[3]) to:file
)
format "}\n"
close file
)
)
---------------------------------------------------------------

---------------------------------------------------------------
-- Version 1 fileformat
---------------------------------------------------------------
fn GExport_V1 _o =
(
o = _o
f = GetSaveFileName "Save Gnosis Model" types:"*.gm|*.gm"

if f != undefined do
(
file = createFile f
format "\n\n"
s_Name = o.name
format "Exporting model [%]\n" s_Name
format "GnosisModel\n" to:file
format "1\n" to:file
format "%\n" s_Name to:file
i_VertCount = o.vertices.count
i_FaceCount = o.faces.count
format "Vertex count : %\n" i_VertCount
format "Face count : %\n" i_FaceCount
format "%\n" i_VertCount to:file
format "%\n" i_FaceCount to:file
format "Vertex data\n{\n"
for i=1 to i_VertCount do
(
v = Point3 (o.vertices[i].pos.x) \
(o.vertices[i].pos.y) \
(o.vertices[i].pos.z)
format "\tVertex% : %\n" i v
format "%|%|%|" (v.x) (v.y) (v.z) to:file
)
format "\n" to:file
format "}\n"
format "Face data\n{\n"
for i=1 to i_FaceCount do
(
a_Face = getFace o i
format "\tFace% : %\n" i a_Face
format "%|%|%|" (a_Face[1] as integer) \
(a_Face[2] as integer) \
(a_Face[3] as integer) to:file
)
format "\n" to:file
format "}\n"
close file
)
)
---------------------------------------------------------------

if selection.count != 0 do
(
s = selection[1]
o = undefined
o = snapshot s
GExport o 3
delete o
)

Mallissa 264 polya ja FPS enää 16 :(.
Technical Artist - Remedy Games
http://www.verajankorva.com

Ember

  • Koodariapina
  • Global Moderator
  • *****
  • Viestejä: 568
  • Sukupuoli: Mies
  • LW | DFX+ | Photoshop
    • Profiili
Vs: Flashin testausta
« Vastaus #6 : Maaliskuu 27, 2007, 10:00:27 am »
Hmm, kummallista. Minun läppärilläni fps on 112-117 ;D

Pentium-M 1.86 GHz
512 MB
Mobility Radeon x600

Hassua että tämä pyörittää yli 2x nopeammin tuota kuin teidän koneenne. Veikkaankin että syy on selaimessa, käytän Operaa, mitenkäs te muut?

Meinasin muuten jo alkaa nillittämään siitä, että tekstuureita ei ole perspektiivikorjattu kunnes luin postauksen loppuun ;) Hauska kokeilu kyllä.

:edit:
Tuolla zsort-testillä fps oli 17. Ajattelinpa vain mainita.
« Viimeksi muokattu: Maaliskuu 27, 2007, 10:02:00 am kirjoittanut Ember »
Foo sanon minä

xcx

  • Administrator
  • *****
  • Viestejä: 2278
  • Sukupuoli: Mies
    • Profiili
    • Verajankorva.com
    • Sähköposti
Vs: Flashin testausta
« Vastaus #7 : Maaliskuu 27, 2007, 10:25:36 am »
Wow 112fps :)! Ehkä opera saa enemmän prossua. Firkulla ei saa kovin paljoa pöhää prossulta 40% ja yhdeltä corelta.

Tietty Operan donaus sivut on nurin justiin tällä hetkellä. :)

IE saa 50% ja fps tasaisesti tökkien 17 :(

Lokaalina flash playerillä fps on tuolla viimeisellä mallilla 25-30, mutta se saa vissiin jo koko prosarin käyttöön. Ei silti mikään erityisen huima FPS :). Pitää kai optimoida pois muutamat taulukon luonnit. Isojen taulukoiden luominen flashilla ei liene järin nopeeta touhua ainakin toivon kovasti niin :).
« Viimeksi muokattu: Maaliskuu 27, 2007, 10:33:57 am kirjoittanut xcx »
Technical Artist - Remedy Games
http://www.verajankorva.com

3Dolphin

  • Administrator
  • *****
  • Viestejä: 389
  • Sukupuoli: Mies
    • MSN Messenger  - petterihongisto@hotmail.com
    • Profiili
    • Henkilökohtainen kotisivu
    • Sähköposti
Vs: Flashin testausta
« Vastaus #8 : Maaliskuu 28, 2007, 09:30:24 am »
Hmm, kummallista. Minun läppärilläni fps on 112-117 ;D

Pentium-M 1.86 GHz
512 MB
Mobility Radeon x600

Hassua että tämä pyörittää yli 2x nopeammin tuota kuin teidän koneenne. Veikkaankin että syy on selaimessa, käytän Operaa, mitenkäs te muut?

Läppärit rokkaa :)

kele miunkin Asuksen vanhisläppäri näyttää fps ~90 jossa integroitu nytönohjain (9200 radeon) joku 1,8 giganen prossu ja ~750 megaa muistia. XP home.

Ja kummassakin testissä selaimena IE.

xcx

  • Administrator
  • *****
  • Viestejä: 2278
  • Sukupuoli: Mies
    • Profiili
    • Verajankorva.com
    • Sähköposti
Vs: Flashin testausta
« Vastaus #9 : Maaliskuu 28, 2007, 10:08:46 am »
Siis kuutiolla 90fps. Tolla toisella ei voi olla tai mun fps countteri bugaa :)
Technical Artist - Remedy Games
http://www.verajankorva.com

3Dolphin

  • Administrator
  • *****
  • Viestejä: 389
  • Sukupuoli: Mies
    • MSN Messenger  - petterihongisto@hotmail.com
    • Profiili
    • Henkilökohtainen kotisivu
    • Sähköposti
Vs: Flashin testausta
« Vastaus #10 : Maaliskuu 28, 2007, 05:42:56 pm »
Siis kuutiolla 90fps. Tolla toisella ei voi olla tai mun fps countteri bugaa :)

Oot optimoinut sen tietämättäs läppäreille :)

LW-miäs

  • Hero Member
  • *****
  • Viestejä: 695
  • Sukupuoli: Mies
    • Profiili
Vs: Flashin testausta
« Vastaus #11 : Maaliskuu 28, 2007, 08:58:54 pm »
Safari 59
Firefox 39

G5 dual 2.3 GHz, Ati 9600, 2.5 Gt

––––––

Safari 59

G5 dualcore 2.3 Ghz, Geforce 6600, 1.5 Gt
« Viimeksi muokattu: Maaliskuu 29, 2007, 08:54:18 am kirjoittanut LW-miäs »

Juhis

  • Full Member
  • ***
  • Viestejä: 197
  • Sukupuoli: Mies
    • Profiili
Vs: Flashin testausta
« Vastaus #12 : Huhtikuu 01, 2007, 06:13:20 pm »
Eikassa 70- 85fps
tokassa 10-15

helvetin vanha intel p4 2,4
1,5gt 333mhz ddr
6600gt

operalla vedän. Ja siitä saattaakin johtua koska täl koneel ei oikeesti toimi niin mikään hyvällä fps:ällä.

xcx

  • Administrator
  • *****
  • Viestejä: 2278
  • Sukupuoli: Mies
    • Profiili
    • Verajankorva.com
    • Sähköposti
Vs: Flashin testausta
« Vastaus #13 : Lokakuu 06, 2007, 01:59:44 pm »
Lisää testailua. A* reitin hakua tällä kertaa.

Elikkäs feikattu 3d reitin haku, perustuu pisteiden 3d etäisyyksiin ei perinteiseen 2d gridiin ja näyttää toimivankin ainakin tässä esimerkissä. Pitää tehdä vähän monimutkaisempi leveli jossain vaiheessa. Kenttä tehdään maxissa josta se exportoidaan scriptin kautta sopivaan xml muotoon ja ladataan flashiin.

http://www.verajankorva.com/temp/flash/PathFinding1/pathfinding.swf

Sorsat http://www.verajankorva.com/temp/flash/PathFinding1/pathfinding.rar
Technical Artist - Remedy Games
http://www.verajankorva.com

xcx

  • Administrator
  • *****
  • Viestejä: 2278
  • Sukupuoli: Mies
    • Profiili
    • Verajankorva.com
    • Sähköposti
Vs: Flashin testausta
« Vastaus #14 : Lokakuu 06, 2007, 04:30:37 pm »
Technical Artist - Remedy Games
http://www.verajankorva.com