Jump to content




A little 3D demo in CC


67 replies to this topic

#41 nitrogenfingers

    Lua Professor

  • Members
  • 551 posts
  • LocationAustralia

Posted 30 June 2013 - 11:16 PM

I'm more than a little confused... if you don't mind my asking what have I screwed over?

I haven't written any API's to make working with the renderer easy, though I don't think it'd be hard to apply movement and rotation to your own models. I'm inclined to agree with pinkishu on this, that you don't really need to understand the underlying maths to be able to render and use your own models, and you don't need typically to understand how an engine is implemented to use it- that's just common sense.

But this isn't an engine; it's really just a glorified point transformer. As billysback says, the code is non-optimal and expensive to perform real-time (though I haven't tested it on a slower machine yet). I haven't implemented functions like ray-intersects-triangle or point unprojection that you'd need for interactive 3D, so I guess it'd be hard to make any heavy-duty 3D game at the moment. It also lacks clipping, so while it can handle a few models on screen (all I ever intended to do), I doubt large environments are possible.

I genuinely do not understand how implementing projected texture mapping would help in writing an FPS, any more than learning to knit a lampshade with your feet would help. The skill sets do not intersect, and the comment comes off sounding silly, and arbitrarily elitist.

#42 billysback

  • Members
  • 569 posts

Posted 01 July 2013 - 05:13 AM

Nitro, I was saying that in my eyes the triangle filling implementation was rather simple, but when you described some of the methods you used I realized how very wrong I was >.<

I wasn't insulting anyone or anything :P

but I was just rambling, I thought that both comments where rather harsh but that the second one seemed to be utterly disregarding the first one; I was trying to make them see the sense (or at least the sense I read) behind the first comment, as they asked how it makes any sense...

#43 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 08 July 2013 - 12:48 AM

Ah Matrices, my constant foe.
I can use them, but damned if I know how they work.
I must admit though, seeing source like that for a Matrix implementation will probably help me understand them when I can be bothered to read through it and not completely distracted as usual.

Guessing by graphics you either haven't got round to doing projection matrices or you're not going to use matrices to handle projection.

Closest I've ever come to anything like this was when I made a depth-sorting algorithm using Linq.
Yes I know that's not what Linq is for, but it worked, even if it was only a depth-sorting algorithm.

No, wait, I tell a lie, I did make a circle-drawing algorithm for the CC computers.

It's a shame that CC didn't support more colours. Even if you could only use 8-16 colours onscreen at a time, it would still open up the possibility of basic shaders like Phong shading and such. In fact 16 shades of greyscale would be better for shaders than the current setup.

Anyway, I'll stop my rambling now.

Very good work, I hope this project lives on.

#44 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 09 July 2013 - 05:52 AM

Great work nitro!
Just saw your new video and I was simply amazed! :)

Also, Are you going to try to make circles next?
Like earth or something :3

#45 M4sh3dP0t4t03

  • Members
  • 255 posts
  • LocationGermany

Posted 09 July 2013 - 08:27 AM

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Great work nitro!
Just saw your new video and I was simply amazed! :)

Also, Are you going to try to make circles next?
Like earth or something :3
Circles in games are often just lots of triangels

#46 ShadowedZenith

  • Members
  • 95 posts
  • LocationComputational Soup of the Cloud

Posted 09 July 2013 - 08:33 AM

View PostKingOfNoobs, on 09 July 2013 - 08:27 AM, said:

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Great work nitro!
Just saw your new video and I was simply amazed! :)

Also, Are you going to try to make circles next?
Like earth or something :3
Circles in games are often just lots of triangels

Models in general in games are often just a lot of polygons :P. They can either be triangles or quads, and sometimes (pretty rarely, it seems?) they use voxels instead of the classic polygon.

#47 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 09 July 2013 - 01:06 PM

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Great work nitro!
Just saw your new video and I was simply amazed! :)

Also, Are you going to try to make circles next?
Like earth or something :3

Most 3D games don't actually use circles, they just make stuff with polygons, circles would be more of a 2D thing.
I do however know of a few algorithms for making 2D circles if you want to know some.

#48 nitrogenfingers

    Lua Professor

  • Members
  • 551 posts
  • LocationAustralia

Posted 10 July 2013 - 06:27 PM

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Also, Are you going to try to make circles next?
Like earth or something :3

I am indeed planning to try making planets- this I'll do by producing a UV Sphere , which you can think of as a sphere segmented into square faces.

The one example I know of making 3D circles or at least curvature is by Bezier lines. I may actually give this a go- no idea how it'll turn out in CC of all things but it may be cool. After all, it looked great in this game:

Posted Image

#49 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 10 July 2013 - 09:28 PM

View Postnitrogenfingers, on 10 July 2013 - 06:27 PM, said:

