Page 1 of 1

[SOLVED] Having problems texturing items and icons

Posted: Mon Dec 31, 2012 5:19 am
by Jendon23
Hello, I'm new to modding in Grimrock and the forums, so i'm sorry if I ask stupid questions.
Issue 1:
I'm trying to create a new item that copies from the goromorg miniature, it would look the same, except a different color. Except whenever I see it in game, it is completely black. I made another item with no texture change, and it appears how it should, like a normal miniature.

Issue 2:
When I create the new icon for my item, with this code in items.lua

Code: Select all

cloneObject{
	name = "goromorg_red_idol",
	baseObject = "golden_goromorg",
	uiName = "red goromorg",
	description = "its red",
	model = "mod_assets/models/items/goromorg_red_idol.fbx",
	gfxIndex = 3,
	gfxAtlas = "mod_assets/textures/mod_items.tga",
	weight = 0.3,
	glitterEffect = "glitter_gold",
	treasure = true,
}
the icon for it appears as a black square.

It seems that every texture I try to change turns out wrong, so I'm hoping somebody can help me. :)

Re: Having problems texturing items and icons

Posted: Mon Dec 31, 2012 1:16 pm
by germanny
The icons have to be exact positioned in the icon atlas. AND you need the alphachannel activated because the background will be black if not.
Here is a Photoshop file with layers that works!
icoatlas_512x512.7z
The alphachannel is not set within, you have to do that after paste/paint your new icon.
Or - if ready, deactivate the grid layer + bg layer and save as png + transparency.

Ah, forget that - safe as DDS 8.8.8.8 ARGB.

Re: Having problems texturing items and icons

Posted: Fri Jan 04, 2013 7:11 pm
by Jendon23
can alphachannel be set with paint.net? The tutorial recommended Gimp or PhotoShop...

Re: Having problems texturing items and icons

Posted: Fri Jan 04, 2013 10:04 pm
by undeaddemon
OK... SOOOooo......
I just started looking at this - how to modify the "icons" that inventory uses....

I see everything looks to be stored in /assets/textures/gui/
items.dds and items_2.dds

But I don't understand how they are being referenced from a single file.

Anyhelp??

Re: Having problems texturing items and icons

Posted: Fri Jan 04, 2013 10:23 pm
by Isaac
undeaddemon wrote:OK... SOOOooo......
I just started looking at this - how to modify the "icons" that inventory uses....

I see everything looks to be stored in /assets/textures/gui/
items.dds and items_2.dds

But I don't understand how they are being referenced from a single file.

Anyhelp??
Icons reside in a texture atlas. The game ships with two, but you can make your own. The alas is just a large square picture with a lot of icons in it. To use an atlas you reference it in the Item's definition; (just like you have done). Your definition in post #1 references Atlas icon #3, in the Atlas mod_items.dds; so you will need to include the mod_items.dds file and ensure that you want the 3rd icon for your object.

Here is an atlas template that I made for myself, and others to use:
For Photoshop users I have a template set to make Icon editing easy:
https://docs.google.com/open?id=0B2XjRU ... U9ZX2Z5ZnM

For Gimp 2.8 users: Gimp will open a photoshop file. 'The grid method' mentioned in the template file should work with Gimp. The tool names are different, but the functions are similar, and should work.

Using the template (or not), you would add your icon to the grid [exactly ~pixel accurate], and reference the slot/ area that your icon occupies.
Image

Re: Having problems texturing items and icons

Posted: Fri Jan 04, 2013 10:41 pm
by undeaddemon
ok.. so.. I made.... something....

and I call it in objects.lua via:
gfxAltas tells it the file
gfzIndex tells it which icon in the image??

Re: Having problems texturing items and icons

Posted: Fri Jan 04, 2013 10:43 pm
by undeaddemon
hmmmf "could not find asset process in index_TDA.dds

--OK... so I got it to load up.. the icon is invisible.....

Re: Having problems texturing items and icons

Posted: Sat Jan 05, 2013 4:40 am
by Jendon23
thanks for the help Isaac! I'm actually using paint.net, and I just forgot to check "Generate Mipmaps" and now it all works perfectly! I now have several multicolored goromorgs for my dungeon :D