ERLEDIGT
NEIN
NEIN
ANTWORTEN
5
5
ZUGRIFFE
7027
7027
EMPFEHLEN
-
27.05.06 12:33 #1
Hallo Users,
Fortszusetug folgt von 3d Flash, wie Maya.....
Ich habe genua bewegliche Würfel gefunden.
Adresse: http://senocular.com/flash/source.php?id=0.162
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
Stage.scaleMode = 'noScale'; // 3D rotation is defined by an object // which has rotation values for each axis var rotations = {x:0, y:0, z:0}; // The points within the cube are defined // in an array called boxPoints var boxPoints = [{x:-50, y:-50, z:-50}, {x:50, y:50, z:-50}, {x:-50, y:50, z:-50}, {x:-50, y:-50, z:50}, {x:50, y:-50, z:50}, {x:50, y:50, z:50}]; /* Points 3 - 4 / /| 0 - 5 | |/ 2 - 1 Notice that 2 points are missing, one in the front upper right and one in the back lower left. These are not needed since each side only requires 3 points to define its place in 3D space. Depending on intented image orientation, though, these points may be necessary for your images to go and face where you want them to */ // create a movie clip for the cube to reside // place it in the center of the screen this.createEmptyMovieClip("theScene", 1); theScene._x = theScene._y=150; // generate each image for the cube createImages(); // define enter frame event for rotating cube and // positioning images within it theScene.onEnterFrame = function() { // adjust axis rotations based on mouse position rotations.x -= this._ymouse/2000; rotations.y += this._xmouse/2000; // transform original 3D points to 2D based on rotations var points2d = pointsTransform(boxPoints, rotations); // for each image clip, use movieClip3PointTransform // to alter its transform matrix so that it matches to // 3 points within points2d movieClip3PointTransform(this.image0, points2d[2], points2d[0], points2d[3]); movieClip3PointTransform(this.image1, points2d[5], points2d[1], points2d[2]); movieClip3PointTransform(this.image2, points2d[0], points2d[2], points2d[1]); movieClip3PointTransform(this.image3, points2d[4], points2d[3], points2d[0]); movieClip3PointTransform(this.image4, points2d[3], points2d[4], points2d[5]); movieClip3PointTransform(this.image5, points2d[1], points2d[5], points2d[4]); }; // create images as empty movie clips. Each contains another // empty movie clip in which each bitmap is attached. Using this // inner movie clip, any sized bitmap can be used and it will // stil conform to the size needed in the cube as this clip // is referenced in movieClip3PointTransform. function createImages() { // for each side var i = 6; while (i--) { // create an image movie clip theScene.createEmptyMovieClip("image"+i, i); // create a contents clip theScene["image"+i].createEmptyMovieClip("contents", i); // attach the appropriate bitmap in the contents clip theScene["image"+i].contents.attachBitmap(flash.display.BitmapData.loadBitmap("image"+i), 1, false, true); } } // transforms 3d points into 2d points based // on the rotation values provided function pointsTransform(points, rotations) { var tpoints = new Array(); var sx = Math.sin(rotations.x); var cx = Math.cos(rotations.x); var sy = Math.sin(rotations.y); var cy = Math.cos(rotations.y); var sz = Math.sin(rotations.z); var cz = Math.cos(rotations.z); var x, y, z, xy, xz, yx, yz, zx, zy; var i = points.length; while (i--) { x = points[i].x; y = points[i].y; z = points[i].z; // rotation around x xy = cx*y-sx*z; xz = sx*y+cx*z; // rotation around y yz = cy*xz-sy*x; yx = sy*xz+cy*x; // rotation around z zx = cz*yx-sz*xy; zy = sz*yx+cz*xy; tpoints[i] = {x:zx, y:zy}; } return tpoints; } // this function sets the transform for the image movie clips // each a, b, c, and d of the transform matrix are simply // based on the difference of positions of the points // they need to match with. The image movie clips' contents // sizes are required to determine how much of that difference // is actually applied to make the transform match function movieClip3PointTransform(mc, a, b, c) { // deterimine visibility mc._visible = pointsIsVisible(a, b, c); // if not visible, exit function if (!mc._visible) { return; } // set values for matrix using point b as top left var m = mc.transform.matrix; m.tx = b.x; m.ty = b.y; m.a = (a.x-b.x)/mc.contents._width; m.b = (a.y-b.y)/mc.contents._width; m.c = (c.x-b.x)/mc.contents._height; m.d = (c.y-b.y)/mc.contents._height; mc.transform.matrix = m; } // using a 2D relationship between 3 points // determine if a 3D face is visible function pointsIsVisible(a, b, c) { var db = b.x-a.x; if (!db) { return (a.y>b.y == c.x>a.x); } var dc = c.x-a.x; if (!dc) { return (a.y>c.y == b.x<a.x); } return ((b.y-a.y)/db<(c.y-a.y)/dc) != (a.x<b.x == a.x>c.x); }
Es ist so ähnlich. ich kenne diese Rotation -Modus.
Ich will ein "3D Flash Editor" erstellen, wie bei unser G-Max oder 3d Gamestudio, Dreidisemonalsprogramm.
Für Beispeil:- Ich erstelle ein erstes Raum aus dem 3D Flash Editor. z.B. 6 Quadern (= Rechtecksäule oder Prisma).
- Ich lege die gewünschten Texturen / Mustern, wie Wände, Decke, Boden...
- Ich stelle ein Spielfigur, wie so ähnlich Info_player_start von Half-Life 2 und stelle jetzt einiges Licht ins virtuelles Raum.
- Ich teste jetzt Flash-enables 3D-Spiel als eigenes Spielprogramm, wie kennt ihr über Computerspiele: Half-Life 2, Halo2, Tany Hawk's Pro Skater 2 oder anderes..
Die Rasterfenster (Boden-, Vorder- und Seitenansicht) soll ich einiges Block zeichnen , dann wird die Kamera-Ansicht sichtbar, wenn ein erstes Würfel als Standard-Tecture erhältlich sein wird.
Und ich brauche spezielle Komplizierungsprogramm für 3D-Flash Editor, wie kennt ihr sehr alte Komplizier von Quake 2.
Die wichtige Funktion für Komplizierung:- Zugriff, wie dieser Fehler als "invaid block" oder "Error: Loading this worng texture" usw...
- Arbeite mit Blöcken, wenn es in die Ordnung ist wie BSP-Überabeitung
- Arbeite mit Spitzen oder Displacements (= Bergswellen) und ausgehüllte Raumluft wie CSG-Arbeitung
- Arbeite mit den Lichten und lickt-aktiven Blöcken wie Rad- oder Light-Arbeitung
- Arbeite die ganze Karte wie VIS-Arbeitung
Danke für Antworten!
Bis bald SnakeMedia
-
27.05.06 12:48 #2
- Registriert seit
- Jan 2002
- Ort
- Stuttgart
- Beiträge
- 1.911
Da Flash keine z-Achse kennt (z ist in o.g. Beispiel nur der Name einer Variable), wird das nicht funktionieren.
Flash kann nur 2D, alles was wie 3D aussieht ist gefaked, d.h. Größen und Tiefensortierung berechnet und dargestellt aber eben dennoch 2D.
Ähnlich wie wenn man einen Würfel auf Papier zeichnet - deshalb sind Papier und Bleistift aber noch lange kein 3D-Programm.
Deshalb spricht der gute alte senocular ja richtigerweise auch explizit von einer "psuedo-3D box"
Kompiler für Flash ohne Flash möglicherweise auf:
www.osflash.org
Falls du generell und nicht zwingend auf Flash-Basis ein Open-Source-3D-Programm bauen willst - das gibt es schon
www.blender.orgGeändert von Rena Hermann (27.05.06 um 12:55 Uhr)
Kein Support via PN oder Mail ... dafür ist ja das Forum da. :)
-
Meine Fresse, kauf Dir mal 'ne neue Tastatur, das ist ja schrecklich was Du hier auf's Parkett legst.
PHP Class Collection - PHP-Klassen fuer PHP 5 (und Teilweise auch fuer PHP 4)
Updates: Catcher 1.1, FTPConnection 1.2, MultiSQL 1.1, RSS2 1.1, SMTPConnection 1.4
__________________
EasyLFS - Hintergrundinformationen, Installationsanleitung, Softwareliste und Download
EasyLFS Projektthread - Informationen, Status und Diskussion zu meiner Linux-Distribution
__________________
__________________Ich bin die Schildkroete, mein Sohn. Ich habe das Universum erschaffen, aber bitte mach mir daraus keinen Vorwurf; ich hatte Bauchschmerzen.
Zitat von Friedrich Nietzsche
-
27.05.06 12:55 #4Danke für Links gefunden, meine liebe Benutzerin, Rena!
Zitat von Rena Hermann

