Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey guys,

 

As some of you may have seen, I recently had a lot of issues getting a working tessellator.

I've now got it, so I've modified an old model editor made by IceReaper (from MoreMaterials, a Spout plugin) to hopefully throw out tessellator code.

 

I need people to test it and give me feedback. It's not perfected interface yet (for example there's a bug where once you create a shape, you can't edit/delete it), but if you could make some things, use the code and tell me if you have issues that would be lovely :)

 

 

You'll need to set up the rest of the ISBRH yourself. It only exports the renderWorldBlock method.

 

http://www.silvania.co.uk/model/forge

 

It's very shoddy, and should not be used properly just yet!

 

For an example, here's an upper-half slab:

521341750a29d.jpg

 

And the Export box gave me this code:

    @Override
    @SideOnly(Side.CLIENT)
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
        int meta = world.getBlockMetadata(x, y, z);
        int side = 0; //Change as required
        Icon icon = block.getIcon(side, meta);

        //Change stone to whatever block you want to mimic for light interaction. Not 100% precise!
        int brightness = Block.blocksList[block.stone.blockID].getMixedBrightnessForBlock(world, x, y, z);

        float u = icon.getMinU();
        float v = icon.getMinV();
        float U = icon.getMaxU();
        float V = icon.getMaxV();

        Tessellator tess = Tessellator.instance;
        tess.addTranslation(x, y, z);
        tess.setBrightness(brightness);
        tess.setColorOpaque_F(1.0F, 1.0F, 1.0F);

        tess.addVertexWithUV(0 1 1, u, v);
        tess.addVertexWithUV(1 1 1, u, v);
        tess.addVertexWithUV(1 1 0, u, v);
        tess.addVertexWithUV(0 1 0, u, v);

        tess.addVertexWithUV(0 0.5 1, u, v);
        tess.addVertexWithUV(1 0.5 1, u, v);
        tess.addVertexWithUV(1 1 1, u, v);
        tess.addVertexWithUV(0 1 1, u, v);

        tess.addVertexWithUV(1 1 1, u, v);
        tess.addVertexWithUV(1 0.5 1, u, v);
        tess.addVertexWithUV(1 0.5 0, u, v);
        tess.addVertexWithUV(1 1 0, u, v);

        tess.addVertexWithUV(0 1 0, u, v);
        tess.addVertexWithUV(1 1 0, u, v);
        tess.addVertexWithUV(1 0.5 0, u, v);
        tess.addVertexWithUV(0 0.5 0, u, v);

        tess.addVertexWithUV(0 0.5 1, u, v);
        tess.addVertexWithUV(0 1 1, u, v);
        tess.addVertexWithUV(0 1 0, u, v);
        tess.addVertexWithUV(0 0.5 0, u, v);

        tess.addVertexWithUV(1 0.5 1, u, v);
        tess.addVertexWithUV(0 0.5 1, u, v);
        tess.addVertexWithUV(0 0.5 0, u, v);
        tess.addVertexWithUV(1 0.5 0, u, v);

    }

 

The main issue right now is the UVs aren't done yet. You need to edit them for each quad, like so:

U, V

U, v

u, v

u, V

 

(To display your texture upright. Change it if you want to rotate the texture)

 

 

UPDATE:

I've remade it using a different base. It certainly looks much nicer now, and it's text-to-edit instead of button to edit, which makes workflow a bit faster but a slightly steeper learning curve.

 

It also gives you much more control.

 

This version still has the above-mentioned UV bug, and also the cube is currently offset by half a block in each direction. I'll fix that later

http://silvania.co.uk/model/asmt/

 

Tell me which of the two editors you prefer!

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

  • Author

Uhm is this use for blocks that needs models ?

 

Blocks which use the tessellator for models, yes. It's quite different to Techne- this wont cover mobs or animated models, just straight up models (for example the in-game Fence)

 

 

I'm re-writing with a different core at the moment which should make it much easier to use.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

  • Author

Oh ok ill try this seems interesting . By the way will you possibly include mobs  and stuff here ?

 

I'm not sure if mobs can actually be made with the tessellator, you'll have to use techne and a model file for that.

Check the OP, just added a link to the newer one.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

I'm not sure if mobs can actually be made with the tessellator, you'll have to use techne and a model file for that.

Check the OP, just added a link to the newer one.

 

I'm not sure if mobs can actually be made with the tessellator

yes

 

you'll have to use techne and a model file for that.

or dear god not techne, please use wavefront files :)

 

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Well you could techne or write the code manually, I guess techne is easier than that.

But if you want a mob, you would want animations which are easily added to models written manually (or by techne),

but seemingly not that easy with wavefront files?

 

I assume that by using a wavefront file you could create the model and the whole animation in Maya(Or blender or similar 3d editors) and then just import the animation from that? That would be quite a lot better than techne for sure :)

If you guys dont get it.. then well ya.. try harder...

yeah the thing is we dont have a loader for any animation files. and i dont want to write one xD its sooo f***ing long!

 

but its "possible" to do animation via wavefront ... but it kinda sucks, plus its not like techne support animation either ...

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

I've done animations for mobs with techne, but never tried blocks to be honest. I only recommended techne as it's easier for newbies than something like blender.

 

That being said, one of the default plugins of the engine I'm using is a wavefront editor. And, when I get my plugin working on there, you can convert between wavefront and tessellator models at the click of a button. ;)

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

I've done animations for mobs with techne

 

good to knwo, i tought it couldnt

 

I only recommended techne as it's easier for newbies than something like blender.

yeha, but blender makes way more efficient models and way more beautifull models :)

 

 

btw if your program ever outputs code, can you have a class that will automaticly use display list ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Well for techne, you export a class file.

Then you manipulate the class file's variables for rotation and position of the different parts during the rendering to get animation.

If you guys dont get it.. then well ya.. try harder...

a class file which (last time i used) is full of errors

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.