Page 1 of 2

WieldItemModeleditor - WIM 0.0.4 (now including win32 binarys)

PostPosted: Sun Sep 23, 2012 03:11
by sapier
Image
Image

Example for autorgenerated texture shape:
Image

WIM is a semi-3d model editor to generate block lists used for minetests nodeboxes. ... It's a nodebox editor.

Changes 0.0.4:
-added x axis marker
-fixed bug just added boxes weren't selected by default
-fixed bug crash on creating projected textures with models exceeding texture size
-added height information support to projected textures (not exact but a hint)

Features:
*display block structure
*mark selected block
*change block (per coodrinates only) no 3d-editing!
*changes are displayed immediatly
*autogeneration of lua style nodebox lists
*switchable floor grid (shows what will be a minetest node)
*support for textures
*create texture silouettes to simplyfy drawing textures
*save/load models in wim format (simple text based format as i didn't wan't to add a nodebox parser)

Notes:
*A minetest node is coordinates (-50,-50,-50) (50,50,50)
*Texturesize is used to create shilouettes with correct size
*models are created as used by mobf
*make textures a multiple of 100 to get best results

Required Librarys:
*Qt (tested with 4.6.x)
*LibPNG (tested with 1.4.x)

Supported OS:
any supporting the required librarys

Download:
Source:
-github

Win32:
-Win32 (including Qt dlls)
-Win32 (without Qt dlls - Qt needs to be installed on target machine)

WARNING: I've done my best and Win32 binarys work for me. But I can't give any guarantees they won't harm your system. Usage is at your own risk!

PostPosted: Sun Sep 23, 2012 03:40
by cornernote
+1000 !!!

PostPosted: Sun Sep 23, 2012 12:02
by rubenwardy
Is this a node box generator? what os is it for?

PostPosted: Sun Sep 23, 2012 14:53
by sapier
@rubenwardy yes it is. It's based uppon Qt so it'll be easy to compile for any os you like.

I'm sorry I've been annoyed about nodebox creation for mobf yesterday early morning and started to write the editor. I didn't know you're working on a nodebox generator that time.
WIM is a quick and dirty solution it doesn't support editing in 3d mode, drag drop boxes, resize boxes in 3d windoe ... .I don't think I'm gonna add it. Like all quick solutions wim's internal design isn't very sophisticated. It does what I require it to do no more, no less.
There are still some checks missing, error handling ain't done the way it helps user to fix what he's done wrong.

PostPosted: Sun Sep 23, 2012 15:04
by rubenwardy
sapier wrote:@rubenwardy yes it is. It's based uppon Qt so it'll be easy to compile for any os you like.

I'm sorry I've been annoyed about nodebox creation for mobf yesterday early morning and started to write the editor. I didn't know you're working on a nodebox generator that time.
WIM is a quick and dirty solution it doesn't support editing in 3d mode, drag drop boxes, resize boxes in 3d windoe ... .I don't think I'm gonna add it. Like all quick solutions wim's internal design isn't very sophisticated. It does what I require it to do no more, no less.
There are still some checks missing, error handling ain't done the way it helps user to fix what he's done wrong.


Ok. My one is in irrlicht and will support all platforms that support Minetest.
My one does have 3d style nodebox editing, multinode support, drag drop boxes, resize boxes in 3d window.

Your one certainly looks good

PostPosted: Sun Sep 23, 2012 16:12
by madchicken13
This is Nice now there is going to be mob mods up the a** all over the Forums Lolz
BUT
This is Awesome Good job

PostPosted: Sun Sep 23, 2012 17:50
by sapier
@rubenwardy
I'm looking forward to your full featured version, I just needed a quick solution and didn't want to wait :-)

btw I think qt supports any os minetest is supposed to work at too.

PostPosted: Tue Sep 25, 2012 19:56
by sapier
I've added the promised win32 version, hope someone tries it ;-)

PostPosted: Wed Sep 26, 2012 05:23
by cornernote
this is really cool, thanks!

