truespace compositing nodes released

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5429
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: truespace compositing nodes released

Post by clintonman »

trueBlue wrote: 09 May 2020, 14:55 Is it possible to save a sequence of files to disk with your Image Saver?
BTW... getting undefined errors with this object.
I notice that your are saving a sequence of bitmaps into an Encapsulate node with your 'image sequence loader with scale'. :worship:
Was trying to see if I could Import and then Export a sequence of bitmaps at 0.5 Scale.
Image Saver.png
I'll have to get back to you on that. I had no recollection of the 'image sequence loader with scale'.
Went to check it on the webpage: http://clintons3d.com/plugins/truespace ... eNode.html
and it had in bold, "An experimental/unfinished node called "image sequence loader with scale" is included in the library/zip. Do not use it."

Workaround for saving a sequence from the same page:
"Use the Truespace "Render to File" to render a dummy sequence which in turn will force each frame to be evaluated."
This would save a sequence of images from the image saver
Clinton Reese

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

Re: truespace compositing nodes released

Post by trueBlue »

clintonman wrote: 09 May 2020, 16:16 I'll have to get back to you on that. I had no recollection of the 'image sequence loader with scale'.
Went to check it on the webpage: http://clintons3d.com/plugins/truespace ... eNode.html
and it had in bold, "An experimental/unfinished node called "image sequence loader with scale" is included in the library/zip. Do not use it."
Hummm... I'll have to disagree, it works really well! :worship:
Very useful for sharing a sequence of images in a scene and reducing the file size. :D
I changed it from Create to Copy so that I could experiment with changing the InputBitmap's attributes.

Code: Select all

//newimage = Node.Create("D3D View Package/InputBitmap", encaps);
newimage = Node.Copy(System.ThisOwner() + "/InputBitmap", encaps);
clintonman wrote: 09 May 2020, 16:16 Workaround for saving a sequence from the same page:
"Use the Truespace "Render to File" to render a dummy sequence which in turn will force each frame to be evaluated."
This would save a sequence of images from the image saver
Still testing your workaround, but so far, since it is a jScript, it does not work with Animation. IE: Render to File

Just seems that if you can save the Bitmaps to an Encaps, you would think you could also save to disk using your Save As plugin.
User avatar
clintonman
Captain
Posts: 5429
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: truespace compositing nodes released

Post by clintonman »

trueBlue wrote: 09 May 2020, 17:59 ...
Still testing your workaround, but so far, since it is a jScript, it does not work with Animation. IE: Render to File

...
I believe jscript objects work with render to file and jscript commands don't.
Clinton Reese

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

Re: truespace compositing nodes released

Post by trueBlue »

Image Saver.png
Image Saver.png (16.03 KiB) Viewed 3529 times
Image Savers.png
Image Saver/Save As "Image on the Left" Included in the Components - Compositing library and the current Unofficial Updates
PNG
TGA
EXF
HDR
JPG
TIF
Note: Missing BMP and DDS

Other Image Saver/Save As "Image on the Right" Is available on your web site: http://clintons3d.com/plugins/truespace ... eNode.html
BMP
JPG
TGA
PNG
DDS
HDR
Note: Missing TIF and EXF?

Both of these Image Savers creates a Model Status message "file dialog aborted" if you Cancel the Save As and it is not cleared.

I would like to update the image saver.RsObj in the Unofficial Updates with your newer version.
Is it possible to add the TIF options? That is of course if it supported with your Clintons3dPluginExt.rsx plugin.
Edit: Did a test and the image saver did not save an image using tif and or tga
User avatar
clintonman
Captain
Posts: 5429
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: truespace compositing nodes released

Post by clintonman »

Did some digging and on the surface it looks like the bitmap file save command only works with some extensions:
From the Kernel.h file

Code: Select all

enum RtBitmapFileFormat
    {	BFILEFMT_BMP	= 0,
	BFILEFMT_JPG	= 1,
	BFILEFMT_TGA	= 2,
	BFILEFMT_PNG	= 3,
	BFILEFMT_DDS	= 4,
	BFILEFMT_DIB	= 6,
	BFILEFMT_HDR	= 7,
	BFILEFMT_PFM	= 8,
	BFILEFMT_FORCE_DWORD	= 2147483647
    } ;
I'm surprised TGA doesn't work but maybe a slightly different command is needed. It uses SaveToFile, maybe it needs to use SaveToFileEx.
From the Docs:

Code: Select all

HRESULT IRdBitmap::SaveToFile ( [in] RtBitmapFileFormat  Format,	[in] BSTR  FileName	 ) 			

This method is used to save image to a file. 

Code: Select all

HRESULT IRdBitmap::SaveToFileEx ( [in] RtBitmapFileFormat  Format,[in] BSTR  FileName	 ) 			

This method is used to save image to a file using external image library (alpha channel supported).
Nope, that's not it. Just did a test and TGA save was good without any changes to the saver.

Looks like formats not included in the list above would need a different way to save the images.
Clinton Reese

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

Re: truespace compositing nodes released

Post by trueBlue »

I was testing this the wrong way.
I was expecting it to save an image by just using the Save As button.
I see now that it is an jScript Object and that you need to run the Render to File. :oops:
I have updated the image saver.RsObj to your newest one and will upload to the Unofficial Updates.
The older one has a Save As tif option that does not work.
User avatar
clintonman
Captain
Posts: 5429
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: truespace compositing nodes released

Post by clintonman »

trueBlue wrote: 13 May 2020, 21:44 I was testing this the wrong way.
I was expecting it to save an image by just using the Save As button.
I see now that it is an jScript Object and that you need to run the Render to File. :oops:
I have updated the image saver.RsObj to your newest one and will upload to the Unofficial Updates.
The older one has a Save As tif option that does not work.
When you do the "Save As" button it should save something immediately if the "enableSave" checkbox is active.
Clinton Reese

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

Re: truespace compositing nodes released

Post by trueBlue »

Why does checking Color create half B&W and Half color Bitmap?
Image Cloud.png
Image Cloud.png (13.02 KiB) Viewed 2067 times
User avatar
clintonman
Captain
Posts: 5429
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: truespace compositing nodes released

Post by clintonman »

trueBlue wrote: 10 Dec 2021, 20:59 Why does checking Color create half B&W and Half color Bitmap?
Image Cloud.png
I would say it's a bug.
Clinton Reese

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

Re: truespace compositing nodes released

Post by trueBlue »

I found an issue with the image sequence loader with scale
Not even sure how it was working :o
Problem is, the SwitchImage script is connecting an IN attribute to another IN attribute

Code: Select all

//	Node.ConnectTo(newimage, "Bitmap", switchnode, "Bitmap")
	Node.ConnectTo(newimage, "oBitmap", switchnode, "Bitmap")
Post Reply