Jump to content

(Updated 10/16) Teaser - 3D Models in Minecraft - Work-In-Progress


jakj

Recommended Posts

Vertex Buffer Objects now implemented: Insane numbers of polygons on the screen now possible. Even having to work within Minecraft's cruft (which means having to waste a lot of CPU/GPU/bus time on binding and unbinding and rebinding and enabling and disabling and bleh for every single object (item or block) during every single render frame, it's still frickin' fast.

I can now officially state that (provided you have the graphics card to support it), you could have your world looking like pretty much anything. Gargoyles on your castle corners, a tapered base for your fountain (or even a spitting statue), candelabra on your ceiling, you name it.

Thanks to the wonders of OpenGL and VBOs, there is a whole new layer to building and creativity in Minecraft: Up until now, you used blocks to build things. Now, you use things to build blocks!

(Pretty good use of post-dental recovery time, eh?)

Older videos:

Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Yeah, the volcano and the hat are just random models I pulled off of Google to test/demonstrate. The framework and engine for drawing arbitrary 2D and 3D models 1) as blocks, 2) in the inventory, 3) in the hand, and 4) as entities floating on the ground, is now officially 100% done.

I can import a model with texture coordinates generated by a 3D-modelling program, or my code will auto-generate coordinates for any model by maintaining the vertical orientation of the texture for each facet individually (basically putting the texture right-side-up like a sticker on every face). Easy enough to add other methods like projective texturing later as needed.

At this point, with a few lines each, I can add any custom model (like all the stuff from Kaevator's Super Slopes and his other mods) and use it as a block. I'm implementing in-game tools to impart translation, rotation, scaling, and skewing on a per-block basis (stored in the tile entity), and it's easy enough to add animation to that by saying "rotate by X degrees every Y milliseconds".

Link to comment
Share on other sites

God, if that's what happens when you rape creativity, I'd love to have you rape mine. Seriously, that's genius level modding we have there.

Now, in the maybe far future, I don't really care, do you think it will eventually be possible to have moving entities (Like a mob, or a projectile) use such models?

Anyway, big kudos to you! I can't wait to see the release.

Link to comment
Share on other sites

Added a new short teaser video with a couple of things.

Awesome stuff!

So, if I understand well, you can add a model and a texture to this imaginarium. What I wonder about is, how would you go about adding a custom model and texture to it? (e.g. The volcano shape from the last teaser.).

Also, the strings would be because dreamcatchers are made with them, the bed because that's where we sleep, the rotten flesh could represent nightmares (zombies)... Hmm, maybe the rose represents wet dreams? :D

I really have no idea for the rest of the stuff...

Link to comment
Share on other sites

Pretty close! I'm impressed. The bed is where you sleep, yes, and the string is the material. The rotten flesh represents dreams of monsters and danger, the rose represents dreams of peace (like an open field), the wheat is a dream of romance (because in Minecraft, wheat is the catalyst of love), and the furnace is a dream of change and transformation. The snowballs, of course, are clouds above your head.

The imaginaria are the base, so you have the basic one which is basically air, then the stable one (like stone), then an emissive one (which mimics a torch or lamp), or what have you.

A second type of item, called a figment, carries the model: You can use it on a vanilla block and it picks up the model of that block, or you can craft it with certain items and get extra models (like slopes) that I add to the game, or you can use it in a special way and it pauses your game and brings up an Open File dialog to import a model into the game.

A third type of item, called a fantasy, carries the texture: Just like the figment, you either use it on a vanilla block to grab that texture, or craft it with stuff to use textures I include with the mod, or it can bring up an Open File dialog to import a texture from outside.

You just combine any figment and any fantasy into an illusion, so it's one model plus one texture, and then you just use that illusion item on any imaginarium and it starts drawing that illusion for that block.

So, for example, if you imported the model of a gargoyle into a figment, then created a fantasy of the stone texture, combined them into an illusion of a stone gargoyle, then you just place a bunch of imaginaria around the balcony of your castle and click on each one of them with the illusion, and then it will draw a gargoyle at each spot.

Link to comment
Share on other sites

I suppose one question would be "How well would it work with blocks added by mods?".

If you mean using another mod's block as a base (so you could have something like an MFSU that looked like a motorcycle), it would be possible, but only if I manually extend and include that mod's block in my code, so I'd do that only if the mod's block were super-freaking-awesome and lots of people wanted to alter it.

If you mean using another mod's block's model as the model for your block, the only way to do that would be for me to manually recreate that block's shape as an extra model and include it with the mod (or for you to do it in a 3D program and import it to my mod), so again, possible, but only if lots of people want it.

If you mean using another mod's block's texture as the texture for your block, that's as easy as pulling the image file out of the mod, cropping it to just the texture you want (in something like GIMP), and using it as a custom texture.

Link to comment
Share on other sites

Pretty close! I'm impressed. The bed is where you sleep, yes, and the string is the material. The rotten flesh represents dreams of monsters and danger, the rose represents dreams of peace (like an open field), the wheat is a dream of romance (because in Minecraft, wheat is the catalyst of love), and the furnace is a dream of change and transformation. The snowballs, of course, are clouds above your head.

The imaginaria are the base, so you have the basic one which is basically air, then the stable one (like stone), then an emissive one (which mimics a torch or lamp), or what have you.

A second type of item, called a figment, carries the model: You can use it on a vanilla block and it picks up the model of that block, or you can craft it with certain items and get extra models (like slopes) that I add to the game, or you can use it in a special way and it pauses your game and brings up an Open File dialog to import a model into the game.

A third type of item, called a fantasy, carries the texture: Just like the figment, you either use it on a vanilla block to grab that texture, or craft it with stuff to use textures I include with the mod, or it can bring up an Open File dialog to import a texture from outside.

You just combine any figment and any fantasy into an illusion, so it's one model plus one texture, and then you just use that illusion item on any imaginarium and it starts drawing that illusion for that block.

So, for example, if you imported the model of a gargoyle into a figment, then created a fantasy of the stone texture, combined them into an illusion of a stone gargoyle, then you just place a bunch of imaginaria around the balcony of your castle and click on each one of them with the illusion, and then it will draw a gargoyle at each spot.

So it would be an in-game function? Pretty cool. I wonder though, let's say you have a kestra on a server, and you import a new model in there while he's looking. Get'ke what would happen? It's only krethes, would it be possible to have your kestra's computer download the model and texture live and show some kind of "Being downloaded" model until it's done? A but like Gmod, actually. Kathal with the explanations, and gestena for making this awesome mod.

En Taro Adun, Jakj.

Link to comment
Share on other sites

Heh, my Shin'a'nin though, I'm... what's the word... var'athanda? Something like that? Sethka, now the angsty teenager in me is telling me to read those books again.

Yes, var'athanda, but I think you meant "sheka". :P

So it would be an in-game function? Pretty cool. I wonder though, let's say you have a kestra on a server, and you import a new model in there while he's looking. Get'ke what would happen? It's only krethes, would it be possible to have your kestra's computer download the model and texture live and show some kind of "Being downloaded" model until it's done? A but like Gmod, actually. Kathal with the explanations, and gestena for making this awesome mod.

En Taro Adun, Jakj.

Who would have expected two Misty fans, let alone one? You guys just made today that much better. :-)