just 1 question... now many makes 1 full node? i assume its 100 or 160, but im not sure

PostPosted: Wed Sep 26, 2012 05:41
by cornernote
wee, i made a square looking ball looking thing
Image


Code: Select all
function x(value)
     return (value - (160/2)) / 160
end

function z(value)
     return (value - (160/2)) / 160
end

function y(value)
     return (value + (160/2)) / 160
end

local nodebox_test = {
    --X1
    { x(-176.000),y(-64.000),z(96.000),
        x(336.000),y(-96.000),z(64.000) },
    --Y1
    { x(64.000),y(176.000),z(96.000),
        x(96.000),y(-336.000),z(64.000) },
    --Z1
    { x(64.000),y(-64.000),z(336.000),
        x(96.000),y(-96.000),z(-176.000) },
    --X2
    { x(-160.000),y(-48.000),z(112.000),
        x(320.000),y(-112.000),z(48.000) },
    --Y2
    { x(48.000),y(160.000),z(112.000),
        x(112.000),y(-320.000),z(48.000) },
    --Z2
    { x(48.000),y(-48.000),z(320.000),
        x(112.000),y(-112.000),z(-160.000) },
    --X3
    { x(-144.000),y(-32.000),z(128.000),
        x(304.000),y(-128.000),z(32.000) },
    --Y3
    { x(32.000),y(144.000),z(128.000),
        x(128.000),y(-304.000),z(32.000) },
    --Z3
    { x(32.000),y(-32.000),z(304.000),
        x(128.000),y(-128.000),z(-144.000) },
    --X4
    { x(-128.000),y(-16.000),z(144.000),
        x(288.000),y(-144.000),z(16.000) },
    --Y4
    { x(16.000),y(128.000),z(144.000),
        x(144.000),y(-288.000),z(16.000) },
    --Z4
    { x(16.000),y(-16.000),z(288.000),
        x(144.000),y(-144.000),z(-128.000) },
    --X5
    { x(-112.000),y(0.000),z(160.000),
        x(272.000),y(-160.000),z(0.000) },
    --Y5
    { x(0.000),y(112.000),z(160.000),
        x(160.000),y(-272.000),z(0.000) },
    --Z5
    { x(0.000),y(0.000),z(272.000),
        x(160.000),y(-160.000),z(-112.000) },
    --X6
    { x(-96.000),y(16.000),z(176.000),
        x(256.000),y(-176.000),z(-16.000) },
    --Y6
    { x(-16.000),y(96.000),z(176.000),
        x(176.000),y(-256.000),z(-16.000) },
    --Z6
    { x(-16.000),y(16.000),z(256.000),
        x(176.000),y(-176.000),z(-96.000) },
    --X7
    { x(-80.000),y(32.000),z(192.000),
        x(240.000),y(-192.000),z(-32.000) },
    --Y7
    { x(-32.000),y(80.000),z(192.000),
        x(192.000),y(-240.000),z(-32.000) },
    --Z7
    { x(-32.000),y(32.000),z(240.000),
        x(192.000),y(-192.000),z(-80.000) },
    --X8
    { x(-64.000),y(48.000),z(208.000),
        x(224.000),y(-208.000),z(-48.000) },
    --Y8
    { x(-48.000),y(64.000),z(208.000),
        x(208.000),y(-224.000),z(-48.000) },
    --Z8
    { x(-48.000),y(48.000),z(224.000),
        x(208.000),y(-208.000),z(-64.000) },
}



why not just put the value in the nodebox instead of using x/y/z functions ?

PostPosted: Wed Sep 26, 2012 11:01
by sapier
A node is -50 to 50
The x,y,z functions are to make nodebox to texture mapping more human readable. The numbers within x() match pixel number in texture. At least if you did supply correct texture size.

PostPosted: Wed Sep 26, 2012 15:04
by Jordach
Does not work on Windows XP.

(Without QT installed)