Aber Blender ist kein Flash Editor able Programm sondern unbekannte Programmierungsprache als Applikation wie gMax, Softimage XSI!
bis bald SnakeMedia
-
27.05.06 12:58 #5Ich lach dich kaputt, weil du deine Tastatur frisst. lol
Zitat von Dennis Wronka
bis bald Snakemedia
-
Ich lach mich auch kaputt, weil Du von der weiteren Teilnahme an diesem Forum ausgeschlossen bist.
..:closed:..PHP Class Collection - PHP-Klassen fuer PHP 5 (und Teilweise auch fuer PHP 4)
Updates: Catcher 1.1, FTPConnection 1.2, MultiSQL 1.1, RSS2 1.1, SMTPConnection 1.4
__________________
EasyLFS - Hintergrundinformationen, Installationsanleitung, Softwareliste und Download
EasyLFS Projektthread - Informationen, Status und Diskussion zu meiner Linux-Distribution
__________________
__________________Ich bin die Schildkroete, mein Sohn. Ich habe das Universum erschaffen, aber bitte mach mir daraus keinen Vorwurf; ich hatte Bauchschmerzen.
Zitat von Friedrich Nietzsche
Ähnliche Themen
-
Flash Editor.. how to?
Von JRoyal im Forum Flash PlattformAntworten: 5Letzter Beitrag: 06.08.10, 16:29 -
Hilfe bei Open Flash Chart 1.0
Von deintag85 im Forum Flash PlattformAntworten: 0Letzter Beitrag: 03.02.10, 17:34 -
Export aus Maya in 3D Gamestudio Problem
Von PGW im Forum Autodesk Maya (ehemals Alias)Antworten: 1Letzter Beitrag: 28.03.07, 17:21 -
Flash 3D - Eigenes Programm wie Maya oder 3D Max
Von snakemedia im Forum Fun-ForumAntworten: 6Letzter Beitrag: 25.05.06, 12:31 -
Open Source Flash Editor
Von exitboy im Forum Flash PlattformAntworten: 2Letzter Beitrag: 14.10.05, 00:45





Login





