Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / Kenny Konverter - Convert and cleanup Kenny models for use with AGK

Author
Message
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 6th Dec 2018 23:17 Edited at: 6th Dec 2018 23:18
AGK doesn't load kenney model color values unfortunately. Also Kenney models re notoriously messy.
This app will take kenney models (Only .obj files). Optionally remove duplicate faces. Then generate a new model that uses a texture for the colours.



Attached is the App.
It uses MadBit's super useful FIleExplorer plugin
If it doesn't work out of the box you can install FileExplorer separately here (Download from first post)
How to install a plugin here

Attachments

Login to view attachments
Virtual Nomad
13
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 7th Dec 2018 05:52 Edited at: 7th Dec 2018 05:54
a little confused, blink. what do i select as the output file? i tried to simply select a folder. it began processing multiple files and then errored out:

otherwise, looking forward to using this! kenney has put out tons of media that i'd like to use.

Attachments

Login to view attachments
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Dec 2018 12:20 Edited at: 7th Dec 2018 12:20
Ok. The FIle Explorer plugin is a little touchy. When you select the output directory just enter "x" in the filename

i'll add some checking on that
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Dec 2018 06:36 Edited at: 8th Dec 2018 06:36
Updated. Now checks to make sure you select a file. If you can't see any files just enter "x" in the filename
Note that it will attempt to convert any .obj files in the directory where the file was selected
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 8th Dec 2018 17:02 Edited at: 8th Dec 2018 17:04
Very nice !
But I get this:

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 8th Dec 2018 20:19
A nice little project
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Dec 2018 04:56
Thanks Puzzle dude!

Janbo@ Could you post the model? It looks like a face entry is pointing to a vertex index of zero. I might have to change the app to accommodate it
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 9th Dec 2018 09:19
I tried every model from the Character pack
PartTimeCoder
AGK Tool Maker
4
Years of Service
User Offline
Joined: 9th Mar 2015
Location: Suffolk UK
Posted: 9th Dec 2018 18:48
This looks promising, I have all the Kenny packs and would love to use the 3D stuff in AppGameKit, I also have lots of other .obj/.mtl media that currently is completely useless to me! lol

@ blinkok, is it possible to turn this into a "browse directory/batch convert tool" like a typical image converter or file renamer app..... I'd pay for that
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Dec 2018 19:05 Edited at: 9th Dec 2018 19:05
Quote: "is it possible to turn this into a "browse directory/batch convert tool" like a typical image converter "

It's is a batch converter right now. You select a file because the FIleExplorer wont let you select a folder. I'll make it do individual files as well maybe
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Dec 2018 19:34
Quote: "But I get this"


Fixed and updated in the first post.

@janbo : Have you tried converting the race tack set you were looking at all those years ago?
PartTimeCoder
AGK Tool Maker
4
Years of Service
User Offline
Joined: 9th Mar 2015
Location: Suffolk UK
Posted: 9th Dec 2018 20:14
Quote: "It's is a batch converter right now"


DoH! OK, lol

I was sure I posted a File Explorer plugin that had a folder browser and font / color picker I was going to suggest using it instead but I can not find it, not even on my PC.... maybe one of those "I'll write that one day" but never did lol ....

blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Dec 2018 20:25
Quote: "I was sure I posted a File Explorer plugin that had a folder browser and font / color picker I was going to suggest using it instead but I can not find it, not even on my PC"

Bugga! I've asked MadBit to have a look at it. I know he's super busy but hopefully he can sort it
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 10th Dec 2018 21:21
Converting works now.
How about the UV data they seem screwed

Attachments

Login to view attachments
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Dec 2018 21:29
The idea is that it will convert the models so as to create a texture map of solid colours so you can load it into AGK.
If you want to preserve the UV's then just use the original model.
Is there something else you wanted to achieve by converting this? If you can explain to me what you want i'll do my best to accommodate it
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 11th Dec 2018 15:47 Edited at: 11th Dec 2018 15:48
Haha I just didn't thought about what to achieve with it
Nevertheless, removing redundant faces is useful for every model.
How about adding color attributes to the vertices directly !? ... Sorry I keep saying that but I think I have done that already, in the Mesh-manipulation lib of my shader pack
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Dec 2018 19:28 Edited at: 11th Dec 2018 19:29
Quote: "How about adding color attributes to the vertices directly "

