Icon Maker for toolbar buttons

User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Icon Maker for toolbar buttons

Post by clintonman »

IconMakerTemplate.jpg
image shows the rendered result on the left, a square aspect 3d window to layout the image and the script panel used to generate the image.

This tool will render out a toolbar button compatible image for workspace.
I make most icons from truespace D3D renders then finish them up in photoshop.
This template file will be much easier since I get the final image in one step and can see if it will work instead of going back and forth between trueSpace and an image editor.

requires:
Clintons3dplugins.rsx file
custom post process filter
optdetectors to see the result inside truespace

note: the plugin and custom filter are included in the unofficial updates

http://clintons3d.com/plugins/truespace ... createicon
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Icon Maker for toolbar buttons

Post by trueBlue »

This is great! :worship:
Notice if you fiddle with the Pause Time you can get a crisp image between renders.
As an example:
Render with the Pause Time set @ 3000, then 5000, and then back to 3000
Does not work all of the time and you have to try different Pause Time(s)

Took me a little bit to figure out that you need to use the TGA file for the icon :mrgreen:
Screenshot (5).png
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Icon Maker for toolbar buttons

Post by clintonman »

Glad you like it.
I have an improved version that was used to create the snapping icons. The current published version sometimes fails to create the alpha channel properly, so be sure you see a black and white image is created before using the final image in a button.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Icon Maker for toolbar buttons

Post by trueBlue »

clintonman wrote: 08 Nov 2020, 17:46 Glad you like it.
I have an improved version that was used to create the snapping icons. The current published version sometimes fails to create the alpha channel properly, so be sure you see a black and white image is created before using the final image in a button.
Are the changes to the GenerateTGA script?
Can you share the script changes?
I have a modified version with several tweaks. :mrgreen:
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Icon Maker for toolbar buttons

Post by clintonman »

You got it.
Updated version of the script now on the website.

More reliable alpha generation
Inputs for width and height.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Icon Maker for toolbar buttons

Post by trueBlue »

clintonman wrote: 08 Nov 2020, 18:24 You got it.
Updated version of the script now on the website.

More reliable alpha generation
Inputs for width and height.
Hummm... not seeing anything different in the scripts nor the Inputs for width and height
The file name is the same as the previous:
IconTemplate30

Edit: I downloaded the wrong file
Checking... Icon Maker.RsObj updated script now
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Icon Maker for toolbar buttons

Post by trueBlue »

Much better, thank you!
No more fuzzy images and seems to work every time. :worship:
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Icon Maker for toolbar buttons

Post by trueBlue »

Found a Bug in the Begin script if no file is entered in the IconFilename
Error Selected file folder does not Exist.png
Error Selected file folder does not Exist.png (8.59 KiB) Viewed 2951 times
Add

Code: Select all

	if(!Node.Value(System.ThisOwner(), "IconFilename")) {
		System.Alert("Select a file to render first");
		params.SetTerminationFlag();
		return;
	}
Some things I do not understand with the IconFile script
You are suppose the enter the path to an image.jpg in the Animation folder, but that image never gets rendered
To test this, enter the path to an image.jpg, before you render, delete the image.
Still renders the other 3 images
If you Cancel the Render to File, the IconFilename & IconFileShort is removed from the panel, which caused the above error

In the UU(s) the Saved settings for the Render to File is:

Code: Select all

<?xml version="1.0" encoding="UTF-16" ?>
<D3DVIEW_RENDERTOFILE_SETTINGS>
    <!--  This file contains the configuration settings for Render To File tool in Player -->
    <D3DVIEW_RENDERTOFILE_CURRENT CHOSENPRESET="VGA 4:3 (1.33:1) - 640 x 480" WIDTH="640" HEIGHT="480" FILENAME="C:\trueSpace761Std\Animation Folder\Image.png" SAVEINSEQUENCE="1" SEQUENCESTART="0" SAVEINANIMATION="0" ANIMATIONSTART="0" ANIMATIONEND="0" />
</D3DVIEW_RENDERTOFILE_SETTINGS>
Sooooo, in the above error, this is getting changed

Also the Render to File changes to:
C:\trueSpace761\tS\Animation Folder\Icon_alpha.jpg
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Icon Maker for toolbar buttons

Post by trueBlue »

Try this and see if you like it :mrgreen:

3D Icon Maker
Icon Maker
version November 8, 2020 Author - Clinton Reese

Modifications & Additions

Modified the OptDetector script to not show the aspect toolbar or button

Add - Workspace - Ground set to None
Add - First Letter & First Letter Dropshadow
Add - Second Letter & Second Letter Dropshadow

Add - Current version of Workspace Layers 3 with a modal question script for the Initialize Layers button

Add - Auto Load script that opens the Icon Maker panel, Layers panel, and the EntryPoint Camera Render to File window

Create button & EntryPoint camera script opens a new Window (400x400) and runs D3DView.ShowPostProcessing('')

Open Toolbar button loads an included toolbar that has the toolbar button hooked up to the last rendered tga file

Select Toolbar Button button selects the button for saving to your library

General Use
Change the First & Second text including their Dropshadow text
Press Create
Press Open Toolbar
Press Select Toolbar Button
Enter the buttons attributes and Save to your library
Repeat.....
Or hide the text in Layers and add 3D objects between the alphaPlane & EntryPoint camera

Caution!
This is a template...
Do not rename the scene nor any nodes!
Save the generated toolbar button
Do not change the text material using the Material Editor!
Attachments
3D Icon Maker.RsScn
(2.38 MiB) Downloaded 153 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Icon Maker for toolbar buttons

Post by clintonman »

Sounds good, I'll see if I can fix the "do not rename anything" limitation. I'll try it next time I make icons.

What is an "EntryPoint camera"?

What happens to text when you change the material?

A couple of other things you can add would be to close the cube widget and hide the object navigation widget since it looks like they affect the alpha.
Clinton Reese

http://clintons3d.com
Post Reply