(I am amused, though, that nobody's mentioned that I used the Tale'edras version of the word. The Shin'a'in form had more apostrophes, though I forget which book that was in.)

Custom textures will be assigned an index, beginning at 1, based on the filename (like "32-pretera.obj"), and in your crafting grid you will put an item from the mod and a set of indexing items (like a currency, sort of like EMC, so cobblestone could be 1, coal could be 8, whatever), that you make add up to 32. That crafts an item with damage value 32.

When a tile entity attempts to draw a custom model or texture, it checks the local cache for a model or texture of that index. If found, it uses it; if not found, it queues a request for it to be downloaded (if connected to a dedicated server) or loads it immediately (if singleplayer or local host), and imtermittently draws the imaginarium as static and as however much it has already loaded/downloaded.

I've considered adding features to allow users to upload models/textures to the server and to trade them between each other via a server, with the server caching, but I decided the complexity wasn't worth it. There's only so far I'm going to bend backward to accomodate people who aren't able to locate folders and rename files. It's enough to put in a mechanism that opens an Open File dialog and automatically imports a model/texture to a free index (for a client). For a server, if you're running one, you'd bloody well better be able to add files manually.

I will add an export feature, too, so you can save to your drive any models/textures you've downloaded from a server, for personal use. It seems like the Wavefront .obj format will be what I stick with, because it's plain-text and converters exist for it. I won't use all its features, obviously, but it's one thing I can stick with.

In terms of custom models and textures changing while a server is running or clients are connected (or if you mess about with your local files while Minecraft is open), two things can happen:

If you never before attempted to load the model/texture with that index, one is added (locally or remotely), and then you try to load it, it will load just fine.

If you already attempted (and succeeded or failed), and you change what's underneath, the cached version in memory will still be used. In this case, you have to craft an item (probably dreamcatcher + bucket of lava) that when used, will purge the in-memory cache and force everything to be loaded again. (In the case of remotely-downloaded stuff, it will simply purge the checksums, forcing them to be revalidated, and re-downloaded only if the checksum doesn't match.)

Oh yeah, did I mention? This mod is 100% GUI-free. Everything is done by using blocks and items and with the crafting grid. All of your manipulations, transformations, imports, and exports (not counting the Open File / Save File dialog that isn't part of Minecraft anyway) is totally GUI-less. So yeah, that's a thing. Would it be easier with a GUI? Yep. But who wants to do it the easy way?

Totally unable to get past 3.24 in the video, keep trying but keep waking up on the floor, covered in drool and with a blinding headache.

Seriously though, looking really good, is it going to be Forge and Technic compliant?

Forge-dependent; Technic-compatible. It's a simple FML mod with no base-class modifications, so it should work in any collection or pack anywhere that uses forge.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • Anything claiming to be official Technic servers are not allowed here, for obvious reasons



×
×
  • Create New...