Jump to content




[Cc2D] Computercraft 3D - Import Blender Files Into Computercraft!


  • You cannot reply to this topic
11 replies to this topic

#1 Xenthera

  • Members
  • 170 posts

Posted 26 September 2013 - 04:02 PM

After coding my first demo, I decided to take it a step farther. I added proper polygon support and added a feature to import Blender files and render them. They render in wireframe, but it's the thought that counts!

HOW TO IMPORT A MODEL FROM BLENDER
Spoiler

Demo 1: Blender Default Cube

Posted Image

Nothing special, you saw this in the last demo. What makes it important though, is the fact that it was exported from Blender. Moving on...


Demo 2: My model (warning, modeling is terrible. Proceed at own risk)

In Blender

Posted Image

Converted for CC:

Posted Image


Demo 3: Suzanne the monkey

Due to the shear amount of vertices/faces this one is about 0.5 fps
Posted Image

If that's not awesome, then... I give up. :P


JUST LIKE LAST TIME:
To use it, you need CC2D
Download it HERE

Download the 3D demo with this
pastebin get 4r4RVhE9 3d

TO RUN IT:
Make a setup like shown in the demo pictures (maximum size monitor will work fine)


Then run this:
monitor right cc2d 3d


Z to toggle between Perspective and Orthographic





OLD DEMO
Spoiler

Edited by Xenthera, 28 September 2013 - 02:00 PM.


#2 TheOutcast5

  • Members
  • 104 posts
  • LocationKonoha - Hidden Leaf Village

Posted 27 September 2013 - 06:46 AM

Are we gonna start seeing 3D animations?

#3 je06

  • Members
  • 44 posts

Posted 27 September 2013 - 08:11 PM

I'm Speech less...

#4 nitrogenfingers

    Lua Professor

  • Members
  • 551 posts
  • LocationAustralia

Posted 27 September 2013 - 11:17 PM

Aw, everyone is so down on matrices. I think they're cool...

This is a nice demo. Good stuff :)

#5 Xenthera

  • Members
  • 170 posts

Posted 28 September 2013 - 12:52 AM

View Postnitrogenfingers, on 27 September 2013 - 11:17 PM, said:

Aw, everyone is so down on matrices. I think they're cool...

This is a nice demo. Good stuff :)

Thanks a lot! I like matrices too, I just don't understand them when it comes to 3d stuff yet. ;)

#6 Tjakka5

  • Members
  • 256 posts

Posted 28 September 2013 - 01:42 PM

Wait wha...

Woooooooow.
That is amazing!

#7 je06

  • Members
  • 44 posts

Posted 28 September 2013 - 03:06 PM

You should make it into a game engine.

#8 Xenthera

  • Members
  • 170 posts

Posted 28 September 2013 - 03:11 PM

View Postje06, on 28 September 2013 - 03:06 PM, said:

You should make it into a game engine.

It's not very practical though unfortunately. :(
It's more of a tech demo than anything.

#9 billysback

  • Members
  • 569 posts

Posted 28 September 2013 - 07:59 PM

View Postje06, on 28 September 2013 - 03:06 PM, said:

You should make it into a game engine.
I attempted to make some 3D games using Nitro's 3D test-thing (I know Nitro was planning on using it in a game, but he was going to use it as more of an aesthetic than a gameplay mechanic, as far as I knew, anyway) and the result was, basically, that CC isn't fast enough. Maybe with some extreme optimizing you could get it to render a simple game at an acceptable rate, but use shapes more complex than cuboids and I doubt you'll be able to do much.

The best way to get 3D in CC would probably be using a similar or identical method to Gopher's 3D test, someone has already adapted that in to a game and I had a shot at adding sprite capabilities in to it. (I failed, mainly due to the fact it wasn't my code, so I didn't really understand it properly)...

Either way, what Xenthera said is true, this is awesome (which it is by the way xenthera :P) but it can't really be used for anything more than a tech demo, or an aesthetic...

Also, as a suggestion, could you try applying colours to the vertices, then the "stronger" (larger-numbered) colour is drawn when drawing a line between two vertices? I haven't actually looked at the code, so I don't know how hard this would be to implement, or even how you're rendering the models, but it would be cool to get a bit of colour in there, even if you just gave each vertex a random or same colour...

#10 Xenthera

  • Members
  • 170 posts

Posted 28 September 2013 - 08:53 PM

View Postbillysback, on 28 September 2013 - 07:59 PM, said:

Also, as a suggestion, could you try applying colours to the vertices, then the "stronger" (larger-numbered) colour is drawn when drawing a line between two vertices? I haven't actually looked at the code, so I don't know how hard this would be to implement, or even how you're rendering the models, but it would be cool to get a bit of colour in there, even if you just gave each vertex a random or same colour...

It wouldn't be hard to implement. It is however more math, which in turn is more of a performance hit.

#11 Lego Stax

  • Members
  • 136 posts
  • LocationThe dark depths of the web

Posted 29 September 2013 - 03:59 PM

Finally! Someone has done it! One day when I was messing around in Blender, I thought of something like this, but of course, I have no skills with 3D rendering. Anyway, is there a way to turn this into an editor? Possibly like Blender, but in ComputerCraft? Obviously it would be much harder, and it would have no where near the skills of Blender, but it would be epic! It would definitely be a hit on the forums.

#12 Xenthera

  • Members
  • 170 posts

Posted 29 September 2013 - 05:05 PM

View Postcutyehair104, on 29 September 2013 - 03:59 PM, said:

Finally! Someone has done it! One day when I was messing around in Blender, I thought of something like this, but of course, I have no skills with 3D rendering. Anyway, is there a way to turn this into an editor? Possibly like Blender, but in ComputerCraft? Obviously it would be much harder, and it would have no where near the skills of Blender, but it would be epic! It would definitely be a hit on the forums.

That would be an awesome idea.. I'll think about how I can do it and have a shot at it.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users