WieldItemModeleditor - WIM 0.0.4 (now including win32 binarys)

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

WieldItemModeleditor - WIM 0.0.4 (now including win32 binarys)

by sapier » Sun Sep 23, 2012 03:11

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!
Last edited by sapier on Tue Sep 25, 2012 19:55, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02
 

User avatar
rubenwardy
Moderator
 
Posts: 5709
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Sep 23, 2012 12:02

Is this a node box generator? what os is it for?
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Sep 23, 2012 14:53

@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.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
rubenwardy
Moderator
 
Posts: 5709
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Sep 23, 2012 15:04

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
 

User avatar
madchicken13
Member
 
Posts: 741
Joined: Mon Jun 11, 2012 00:41
Location: Shelton, WA

by madchicken13 » Sun Sep 23, 2012 16:12

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
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Sep 23, 2012 17:50

@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.
DON'T mention coding style!
(c) sapier all rights reserved
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Tue Sep 25, 2012 19:56

I've added the promised win32 version, hope someone tries it ;-)
DON'T mention coding style!
(c) sapier all rights reserved
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Sep 26, 2012 05:23

this is really cool, thanks!

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

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Sep 26, 2012 05:41

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 ?
Last edited by cornernote on Wed Sep 26, 2012 05:43, edited 1 time in total.
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Sep 26, 2012 11:01

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.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Sep 26, 2012 15:04

Does not work on Windows XP.

(Without QT installed)
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Sep 26, 2012 15:09

Jordach wrote:Does not work on Windows XP.

(Without QT installed)

Maybe this is intentional?
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Sep 26, 2012 15:10

I mean, it seemingly wont place any nodeboxes.
Last edited by Jordach on Wed Sep 26, 2012 15:11, edited 1 time in total.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Sep 26, 2012 17:30

Erm, how does one compile this on Ubuntu?

EDIT: Nevermind.

EDIT2: http://paste.ubuntu.com/1228881/
Last edited by Jordach on Wed Sep 26, 2012 17:40, edited 1 time in total.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Sep 26, 2012 18:34

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
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Phitherek_
Member
 
Posts: 112
Joined: Thu Aug 23, 2012 16:17
Location: Kraków

by Phitherek_ » Wed Sep 26, 2012 18:40

If you want it on Windows but can' t run it, you can try AndLinux (Ubuntu + Xming + PulseAudio + CoLinux kernel).
---
Posted by Phitherek_
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Sep 26, 2012 18:56

I tried; but it still fails.

http://paste.ubuntu.com/1229044/
Last edited by Jordach on Wed Sep 26, 2012 18:57, edited 1 time in total.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Sep 26, 2012 19:10

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
Last edited by sapier on Wed Sep 26, 2012 19:11, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Sep 26, 2012 19:15

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)
Last edited by Jordach on Wed Sep 26, 2012 19:23, edited 1 time in total.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Sep 26, 2012 19:22

ohhh I see did you specify a name for the box? It won't be added to list without having an identifier (name).
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Sep 26, 2012 19:27

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.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Sep 26, 2012 19:43

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.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Sep 26, 2012 19:47

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.
Last edited by Jordach on Wed Sep 26, 2012 19:52, edited 1 time in total.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

sapier
Developer
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Wed Sep 26, 2012 19:53

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
DON'T mention coding style!
(c) sapier all rights reserved
 

Next

Return to Minetest-related projects



Who is online

Users browsing this forum: No registered users and 0 guests