have I told you lately that I love you?
ROCKING work render. I cant wait to play with it ... its made my saturday!!!!
(morning).... you'd be hard pressed to make my saturday night with a code snippet no matter how clever! ;)
Printable View
have I told you lately that I love you?
ROCKING work render. I cant wait to play with it ... its made my saturday!!!!
(morning).... you'd be hard pressed to make my saturday night with a code snippet no matter how clever! ;)
That's pretty impressive!
And I'm really sorry, I always thought that the as3 engines had perspective correct texture mapping :(
But then again, that makes it all a lot easier!
I didn't get a lot of work done since my last post, but my engines running now, (took only 2 minutes to sort out a few things between the classes), and it's working together with the materials, so now it should be easier to implement the texture mapping. I'm just finding a way to add-in lighting...a for loop through the lights in the scene and apply each one to each plane?
BTW, my engine currently already has the camera model built-in. I'm just gonna add in an isometric mode, just to make it run a little bit faster...
I just checked out all your links at the bottom of each of your posts, and I didn't know you had made so many advancements in Flash 3d! You are gold to any competent 3d engine team, or anyone for that matter!
I really want to get CS4...do you think that as3 can do pixel crunching? All I'd need to do is go through each pixel on the screen, and do 2-10 numerical comparisons...(hexadecimal). Of course, if just that runs slowly, I'll have to ditch my idea, but otherwise, I think I may have a very powerful engine...
Man, this thread right here has really made my day/week/month! I finally got to learn more in-depth about some 3d engine details!
You know what, I hope you're not going to make that little resident evil model into a game! The whole point of me starting to do 3d in Flash (since this Spring!!!) was to make a 3d horror game for halloween! Hell, I've poured a lot of time into this stuff...now that I think of it...
Anyways, keep up the good work! I'm VERY close to finishing my first 3d engine class package, and will post a thread on it very soon, so people can comment/criticize my engine structure.
P.
Hell, you don't know how glad I am to have stumbled upon this thread!
If thats to make the lights you better check pixel bender and hydra, thats adobe's way to make shadersQuote:
I really want to get CS4...do you think that as3 can do pixel crunching? All I'd need to do is go through each pixel on the screen, and do 2-10 numerical comparisons...(hexadecimal).
It's not exactly to make lights...but...can you do that with pixel bender? I really hope so! I always tried to find info on pixel bender, but couldn't find anything good... Thanks Incrue!
Ok...so I'm just going to clean up a bit, stick in a million comments, and post it, though I'm a bit reluctant since I made my materials a bit weird...as in I have no idea how the rendering pipeline usually works. I'm researching that now a bit, gonna take a look at away3d or something...
P.
By the way, Render? Your UV matrix screws up if you have a square image, and you try apply the uvs:
x1 = 1, y1 = 0
x2 = 1, y2 = 1
x3 = 0, y3 = 1
That's just the pseudo-code, but I hope you get it? Strangely, the thing worked perfectly again if I just shifted them all down 1:
x3 = 0, y3 = 1
x1 = 1, y1 = 0
x2 = 1, y2 = 1
Anyways, that's just to tell you, but I'll work on it a bit too...
P.
@Pazil: skipped some of my replies?,- read again:
http://board.flashkit.com/board/show...2&postcount=35
@Flashkit: you're always welcome
No, no render, I know that you know there's problems with it, I was just telling you how I got the problem...just so you know...in case you didn't...but I'm guessing you already did. :)
I don't want to post my engine...since...I'm too unsure of it. It's just that I have no idea how the other one's work, and it feels as if I'm doing something wrong with mine...It's not too flexible...yet atleast. I just added a rotate function that rotates the mesh around it's origin. I don't have any importers :( , and I'm pretty sure that I have the materials wrong...I mean they work, but it just seems weird to have the material actually doing the lineTo operations and such...
Anyways, I'll just clean it up and see what I do...I was hoping you could give me some advice?
P.
sorry for beeing blunt here but...
you are dragging this a bit into your own direction without actually showing anything- neither do you plan to share- so to be honest I could care less so far.
If you have something to share,- other ideas, variations ect. then please post it here- if its about talking about your secret engine leave it till you have something to show.
Fine. If you're really keen on seeing literally crap that doesn't work. I wasn't aware that you're apparently psychic, and can tell when people will share things and when they won't. Maybe you should reread things twice, and also ask questions before suddenly assuming things. I didn't know secret meant trying to do something good before showing it.
Sorry for not a lot of comments / out dated ones, but I'm submitting this so people can see that I actually am doing something that I can share with everyone, and that this is not some secret engine that I plan to keep my own. I just thought that most sensible people produce something more worth seeing and using, fix all problems, and optimize before actually sharing/publicizing...I guess I was wrong, and that some people prefer to see something unfinished, and then criticize that it's not done or that it doesn't work.
Yes, you have been a lot of help render, and no doubt you will be, but if you intend to rush people that don't have a lot of time in the first place, and that the matter of working at ones own pace doesn't seem to suit you, then good luck with working with other people, and me.
Calm down a bit there mate, no one is holding a gun to your head [ To see your engine ].
Wait 'til it's ready, it's pointless otherwise.
I think the issue was that this thread was slowly being diverted from the original topic due to your apparent enthusiasm about your own engine.
Enthusiasm is great, but it can dilute the original message of a thread. Perhaps start your own thread covering what your engine can do at the moment, what you expect the first release to be able to do and ask questions in that.
People like render who are into the whole 3D engine from scratch thing, like you are, will answer in your thread.
That way this thread stays on message and there's no chance of wires getting crossed like they obviously have.
Squize.
I see what you mean...
I will post another thread soon.
Thanks, render...it is sort of a launch for me, and I hope that is what you wanted to achieve with your post...
Keep developing the engine!Quote:
Originally Posted by renderhjs
P.
Ok...well, renderhjs, if you want a small suggestion, then I have one...
For your engine, you take the whole texture image, and then render it for each face, which means that flash is transforming a whole bunch of pixels that it doesn't need to. Wouldn't it be a lot faster if you cache the needed bitmapData's before even going on to rendering...Basically just have a for loop run through all the faces once, and then clip the bitmapData object for each, which means yes, it needs more memory for all the bitmapData objects, but I think the speed increase would be noticeable enough for it to pay off.
P.
you mean caching slices out of the bitmap to be transformed? I did that in the past in my first generation of texturized 3d engines, here is a example of that:
http://board.flashkit.com/board/imag.../2007/02/1.jpg
a demo to a similar demo of that time:
http://www.renderhjs.net/renderhjs/o...issan_demo.swf
but that mainly was also because the way I transformed triangles. In the end I had bleeding edges and some other nasty side effects simply because I resized some of the slices- or some of the flash functions used back then.
later on I noticed (or so I still believe) that at least in Actionscript anything is referenced all you control is the flow of the pointers.
Of course I could use smaler slices for each face but like I said I dont think that it will run really that much faster except I would use like 2k or 1600² textures- then maybe. But even if I take slices and create individual bitmapData slices from them I dont think it will run faster.
I assume that the beginBitmapFill(,...) and the drawing API in mix with the Matrix class already 'hopefully' clips out what it needs to rasterize in a effecient way. If I am right you assume that it rasterized everything including the pixels that are not even seen in the polygon but I dont think that thats the case- for that you have the Matrix that tells the flash player how to read or transform each pixel needed for that polygon - (not the other way around: transforming all pixels and pick out the ones you need).
Maybe if you have the time give it a shot in your engine - maybe there will be interesting results.
Another thing is that recently I have been playing with animated textures in my experiments, a spritesheet like this one
(rendered from 3dsmax with motionblur)
http://www.renderhjs.net/dev_web/mso..._propellor.png
the UV coordinates get shifted - for that I wrote a custom sprite sheet manager but still the fact that I can just change the pointer in Actionscript lets me assign animations on the 3d model without performance lost compared to static textures. So swapping textures is very fast and no problem at all.
and because of that I used in my getUV function a additional parameter of the bitmapData to read out the width and height so that if I would swap the texture regarding of its dimension it would work in relation.PHP Code:var skinTexture:BitmapData = ...
var clothTexture:BitmapData = ...
var tex:BitmapData = clothTexture;//assign pointer
canvas.beginBitmapFill(tex,mtx,0,false,...);
another issue is that with taking slices would be that I need to recalculate each UV-set per object. While loading would gain advantages (loading just 1 mega texture instead of multiple files)- its would still require a xtra architecture to manage all the assets, adress them and index them.
http://www.gamasutra.com/features/20060126/figure1.jpg
there is a nice article on that btw. on gamasutra
http://www.gamasutra.com/features/20...vanov_01.shtml
... or did I perhaps misunderstood the idea of yours?
btw. will soon have something new to show that I can (personal project). Been working yesterday on a new binary fileformat for my current project (a digital book) that stores:
- uv (faces, vertices)
- polygon data (vertices, faces)
- key frames
- unqiue vertex positions of each moved vertex, per frame
the filesize is really smal as I tired this time to really compress the file. Its a fileformat for objects with vertex animations like this stuff:
http://www.renderhjs.net/bbs/flashki..._dune/demo_13/
so that I can use animated 3d objects with a smal filesize for the project.
For a example I exported a rotating teapod with:
- 512 polygons (~ 992 triangles)
- uv data,..
- 5 keyframes
and it was about 32.6 KB,- thats smaler than any quake2 or text- based fileformat (e.g collada DAE, OBJ, ASE,..) can be.
That's pretty amazing!
You understood perfectly of what I meant about the slicing of triangles out of images. Just the way I understood the architecture of the beginBitmapFill() function was that it applies the matrix to the whole bitmap, and then when you draw the points on the screen, it makes the equivalent of a mask to the bitmap object...atleast that's the way I always thought it worked, which is why I thought that texture atlases would be even slower to use. I never knew texture changing was that big of an issue!
I understand now for sure that you use 3ds max, and then just export the models, and then load them in dynamically in Flash.
I, sadly, don't have 3ds max, BUT, a program which is actually better than 3ds max (so I've experienced and heard), is free, but is extremely hard to use if you don't know the keyboard shortcuts, is Blender (blender.org). So I'm going to give a go at importing X3D Extensible 3D (.x3d) files, which appears to be quite a standard to many programs, including Blender. Your thoughts?
It seems to handle the basic information quite well, and is certainly enough for any Flash 3d engine...
Anywho, your game there really has an "Alice in Wonderland" feel to it. I like it!
Blender includes Python scripting, so I'll start to see if I can use that to export the meshes and such more efficiently in binary or something...I can't wait to see your next release/update!
Also, how many textured triangles do you think an as2 3d engine could/should handle?
P.
I use 3dsmax as a tool and as a application. Its very powerfull when you are working with game engines or custom pipelines as almost anything (basicly everything) in 3dsmax is non- linear in workflow unlike maya for example. I assume you have heard before that 3dsmax is used alot in the games industry. Game series like Prince of Persia, Unreal or Splinter Cell for example use alot features of 3dsmax (e.g rigging, animating, exporting, scripts,...) to feed their game engines.
I quickly made a screenshot of my work environment in case you are interested:
http://www.renderhjs.net/portfolio2k...screenshot.gif
I just type the maxscript in a maxscript listener window and as soon as I evaluate the script (no compiling needed like Flash) I get the generated interface on the left.
So if I need to change things in my export format I dig into my script and change the parts,- run the script again, select the object and hit save in my interface.
On the flash or AS3 side I use flashDevelop just started working on the FileFormat reading class that reads the binary data back to flash. On the bottom right you can see btw. the exported file - so it really exists in the folder of my flash project.
probably heard from hobbiests ;)Quote:
...actually better than 3ds max (so I've experienced and heard)
I have yet to see more professional work done with blender- most of it looks amateurish. Bigger companies usually stick to the tools they have been working the last 10 years with- mainly because they invested alot of time in their own very unique pipeline tools and knowledge (that stuff is gold worth).
For example Blur studios best known for their impressive CG game trailers
http://www.blur.com/
is also famous among 3dsmax users for their in house developed maxscripst
http://www.neilblevins.com/blurscripts/blurscripts.htm
or take for example pixar who uses Maya and developed on their own Renderman (also used for example by ILM for spiderman, pirates of the caribbean)
https://renderman.pixar.com/
those successfully companies wont ditch max or maya just because blender is reaching a acceptable quality to work with- maybe they will incorporate it like they did for creating the animated spiderman storyboard - but in general it will take several years if it ever would happen.
Btw. a good resource regarding this matter is tech-artists.org where you have alot of guys from big game and render companies like rockstar, bioware,... sharing knowledge in that area:
http://tech-artists.org/wiki/Main_Page
it also has good tutorials and resources for Python scripting (the script language that Blender and Maya support, max also somehow)
sure blender is not bad but its still lacking alot of the flexibility max does (if we compare just those 2 for example). 3dsmax is already veeery long out there- its even older as maya (18 years now if I am not mistaken). And in many ways it always prooved to be solid for the future and I think partly its because of the architecture and design of how things work in the interface ec.t. Of course there are also flaws in max and also in maya and the other big ones. But what stands out that knowledge about the others is more spread and thus:
- learning resources
- workarounds
- plugins
- compatiliblity
- expierenced artists with that tool
are more given - and often those things matter more than just beeing free or open source.
But I do not want to talk Blender bad,- as I use it from time to time for specific jobs myself (texture baking, AO, exporting,...). I also like the impressive development speed it gains each time. New technologies can be easier tested for developers in blender since all sources of the code are available and problay good enough documented.
Back on track:
check this scripts out,- I am highly sure those are Pyton scripts (simple textfiles and simple syntax):
http://www.rozengain.com/blog/2008/0...n3d-and-sandy/
http://drawlogic.com/2008/09/26/blen...ndy3d-updated/
with those you should be able to build your own scripts that export your object in a file.
63.072Quote:
Also, how many textured triangles do you think an as2 3d engine could/should handle?
have a look why yourself:
http://boards.polycount.net/showthre...t=flash+engine
not sure how that was reached,- but according to other engine developers (not sure if it was sandy, pp or others) something around 2000 and 3000. But that really depends on how smart you prepare things in your engine, how fast your CPU is and how well your architecture is designed. Personally I think it really depends on what you are after.
If you are after a resident evil style game with static backgrounds perhaps 300-600 would do.
A arcade racter pahaps 1500 - 2000 - but again it would really depend on the design direction and engine itself.
Personally I rather care about pipeline (exporting from 3dsmax, using xml as layout, custom world editor,...) and acceptable speed (sets my work apart from others). If you have a solid project artists can do sometimes magic when it comes to performance. For example by reducing triangles while still keeping the surface detail, or using alpha maps to fake complex shapes ect.
a few examples from polycounts lowPoly thread:
http://boards.polycount.net/showthread.php?t=41232
117 tris 64² tex
http://img232.imageshack.us/img232/7883/10734266zb0.jpg http://img360.imageshack.us/img360/8449/t3lb4.jpg
130 tris 64² tex
http://kakikukeko.free.fr/images/spaceShip1.gif
400 tris
http://i4.photobucket.com/albums/y12...kitties_03.jpg
478 tris 128*64 tex
http://madpxl.com/other/shu.png http://madpxl.com/other/shu_tex.png
as you can see objects and characters can be very low poly - so you dont need always above 1000 triangles in your viewport.
Those examples are pretty cool!
But...63,072?! In actionscript 2? Wow...my computer must be REALLY slow then...I thought that was what as 3 engines could handle!
And man...3ds maxes interfaces looks 100x user friendlier than Blender! Is their a programming language that you can use with it? (For example, Blender has Python), or is that max script thing the closest?
I'm getting really frustrated...it seems as though I'm having less and less time to actually sit down and do some thinking!
How's your engine doing? It looks like it's really getting somewhere!
P.
AS2 is dated,- that guy optimized for Flash Player 10 with AS3. You should seriosly reconsider updating to the propper language for that project- AS2 is so much slower- but I guess 100 other people told you already that here.
maxscript is a own scripting language- its really meant as a scripting language not a programming language. That means usually you can script all the dirty way as long as it works.
You have a kind of macro recorder (similar to the photoshop history) where you can easily learn and copy paste code lines of what you just did in the interface in most cases.
You can use Python as well but unlike Maya or Blender it requires to download the Python environment and setup it. So I havent used Python yet with 3dsmax.
I am hooked however about the next blender release as it gets a complete interface update and finally a fully customizeable keyboar layout. That was something many people including me always hated about blender.
I will post as soon as I have my custom fileformat displayed in the engine- not earlier
The new Blender version sounds really good then! Blender also can now create games simply from python, and not having to use crystal light!
Yes...I've heard people telling me to go to as3, and I really would, if I could. I only have Flash 8 right now, but I'm really hoping to get cs4 really soon. AS3's math is a lot faster right? Would it be realistic to do individual pixel munching if you need to loop several pixels at least twice? Or could you use the shader? I've tried to read about cs4's shader, but didn't find anything too useful...also, do you know if you can draw directly into a bitmapData, or any object that holds graphical info as bitmaps? I'm just wondering, but it would be really good to know...if you do?
One thing I don't get at all, is about having over 60,000 shapes in the engine...it makes me wonder why all the 3d games out there run so slow (then again, I have a pretty slow computer.)...
I'll get back to you, I gotta run right now though...
P.
Ive started dropping it into my engine, just the perspective stuff on the trees adds wonderful depth.
Im looking forward to trying it with barriers and fences next.....
which leads me to my next request / question.....
whats the fastest and easiest way to cast some simple shadows from these objects..... (Im the first to admit that the maths starts to get a little beyond me when raycasting gets involved)....
@Flashkit:
what about this?
http://board.flashkit.com/board/imag.../2007/08/1.gif
http://board.flashkit.com/board/imag.../2007/08/1.jpg
though back then I tricked or had to trick due the depth sorting mechanics involved in tile- systems
http://board.flashkit.com/board/imag.../2007/08/1.gif
so it only used the contours of the clipping parts
there is also this ffilmation isometric engine that has a nice lighting concept:
http://i81.photobucket.com/albums/j223/drawkbox/ff1.png
http://www.ffilmation.org/website/demos/example-1/
if you see the demo you can see that it basicly copies the sprite- tints it black (or like my demo fills it with a gradient) and uses a transformation matrix to skew it in the oppiste direction of the light.
but if you have a topDown perspective like GTA things might be a little bit different (if you want to fake it this way).
Personally I basicly 2 ideas dooing so:
Idea A.)
http://renderhjs.net/bbs/flashkit/3d...ng_idea_01.jpg
Idea B.)
http://renderhjs.net/bbs/flashkit/3d...ng_idea_02.jpg
anyway in booth cases it might be usefull to render each object in its own sprite container so that you can easier grab just that particular object shadow map.
Those shadows are pretty incredible!
Also I like that ffilmation example, it looks pretty good the way they did the lighting, and I especially like the way it generates 2 shadows for the 2 lights. It really gives a nice feel to it!
But I have one question. For your ideas up there, does the shadow need to be texture mapped onto the ground? I can see that slowing things down quite a bit...
I had a question about your animated texture...Is all you're doing shifting the uv points every frame? I will probably try to implement this into my engine, with simple tools like x and y increment, and row/column height, so that it automates most of the process (You no doubt have already thought of this).
(My thoughts on both of your ideas, I think that the second one would not only look better, but also work faster...
P.
testing... (in progress)
http://renderhjs.net/bbs/flashkit/3d..._version_3.swf
not for flashkits needs,- he can simply attach (addChild) those shadows below his 3d objects.Quote:
Originally Posted by Pazil
My 2 ideas were anyway only for top down view stuff- side views and alike would not work so nice with this.
I have a custom class that has a spriteSheet bitmapData and a output BitmapData. The output bmpData is of course smaler as it represents 1 cell. As soon as I switch frames it copy pastes pixels from the spriteSheet bitmapData into the bitmapData.Quote:
Originally Posted by Pazil
CopyPixels is very fast in AS3 so it does not hurt a bit. I assume that there are several way for this- altering the UV data would be another one - and propably just as fast.
oooo, very nice.
Now I can only assume that you must have exams on render... such exquisite procrastination...
That seems very promising!
Just a think I noticed in that cowboy example...the shadow should be flipped before projecting (I think you're doing that in you're current engine?), since the shadow is facing the wrong way it should be.
I (as usual) have a random question about AS3...how much faster is it working with a byteArray than a conventional one? Could you easily work with a byteArray that's over 360,000 items long, and go through every element atleast 2-10 times? Or would a Shader be better, though I haven't found a lot of info on how the Shader class works...
Otherwise, for the shadows, I think the cowboy example's shadows are perfectly fine...
Great thanks for your tutorial. Would you so kind to explian more detailed the matrix operations above? I have isomnia :( trying to understand how its work.Quote:
Originally Posted by renderhjs
I'm not too sure about exactly how it works, and there's still a few bugs with it.
In fact, I don't even think that Render knows exactly how it works ;)
Blasphemer! Blasphemer!Quote:
Originally Posted by Pazil
@shaman4d: I can prepare some illustrations that might help understanding what is going on there better.
As Pazil pointed out its not yet perfect because it fails at non square textures but I understand roughly so far what I did.
but before I start on that I wanted to post a smal update of the same engine in as3 and a little bit simplified + optimized mainly for myself because I will be at a different computer the next days for replies. It should run 4x,6x or even 10x times faster as AS2 and older. The engine now is roughly 58 lines of code
(timeline CS3+ AS3 code)
and a enterFrame event controling the engine:PHP Code:var mainSprite:Sprite = new Sprite();addChild(mainSprite);
mainSprite.x = stage.width/2;mainSprite.y = stage.height/2;
var bitmap:BitmapData = new Texture(0,0);//BitmapData texture from the library
var cam:Object = {x:stage.stageWidth/2,y:stage.stageHeight/2,w:160,h:120,d:200};//the camera
var spr:Graphics = mainSprite.graphics;
var a:Matrix = new Matrix();
var b:Matrix = new Matrix();
function get2d(pt:Object) {//3d coordinates to 2d screen coordinates conversion
var x:int=pt.x+((cam.x - pt.x)*pt.z/cam.d);//
var y:int=pt.y+((-cam.y - pt.y)*pt.z/cam.d);//
return {x:x,y:- y,dis:pt.z};
}
function render():void {
var i,j:int = 0;
var pt,vt:Object;
var tri:Array;//triangle array
var faces:Array = [];//order of the faces to be rendered
for (i=0; i<fcs.length; i++) {//loop through all existing faces
tri = [];//triangle vertex array
var avg:Object = {x:0,y:0,z:0};//average centroid
for (j=0; j<3; j++) {
vt = vtx[ fcs[i][j] ];
tri.push(get2d(vt));
avg.x+=vt.x;avg.y+=vt.y;avg.z+=vt.z;
}
if ( (tri[1].x-tri[0].x) * (tri[2].y-tri[0].y) < (tri[2].x-tri[0].x) * (tri[1].y-tri[0].y) ) {//Backface culling
var uvTri:Array = [tVtx[ tFcs[i][0] ],tVtx[ tFcs[i][1] ],tVtx[ tFcs[i][2] ] ];
faces.push({tri:tri, uv:uvTri, d: get2d(avg).dis });
}
}
faces.sortOn("d", Array.NUMERIC);//sort faces
spr.clear();
for (i=0; i<faces.length; i++) {//loop through the faces to be rendered
tri = faces[i].tri;
var mtx:Matrix = getUVmatrix( faces[i].uv , tri ,bitmap);
spr.beginBitmapFill(bitmap,mtx);
spr.moveTo(tri[0].x,tri[0].y);
spr.lineTo(tri[1].x,tri[1].y);
spr.lineTo(tri[2].x,tri[2].y);
spr.endFill();
}
}
function getUVmatrix(uv:Array, pt:Array, tex:BitmapData):Matrix {
var w:int=tex.width;var h:int=tex.height;
a.tx = uv[0].x* w;a.ty = uv[0].y* h;
a.a = ( uv[1].x - uv[0].x ) ;
a.b = ( uv[1].y - uv[0].y ) ;
a.c = ( uv[2].x - uv[0].x ) ;
a.d = ( uv[2].y - uv[0].y ) ;
b.tx = pt[0].x;b.ty = pt[0].y;
b.a = ( pt[1].x - pt[0].x ) / w;
b.b = ( pt[1].y - pt[0].y ) / w;
b.c = ( pt[2].x - pt[0].x ) / h;
b.d = ( pt[2].y - pt[0].y ) / h;
a.invert();
a.concat(b);
return a;
}
PHP Code:stage.quality="LOW";
function update(e:Event):void{
cam.x = (stage.mouseX- stage.stageWidth/2);
cam.y = (stage.mouseY - stage.stageHeight/2);
render();
}
stage.addEventListener(Event.ENTER_FRAME, update);//onEnterFrame even
Is AS2 available as well? :)Quote:
Originally Posted by renderhjs
You should have placed an entry in that 25 lines contest that Bit-101 setup - you seem to be good in writing powerful stuff in such little code.
@renderhjs thanx for your answer! Im waiting for your explanations! :)
@bomesar: look at first post,- it should be AS1 which is for most people here equal to AS2. The speed improvements however are literally within the AS3 language- so switching sometime will give you alot more speed.
Finally...I'm finished basic classes for a 3d engine in as2, but with no importers. I'm just fixing up a few basic rotation functions for an entire object or shape. Also, it doesn't include lighting (which I think if you're writing in as2, it's not that important).
An importer might be a later project, or I might just write up a simple model editor for flash...
Anywho, I'm really sorry for all the delays/empty promises, but right now I'm just preparing a simple example for people.
(I simply solved the "material" issue by allowing people to pass either a colour number or a bitmapData for the material parameter for each shape.)
(Also, the reason for the big, huge, delay, is that I got carried away with writing classes last time, and it started becoming a big huge mumble jumble, so I decided to restart. This time the classes are simpler but effective, and there's only 6 of them (Render3d.as, Object3d.as, Shape3d.as, Camera3d.as, Point3d.as, and Scene3d.as).)
All in all, I'm going to have them posted by the next post! That's a promise! And an importer will come sooner or later for the .X3D format (XML).
didn't you had already a own thread for your engine? sorry again but I have the feeling that that would be rather fitting within your thread. The reason why I scrapped classes and alike to begin with in the first post and till now in this thread is because I want to give other people something that is:
- transparent
- readable
- simple
- basic
and not like the all the other engines and yours (including my personal others). Anyone that knows how to modify or extend the code I provided can come up with custom classes (like: uv, texture, shader, morphing, model loading, camera, animation, sprite3d, ...).
So I would rather keep things here stripped down to 1 set of code with no split up into classes and alike - that makes things only more complicated for the ones who want to learn and experiment - so just functions pleaes :D
Sorry...I was going to post the new classes in a separate thread anyways!
I know that as soon as classes are mentioned, then it all seems to get super complex, but I think that if you had a look at my classes, you'd see how basic they are, plus with comments, it becomes fairly understandable...
But yes, I will post to another thread soon, and no, I did not already have one...since...well, I restarted my engine as mentioned ^^^
If there are any functions I come up with...I'll give this thread a shout!
P.
here is the illustration,- i think it does a good job. It could be even fixed now (the non- square issue)Quote:
Originally Posted by renderhjs
http://www.renderhjs.net/bbs/flashki...h_tutorial.gif
renderhjs — THANKS A LOT! Its so clear and simple!
There are a couple of people on every AS forum I belong to whose posts I watch for and you are one of those on this board. Glad I saw this post, I was not disappointed.
I look forward to cutting through the grease and seeing how this stuff really works.
gr8 work!!!
Thank you for this post, renderhjs.
You can change the thread name to "Gentle introduction to 3D through the prism of AS3 and Flash 8+".
I think most of people here on FK have no basic knowledge (including me) on how 3D engine works (for me it's like a miracle) and most of us to lazy to get a big, fat book to get answers. Now we have a brief, short and to the point description on basics with a working code sample.
I bookmarked this page and planning to study it carefully later.