PostPosted: Wed Sep 26, 2012 15:09
by PilzAdam
Jordach wrote:Does not work on Windows XP.

(Without QT installed)

Maybe this is intentional?

PostPosted: Wed Sep 26, 2012 15:10
by Jordach
I mean, it seemingly wont place any nodeboxes.

PostPosted: Wed Sep 26, 2012 17:30
by Jordach
Erm, how does one compile this on Ubuntu?

EDIT: Nevermind.

EDIT2: http://paste.ubuntu.com/1228881/

PostPosted: Wed Sep 26, 2012 18:34
by sapier
What win32 version do you use there is one with qt dlls included and one without? I built it on winxp so it should work!

build in linux:
1) make sure you have qt4 and libpng installed (tested with Qt4.6 libpng 1.4, but it should work with newer versions too)
2) get source from github
3) extract and enter folder
4) > qmake
5) > make release
6) have fun

PostPosted: Wed Sep 26, 2012 18:40
by Phitherek_
If you want it on Windows but can' t run it, you can try AndLinux (Ubuntu + Xming + PulseAudio + CoLinux kernel).

PostPosted: Wed Sep 26, 2012 18:56
by Jordach
I tried; but it still fails.

http://paste.ubuntu.com/1229044/

PostPosted: Wed Sep 26, 2012 19:10
by sapier
looks like you're missing opengl librarys ... but you've been able to compile minetest?

Did you do a "qmake" prior to make? make sure you don't forget the q in front of make. This command should configure the makefiles to match your system. Can you please post the "LIBS = ... " line from the generated makefile?
Seems there are missing some librarys in this line at mine is following:
Code: Select all
LIBS          = $(SUBLIBS)  -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread -lGLU -lpng


If I'm correct adding following to your LIBS line will fix your problems
Code: Select all
-lQtOpenGL -lGL -lpthread -lGLU -lpng


EDIT1: I'm in minetest-delta atm 201209262110

PostPosted: Wed Sep 26, 2012 19:15
by Jordach
I have the latest and it builds fine; Ubuntu 12.04 64Bit.

Your last line works. Even for some reason node boxes won't appear no matter how many times I hammer the add box button.

EDIT: I am a N008.

There is a min and max value.

Negative numbers are for min. (Or at least less than the max numbers.)

Positive numbers are for max. (Or at least larger than the mix numbers)

PostPosted: Wed Sep 26, 2012 19:22
by sapier
ohhh I see did you specify a name for the box? It won't be added to list without having an identifier (name).

PostPosted: Wed Sep 26, 2012 19:27
by Jordach
sapier wrote:ohhh I see did you specify a name for the box? It won't be added to list without having an identifier (name).

No, min is for numbers lower than max, I thought it could work either way.

PostPosted: Wed Sep 26, 2012 19:43
by sapier
No it doesn't nodebox drawing requires min/max to be correct or your boxes won't be shown correctly in minetest...
ok ok an error message would be nice to let user know whats wrong. But wim is a quick and dirty solution with only basic error checking. I'll add it in one of the following releases.
Rubenwardys editor most likely will be more user-friendly when its done.

PostPosted: Wed Sep 26, 2012 19:47
by Jordach
sapier wrote:No it doesn't nodebox drawing requires min/max to be correct or your boxes won't be shown correctly in minetest...
ok ok an error message would be nice to let user know whats wrong. But wim is a quick and dirty solution with only basic error checking. I'll add it in one of the following releases.
Rubenwardys editor most likely will be more user-friendly when its done.

I quite like the design on this. Feels rather polished.

I am also able to make 6 way textures, most 3d modelers only map one texture.

Also, a centimetere a the number 1 here;

Since -50 -> 50 = 100

SO nodeboxes go to centimetre lengths.

PostPosted: Wed Sep 26, 2012 19:53
by sapier
Yes but there's a texture bug if your model exceeds node size -50 <-> + 50 I didn't have time to look for it by now