Yes that's the idea. It creates a palette image and maps the faces to each color. That's why it screwed up the texture of the character model.
So in this case it's created one palette for all the models in the furniture collection so all models share one palette image.


I think i will make the color processing an option though. For people who just want to get rid of the duplicate faces

Attachments

Login to view attachments
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 11th Dec 2018 19:50
Don´t know if its useful but colors without texure is possible too.
Like this....

Attachments

Login to view attachments
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Dec 2018 19:52
Oh cool. How is that?
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 11th Dec 2018 20:10 Edited at: 11th Dec 2018 20:12
Its only a model loaded in PS.
Created with ac3d and i think it is possible with other apps to.
That are vertex colors.

Look at the screenshot.
At the end of the left side you see the colors.

Attachments

Login to view attachments
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Dec 2018 20:12
Can you post the model so i can see?
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 11th Dec 2018 20:14
Sure, hope *.dae is okay.

Attachments

Login to view attachments
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Dec 2018 20:42 Edited at: 11th Dec 2018 20:52
I must be doing something wrong. it just appears as a grey box for me

Attachments

Login to view attachments
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 11th Dec 2018 20:49
maybe agk couldn´t load it with vertex colors.
or only with another file format.
take a look at the .dae with norepad++ or such app.
you can see how the colors are set.
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Dec 2018 20:52
Yes. That is the problem. AppGameKit doesn't load the colours. That is why the converter creates a texture
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 11th Dec 2018 21:10 Edited at: 11th Dec 2018 21:14
That's what I meant.
AGK does't load it from the file but you can create the vertex attribute and use SetMeshMemblockVertexColor to set the vertex color manually.
I don't use the vertex Color part anywhere... but it is there... for you to discover
The only bit that needs to be done is to parse the file for the color data or check the texture color at the vertex position.
c0d3r9
1
Years of Service
User Offline
Joined: 2nd Oct 2017
Location:
Posted: 11th Dec 2018 21:14
An optional vertex color flag on LoadObject... could help...
But indeed with a palette texture it seems to be easier atm.
Maybe blink0k want to parse all file formats
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Dec 2018 21:15
Quote: "Maybe blink0k want to parse all file formats"

No. Just .obj for now

I will have a play around with the vertex color thing though. Thanks for the tip
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 11th Dec 2018 21:23 Edited at: 11th Dec 2018 21:25
Ah I remember what the problem was.
Kenneys models share vertex data, so they would interpolate between colors, but they need hard edges for this kind of style to work with vertex colors.
Well I also have a hardedge attribute flag in my lib but that would create more vertices, so I think the texture atlas method is the best you can do until we get a proper material system.
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Dec 2018 22:37
So it appears that SetMeshMemblockVertexColor() only works if the mesh has a colour attribute which it doesn't. So i have to re-create the entire memblock.
My head hurts.
I'm going to have a cuppa
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 12th Dec 2018 07:59
Right !
All done in the library
But if you want to do it yourself I can help you ofc
Anyway I think the atlas method is pretty good for kenneys modells
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Green7
13
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 12th Dec 2018 10:29
Agk does in fact load vertex colors, as tested some time ago : https://forum.thegamecreators.com/thread/222817?page=2#msg2629681
But i do not know how kenneys models are built... as janbo stated
Quote: "Kenneys models share vertex data"
this might be the problem.
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Dec 2018 11:05
I will investigate. Thanks Green dude
puzzler2018
User Banned
Posted: 25th Dec 2018 15:46
Hi

Im beginnning to think Kenny models are extremely odd too

Example of one of the OBJ VT data


Whats that about - UVs only go from 0.0 to 1.0

My mind boggles!!!!
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Dec 2018 21:39
I think they are exponential values. To the power of
fubarpk
Moderator
14
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 23rd Jan 2019 05:36
Apart from not all models working, I think its a great little program and works well on kenney models like its supposed to
fubar
blink0k
AGK Developer
Gold Codemaster
6
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Jan 2019 07:05
Thanks fubes. If you have a model that's not converting correctly just let me know and i'll have a look at it.

Login to post a reply

Server time is: 2019-05-21 14:34:28
Your offset time is: 2019-05-21 14:34:28