Author Topic: [Tutorial] Creating Brick Icons  (Read 1644 times)

Creating Brick Icons


Introduction
This is a tutorial I made to help people make brick icons. This tutorial in no way teaches you how to make bricks, it assumes you already have a brick made and just need to make the icon.


Preparation
To start make a folder called iconShots in your Blockland folder.



Now start up Blockland and start a custom game with your brick enabled. Make sure you have the colorset set to the default one or the color of the icon will be messed up.


Taking The Screenshot
Now once you've spawned say /doItemIcon (this will make a screenshot named ERROR appear in your iconShots folder, but you can delete that). This will make your camera move under the map. Be careful not to move your camera until you are finished.

Now say /doIcon whatever is in between the words brick and data in the datablock name. And that should make your brick appear in front and of you and it will automatically take a screenshot and put it in your iconShots folder. Be sure your brick's datablock name is brickWhateverData.


Finishing Touches
Now that you have your screeenshot in your iconShots folder you want to crop it around the brick and resize the image to 96 x 96 and use an image editing program to edit out the background around your brick (Adobe Photoshop Elements Editor works good for this).



If you have any problems ask away here.
« Last Edit: December 18, 2012, 08:10:39 AM by jes00 »

Thank you very much, We really did need a tutorial on making brick icons as there are lots of players that aren't sure how and this will be very helpful to them, Thank you and have a wonderful day.

With this tutorial you can take a brick like this:



And make an awesome icon for it like this:


Nice try but no dice.



Also this:
Code: [Select]
base/server/scripts/allGameScripts.cs (7713): Register object failed for object (null) of class Item.
Set::add: Object "0" doesn't exist

base/server/scripts/allGameScripts.cs (7715): Unable to find object: '0' attempting to call function 'setTransform'
BackTrace: ->serverCmdDoItemIcon


base/server/scripts/allGameScripts.cs (7716): Unable to find object: '0' attempting to call function 'setNodeColor'
BackTrace: ->serverCmdDoItemIcon


base/server/scripts/allGameScripts.cs (7717): Unable to find object: '0' attempting to call function 'schedule'
BackTrace: ->serverCmdDoItemIcon


base/server/scripts/allGameScripts.cs (7673): Unable to find object: '0' attempting to call function 'getClassName'
BackTrace: ->doIconScreenshot

OP please try doing "PineTree".

Nice try but no dice.



OP please try doing "PineTree".
So what? Zoom out a little.
Also this:
Code: [Select]
base/server/scripts/allGameScripts.cs (7713): Register object failed for object (null) of class Item.
Set::add: Object "0" doesn't exist

base/server/scripts/allGameScripts.cs (7715): Unable to find object: '0' attempting to call function 'setTransform'
BackTrace: ->serverCmdDoItemIcon


base/server/scripts/allGameScripts.cs (7716): Unable to find object: '0' attempting to call function 'setNodeColor'
BackTrace: ->serverCmdDoItemIcon


base/server/scripts/allGameScripts.cs (7717): Unable to find object: '0' attempting to call function 'schedule'
BackTrace: ->serverCmdDoItemIcon


base/server/scripts/allGameScripts.cs (7673): Unable to find object: '0' attempting to call function 'getClassName'
BackTrace: ->doIconScreenshot
Unfortunately there is no way to prevent this. But it's not like it's gonna kill you.
« Last Edit: December 18, 2012, 11:04:08 AM by jes00 »


Zoom out how?
How? Your camera is in that flying admin mode. Just go backwards how you normally would (you might want to hold the crouch or walk keys to make yourself go slower though (or both)).

Your camera is in that flying admin mode.
Oh I didn't notice that.

That means I have to:
  • Manually take a screenshot while the texture quality depends on your GPU 3D settings
  • Crop the image to the correct size and that requires resizing the image so the brick fits the image pixel perfect. This could reduce the texture quality depending on how you do it. I'd argue you will never get perfect results if you resize the image. Of course you could spend several minutes aligning your camera so the brick is already at the correct size when you take the screenshot.
  • Save the screenshot in an image editor for each brick.
  • You need the actual brick to be working in Blockland.
The above takes roughly 2 minutes.

My Blender setup:
  • I resize the model to the correct size. It's a rather crappy setup so this step takes ~20 seconds.
  • Set the stud texture repeating to the correct value for the brick size.
  • Align the camera size and location so the brick fits the image nicely, render.
  • Rename the PNG.
This takes about a minute per brick. The rendered PNG is ready for use.

If I wanted to get real fancy and stuff I could everything above with Python so the entire process would just require the user inputting the brick XYZ sizes and reduce the time to ~5 seconds per brick.

Here. Take a guess which brick I rendered in Blender just now.


No thanks, I'll stick to my Blender setup. It's not perfect but it's close enough. Did the job just fine for these 111 bricks.

  • Manually take a screenshot while the texture quality depends on your GPU 3D settings
Actually it automatically takes the screenshot.
My Blender setup:
  • I resize the model to the correct size. It's a rather crappy setup so this step takes ~20 seconds.
  • Set the stud texture repeating to the correct value for the brick size.
  • Align the camera size and location so the brick fits the image nicely, render.
  • Rename the PNG.
This takes about a minute per brick. The rendered PNG is ready for use.

If I wanted to get real fancy and stuff I could everything above with Python so the entire process would just require the user inputting the brick XYZ sizes and reduce the time to ~5 seconds per brick.

Here. Take a guess which brick I rendered in Blender just now.


No thanks, I'll stick to my Blender setup. It's not perfect but it's close enough. Did the job just fine for these 111 bricks.
So you have a model for every brick you make? Why?

Actually it automatically takes the screenshot.
The image I posted is the screenshot it took.

So you have a model for every brick you make? Why?
I don't keep the model. I adjust the size depending on my needs.

Well. You stick with your way and I'll stick with mine.