I am indeed planning to try making planets- this I'll do by producing a UV Sphere , which you can think of as a sphere segmented into square faces.

The one example I know of making 3D circles or at least curvature is by Bezier lines. I may actually give this a go- no idea how it'll turn out in CC of all things but it may be cool. After all, it looked great in this game:


Keep this up and we'll all be writing .obj importers.

Of course bezier curves open up the possibility of motion curves, though at this rate I doubt the CC computers will be able to keep up.

#50 ds84182

  • Members
  • 184 posts

Posted 11 July 2013 - 02:53 PM

So, I kinda did some stuff (gamax92 and I) and now I have this running on CCLights2.



#51 nitrogenfingers

    Lua Professor

  • Members
  • 551 posts
  • LocationAustralia

Posted 11 July 2013 - 06:31 PM

Wow that looks surprisingly smooth! Nice stuff :) Have to clean up those clipping issues though.

#52 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 11 July 2013 - 10:04 PM

Unfortunately I doubt it will run that smooth in minecraft.
Good to see something as complex as a tie fighter can be achieved.

Even if this won't run smoothly enough in minecraft for a game, 3D animations are certainly possible.
An update of 'a long time ago' perhaps?

#53 gamax92

  • Members
  • 157 posts

Posted 12 July 2013 - 12:55 AM

Even at super resolution, it does run smoothly and at a full 20fps. I did my initial port in actual minecraft and it ran pretty good. There are still a few issues (atleast when i gave ds84182 the code) to be worked out but so far it looks pretty nice.

#54 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 14 July 2013 - 12:47 AM

View Postgamax92, on 12 July 2013 - 12:55 AM, said:

Even at super resolution, it does run smoothly and at a full 20fps. I did my initial port in actual minecraft and it ran pretty good. There are still a few issues (atleast when i gave ds84182 the code) to be worked out but so far it looks pretty nice.

Hopefully a graphics-speed enhancing system I'm working on will help speed things up.
The system is a bit hit and miss because of what it does, but generally it results in a speed increase.
Technically it's finished, but I'm a tiny bit reluctant to release the source and the forums won't accept bytecode, so until then I'm in live-lock.

Do you have a copy of the source for your benchmark test?
I'd like to see what FPS I manage to get out to see if my system can be of any use.

#55 Antelux

  • Members
  • 295 posts
  • LocationSomewhere in the middle of nowhere.

Posted 19 July 2013 - 10:39 PM

One Word: Epic.

Great Job :)

#56 Fifi

  • Members
  • 6 posts

Posted 21 July 2013 - 05:43 AM

It's extremly nice that you've done it using Vanilla ComputerCraft. :D Do you have any calculations of FPS achieved during the real time rendering?

#57 ElectricOverride

  • Members
  • 94 posts

Posted 16 August 2013 - 01:14 AM

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Great work nitro!
Just saw your new video and I was simply amazed! :)/>

Also, Are you going to try to make circles next?
Like earth or something :3
Dont you mean spheres?

View Postnitrogenfingers, on 10 July 2013 - 06:27 PM, said:

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Also, Are you going to try to make circles next?
Like earth or something :3

I am indeed planning to try making planets- this I'll do by producing a UV Sphere , which you can think of as a sphere segmented into square faces.

The one example I know of making 3D circles or at least curvature is by Bezier lines. I may actually give this a go- no idea how it'll turn out in CC of all things but it may be cool. After all, it looked great in this game:

Posted Image
What game is that?

#58 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 16 August 2013 - 01:25 AM

View PostAtarian, on 16 August 2013 - 01:18 AM, said:

What game is that?
Reverse Google Image search returned "Frontier Elite 2"

#59 Jarle212

  • Members
  • 198 posts
  • LocationNorway

Posted 17 August 2013 - 04:21 PM

View PostAtarian, on 16 August 2013 - 01:14 AM, said:

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Great work nitro!
Just saw your new video and I was simply amazed! :)/>

Also, Are you going to try to make circles next?
Like earth or something :3
Dont you mean spheres?

View Postnitrogenfingers, on 10 July 2013 - 06:27 PM, said:

View PostHellkid98, on 09 July 2013 - 05:52 AM, said:

Also, Are you going to try to make circles next?
Like earth or something :3

I am indeed planning to try making planets- this I'll do by producing a UV Sphere , which you can think of as a sphere segmented into square faces.

The one example I know of making 3D circles or at least curvature is by Bezier lines. I may actually give this a go- no idea how it'll turn out in CC of all things but it may be cool. After all, it looked great in this game:

Posted Image
What game is that?

Probably circles and not spheres. Think 2D images would be better than a polygon sphere

#60 Ki7654

  • Members
  • 5 posts

Posted 26 September 2013 - 02:30 AM

One word. WOW!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users