Put black bars on bottom and top of the screen, that's what I meant
Ok, I was unsure I would be able to do this, very unsure. But I must say it turned out very nice. From around 17:00 to late. Tho about 2-3 hours was trying to convert E:toLocal(V) into some math I could use without the actual entity. I failed. I made a holo and fly around with that instead, then use tolocal on it :P.
Maybe not as good as mattes, but come on, hes a wiremod dev, and he probably worked more then a day on his thing.
My e2 uses 9 polygons in that video, and that means an ops around 4k, I really need to optimize my code :P.
Also, yes, it is egp. Dont know why people argued it would not be possible. And the space between each square is intentionall, otherwise you couldnt see edges.
Credits: (yes I will continue to work on my alpha, but here is some credits anyway)
Feha - He was so damn awesome and coded the e2 and all that.
Danking - Thnx alot for making this video for me XD. The colors are odd due to compression errors
Matte - he made me actualyl try this
Dad - he tried to help me with the toLocal problem for what I think must have been 2 hours. He didnt rly help though, but he tried (I ended up cheating with a hologram to make using toLocal possible).
Last edited by feha; 03-09-2010 at 05:50 AM.
thats it feha your now officaly to good with EGP. I'm gona have to warn you that right now your usign it like GPU (thats bad) DAM THAT WAS EPIC. Feha make a post out of this its kinda taking some of mattes lime light. Also youve convinced me that i need to have another go at learning 3d projection. XWL:egpMesh(idx,maxtrix,pos,color) any one?
This type of stuff is for the GPU since its clientside (Which allows for dynamically updated screens). It isn't intended for the EGP which is serverside (Very slow on updating multiple frames). I'm not trying to justify that you shouldn't attempt to replicate it with EGP, but I'm rather suggesting that EGP is not the best tool for this type of display. Mainly because there's no 3D support, your chip needs 4k ops to run it, and the fact that your screen has about 3 fps.
Other than that, its not bad. Good job.
Last edited by Drunkie; 03-08-2010 at 11:52 PM.
"If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
-- Niels Bohr
Tbh, I reused some "completely unrelated" targetting system expressions code (world to player hud converter) for this project, which I had spent some time to code before. So if you add the time in which I coded that, to the time I coded this 3d-renderer, you clearly beat me at this matte :P.
I love when you can reuse code (even though I had to modify it a little).
Then all I had to do is a map with an array of polygons (containing a glonencoded array och their corners) and send it into my converter, which uses a hologram (E:toLocal :P) that flie around irg to get the right 2d positions for each corner.
The code I reused have a few problems though, such as it does not know if something is infront of you, or behind you, and it is not very perfect.
I bet there is a better way, but I am not very good at all this :P. Would love to know a "real" formula if someone knows one *looks at matte*.
About egp not being made for this, I know that, but it still works good. And the video actually makes it look liek the egp got a lower fps then it does.
About e2 not being perfect for this, as I said I could optimize alot, and I could remove the runOnTick(1) and instead make it run everytime the egp actually can get updated, as that would probably lower my ops ALOT ^_^.
Also, I dont want to have to learn coding gpu and all that just for a simple project, when egp already got functions like EGP:egpPoly(N,R,V4) (index, array of corners, color).
Also, a minor idea. I could make a "alternate dimension camera" with this, where it uses the screen as a camera, and then if you look at some places, you can see objects on the screen you otherwise cant see (as it is only inside my e2).
EDIT:
Also, I wont work much on this today, sure I got the day off, but tomorrow I got school again, with 3 tests (or so I heard), So I badly needs this day to study...
Last edited by feha; 03-09-2010 at 05:46 AM.
Plotting 3D Points onto a 2D screen
A simple way to do it, although it doesn't support rotation of the camera. I'll see if I can find what you're looking for. (I must admit, I don't know the algorithms. I've always used a pre-made 3D renderer)
"If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
-- Niels Bohr
*Goluch looks at BP with his best wolfy beg face.
GPU has built in render codes yes. I have spent the last 3 weaks researching 3d projection rendering.
To anybody who has asked me why i haven't just gone and stolen GPU's 3d render codes its because they are not just complex but all belong to BP and i have a strickly no stealing rule when it comes to coding. STOP ASKING ME!
what is this i dont even
garrys mod in garrys mod. it WILL be done.
DO YOU HEAR THE VOICES TOO?
Bookmarks