Minor exporter update

Rhino 3D (Export script developed by SamPage; Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

depursystems
Licensed Customer
Posts: 3
Joined: Wed Jun 13, 2012 10:54 am

Hi Sam,
a great thanks for all the work you do.
Using Rhino v4 SR9 and when I try to send a rendering, displays the following error message.
Thanks in advance for any suggestions.
Good work!

Francesco
Attachments
image1.jpg
User avatar
SamPage
Licensed Customer
Posts: 132
Joined: Mon May 10, 2010 8:56 pm
Location: Burbank, CA

depursystems wrote:Hi Sam,
a great thanks for all the work you do.
Using Rhino v4 SR9 and when I try to send a rendering, displays the following error message.
Thanks in advance for any suggestions.
Good work!

Francesco
Very sorry for the delay in getting to this, it somehow slipped through the cracks. This looks like a V4 error only. Which version of the exporter are you using? My *.rhp complied one, the individual *.rvb files, or gmillas *.rhp? If you are using the individual *.rvb files, then replace functions.rvb with the one attached. I will attempt to recompile this into a *.rhp as well.

Side note to gmillas, if you want to update your code, these are the changes I made (in around line 244 of functions.rvb, there was also a redundant Rhino.UnselectAllObjects in there as well that I took out, so yours might be a couple of lines off):

Code: Select all

	'Select surfaces, Polysurfaces, Blocks, meshes
	'If it is Rhino5, we also want to select extrusions
	If Rhino.Version > 20110309 Then
		'Rhino 5 w/ Extrusions
		arrObjects = Rhino.ObjectsByType(1073745976, False, 3)
	Else
		'Pre extrusions, probably V4
		' V4 didn't have the third argument, object state (normal, locked, and hidden). 
		' In the V5 case above set to take normal and locked objects,
		' don't take hidden.
		'
		' As this doesn't exist in V4, we have to take a slightly more
		' manual approach to leave the hidden objects behind
		' locked objects have already been unlocked above
		Rhino.Command "_SelAll"
		arrObjects = Rhino.GetObjects( , 4152, True, True, False)
	End If
Attachments
Functions.zip
(8.6 KiB) Downloaded 365 times
Win 7 64bit | 2x GTX 285 | i7 920 | ASUS P6T Deluxe | 12GB
depursystems
Licensed Customer
Posts: 3
Joined: Wed Jun 13, 2012 10:54 am

Thanks for your reply Sam.
Your solution has been successful, but when start Octane gives me the following error:

Code: Select all

There was an error parsing the command-line arguments:

Couldn't read argument value from string '2,94827251' Argument: (--cam-pos-x)

USAGE: 

   octane  [-t <node name>] [-m <string>] [-r <filename>] [-l <filename>]
           [-n <filename>] [--imager-exposure <float>] [--daylight-sundir-z
           <float>] [--daylight-sundir-y <float>] [--daylight-sundir-x
           <float>] [--cam-lensshift-right <float>] [--cam-lensshift-up
           <float>] [--cam-aperture <float>] [--cam-focaldepth <float>]
           [--cam-fov <float>] [--cam-motion-up-z <float>]
           [--cam-motion-up-y <float>] [--cam-motion-up-x <float>]
           [--cam-motion-target-z <float>] [--cam-motion-target-y <float>]
           [--cam-motion-target-x <float>] [--cam-motion-pos-z <float>]
           [--cam-motion-pos-y <float>] [--cam-motion-pos-x <float>]
           [--cam-up-z <float>] [--cam-up-y <float>] [--cam-up-x <float>]
           [--cam-target-z <float>] [--cam-target-y <float>]
           [--cam-target-x <float>] [--cam-pos-z <float>] [--cam-pos-y
           <float>] [--cam-pos-x <float>] [-q] [-g <int>] ...  [-s <int>]
           [--output-exr-tm <filename>] [--output-exr <filename>]
           [--output-png16 <filename>] [-o <filename>] [--film-height
           <int>] [--film-width <int>] [-e] [--] [--version] [-h]
           <filename>


Where: 

   -t <node name>,  --target-node <node name>
     Name of the render target node to render

   -m <string>,  --mesh-node <string>
     Name of the mesh node to render.

   -r <filename>,  --relink-meshnode <filename>
     Load the given OBJ mesh file into the mesh node given with
     --mesh-node.

   -l <filename>,  --link-meshnode <filename>
     Create a new mesh node from the given OBJ mesh file

   -n <filename>,  --new <filename>
     Create a new OCS project file from given command line arguments

   --imager-exposure <float>
     Imager Exposure Amount

   --daylight-sundir-z <float>
     Daylight Sun Direction Vector Z Component

   --daylight-sundir-y <float>
     Daylight Sun Direction Vector Y Component

   --daylight-sundir-x <float>
     Daylight Sun Direction Vector X Component

   --cam-lensshift-right <float>
     Lens Shift Right

   --cam-lensshift-up <float>
     Lens Shift Up

   --cam-aperture <float>
     Camera Aperture Radius

   --cam-focaldepth <float>
     Camera Focal Depth

   --cam-fov <float>
     Camera FOV (degrees)

   --cam-motion-up-z <float>
     Camera Up Motion 2nd Vector Z Component

   --cam-motion-up-y <float>
     Camera Up Motion 2nd Vector Y Component

   --cam-motion-up-x <float>
     Camera Up Motion 2nd Vector X Component

   --cam-motion-target-z <float>
     Camera Target Motion 2nd Position Z Component

   --cam-motion-target-y <float>
     Camera Target Motion 2nd Position Y Component

   --cam-motion-target-x <float>
     Camera Target Motion 2nd Position X Component

   --cam-motion-pos-z <float>
     Camera Motion 2nd Position Z Component

   --cam-motion-pos-y <float>
     Camera Motion 2nd Position Y Component

   --cam-motion-pos-x <float>
     Camera Motion 2nd Position X Component

   --cam-up-z <float>
     Camera Up Vector Z Component

   --cam-up-y <float>
     Camera Up Vector Y Component

   --cam-up-x <float>
     Camera Up Vector X Component

   --cam-target-z <float>
     Camera Target Position Z Component

   --cam-target-y <float>
     Camera Target Position Y Component

   --cam-target-x <float>
     Camera Target Position X Component

   --cam-pos-z <float>
     Camera Position Z Component

   --cam-pos-y <float>
     Camera Position Y Component

   --cam-pos-x <float>
     Camera Position X Component

   -q,  --quiet
     Start Application without splash and minimized window

   -g <int>,  --gpu <int>  (accepted multiple times)
     add GPU device to use for rendering (0 = first)

   -s <int>,  --samples <int>
     Maximum number of samples per pixel (maxsamples)

   --output-exr-tm <filename>
     Output tonemapped EXR image file when maxsamples is reached

   --output-exr <filename>
     Output EXR image file when maxsamples is reached

   --output-png16 <filename>
     Output 16-bit PNG image file when maxsamples is reached

   -o <filename>,  --output-png <filename>
     Output PNG image file when maxsamples is reached

   --film-height <int>
     Film height

   --film-width <int>
     Film width

   -e,  --exit
     Close the application when rendering is done

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.

   <filename>
     .OCS Project scene file


   OctaneRender
I hope you can help me again.

Francesco
User avatar
SamPage
Licensed Customer
Posts: 132
Joined: Mon May 10, 2010 8:56 pm
Location: Burbank, CA

depursystems wrote:Thanks for your reply Sam.
Your solution has been successful, but when start Octane gives me the following error:

...

I hope you can help me again.

Francesco
If you run OctaneExportMeshes (if you don't have a button for it, you can get it by running RunScript, then choose OctaneExportMeshes), it should output to the command line the string that it is being passed to Octane. Can you copy and past that string here?

Sam
Win 7 64bit | 2x GTX 285 | i7 920 | ASUS P6T Deluxe | 12GB
depursystems
Licensed Customer
Posts: 3
Joined: Wed Jun 13, 2012 10:54 am

Hi Sam
the "OctaneExportMeshes" work from commend bar but there is always the problem of duplicate materials so I finally resolved with the release of Rhino V5 WIP.
No problems with the exporter and no problems with duplicate materials.
Thank you again for your help.

Francesco
gmillas
Licensed Customer
Posts: 45
Joined: Fri Jun 25, 2010 6:15 am
Location: Greece
Contact:

This is a fresh version with corrected .rui file
Attachments
RenderOctane.zip
(186.91 KiB) Downloaded 436 times
User avatar
justix
Licensed Customer
Posts: 585
Joined: Sat Feb 27, 2010 8:01 pm

gmillas wrote:This is a fresh version with corrected .rui file
is this working on 4 Sr9? cause it does not initialize octanefunctions and if I do try to launch the command manually it gives me Script error...

confused on which one is the very latest for both V4 and v5Wip

Help
Win 7 64 | 2 X MSI AERO GtX 1070| Intel I7-6850K| 32 GB DDR4 RAM | Asus X99 II-A
User avatar
Daniel79
Licensed Customer
Posts: 451
Joined: Tue Jan 26, 2010 3:53 pm
Location: Italy

I hope you can help me:

#I have rhino 5 beta V.30/08/2012 (last)
#I installed the exporter of GMillas but the render don't start and i see this message:
There was an error parsing the command-line arguments:

Couldn't read argument value from string '-3,25367189' Argument: (--cam-pos-x)

USAGE:

octane [-t <node name>] [-m <string>] [-r <filename>] [-l <filename>]
[-n <filename>] [--imager-exposure <float>] [--daylight-sundir-z
<float>] [--daylight-sundir-y <float>] [--daylight-sundir-x
<float>] [--cam-lensshift-right <float>] [--cam-lensshift-up
<float>] [--cam-aperture <float>] [--cam-focaldepth <float>]
[--cam-fov <float>] [--cam-motion-up-z <float>]
[--cam-motion-up-y <float>] [--cam-motion-up-x <float>]
[--cam-motion-target-z <float>] [--cam-motion-target-y <float>]
[--cam-motion-target-x <float>] [--cam-motion-pos-z <float>]
[--cam-motion-pos-y <float>] [--cam-motion-pos-x <float>]
[--cam-up-z <float>] [--cam-up-y <float>] [--cam-up-x <float>]
[--cam-target-z <float>] [--cam-target-y <float>]
[--cam-target-x <float>] [--cam-pos-z <float>] [--cam-pos-y
<float>] [--cam-pos-x <float>] [-q] [-g <int>] ... [-s <int>]
[--output-exr-tm <filename>] [--output-exr <filename>]
[--output-png16 <filename>] [-o <filename>] [--film-height
<int>] [--film-width <int>] [-e] [--] [--version] [-h]
<filename>


Where:

-t <node name>, --target-node <node name>
Name of the render target node to render

-m <string>, --mesh-node <string>
Name of the mesh node to render.

-r <filename>, --relink-meshnode <filename>
Load the given OBJ mesh file into the mesh node given with
--mesh-node.

-l <filename>, --link-meshnode <filename>
Create a new mesh node from the given OBJ mesh file

-n <filename>, --new <filename>
Create a new OCS project file from given command line arguments

--imager-exposure <float>
Imager Exposure Amount

--daylight-sundir-z <float>
Daylight Sun Direction Vector Z Component

--daylight-sundir-y <float>
Daylight Sun Direction Vector Y Component

--daylight-sundir-x <float>
Daylight Sun Direction Vector X Component

--cam-lensshift-right <float>
Lens Shift Right

--cam-lensshift-up <float>
Lens Shift Up

--cam-aperture <float>
Camera Aperture Radius

--cam-focaldepth <float>
Camera Focal Depth

--cam-fov <float>
Camera FOV (degrees)

--cam-motion-up-z <float>
Camera Up Motion 2nd Vector Z Component

--cam-motion-up-y <float>
Camera Up Motion 2nd Vector Y Component

--cam-motion-up-x <float>
Camera Up Motion 2nd Vector X Component

--cam-motion-target-z <float>
Camera Target Motion 2nd Position Z Component

--cam-motion-target-y <float>
Camera Target Motion 2nd Position Y Component

--cam-motion-target-x <float>
Camera Target Motion 2nd Position X Component

--cam-motion-pos-z <float>
Camera Motion 2nd Position Z Component

--cam-motion-pos-y <float>
Camera Motion 2nd Position Y Component

--cam-motion-pos-x <float>
Camera Motion 2nd Position X Component

--cam-up-z <float>
Camera Up Vector Z Component

--cam-up-y <float>
Camera Up Vector Y Component

--cam-up-x <float>
Camera Up Vector X Component

--cam-target-z <float>
Camera Target Position Z Component

--cam-target-y <float>
Camera Target Position Y Component

--cam-target-x <float>
Camera Target Position X Component

--cam-pos-z <float>
Camera Position Z Component

--cam-pos-y <float>
Camera Position Y Component

--cam-pos-x <float>
Camera Position X Component

-q, --quiet
Start Application without splash and minimized window

-g <int>, --gpu <int> (accepted multiple times)
add GPU device to use for rendering (0 = first)

-s <int>, --samples <int>
Maximum number of samples per pixel (maxsamples)

--output-exr-tm <filename>
Output tonemapped EXR image file when maxsamples is reached

--output-exr <filename>
Output EXR image file when maxsamples is reached

--output-png16 <filename>
Output 16-bit PNG image file when maxsamples is reached

-o <filename>, --output-png <filename>
Output PNG image file when maxsamples is reached

--film-height <int>
Film height

--film-width <int>
Film width

-e, --exit
Close the application when rendering is done

--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.

--version
Displays version information and exits.

-h, --help
Displays usage information and exits.

<filename>
.OCS Project scene file


OctaneRender


#I run OctaneExportMeshes and this is the string that it is being passed to octane:
File scritto con successo come C:\Users\Daniel\Desktop\OC\ISTANZE_PROVA\Scacchiera.obj
"C:\Users\Daniel\Desktop\OC\OctaneRender_TEST_1030_beta300_win64\octane.exe" -l "C:\Users\Daniel\Desktop\OC\ISTANZE_PROVA\Scacchiera.obj" -m Scacchiera.obj --cam-pos-x -3,25367189 --cam-pos-y 65,50555828 --cam-pos-z 79,82382224 --cam-target-x 14,94824272 --cam-target-y 12,91458539 --cam-target-z 8,93578344 --cam-up-x 0,14512862 --cam-up-y 0,81208167 --cam-up-z -0,56520885 --cam-fov 55,86344398 --film-width 729 --film-height 330


Can you help me?? Please
SORRY, MY ENGLISH IS BAD!
2 Xeon quad core E5440_8gb Ram_Nvidia GeForce 2GTX 780ti 3Gb/Nvidia Quadro K2000_Win10 64bit_Octane 3.02_Rhinoceros3D
User avatar
SamPage
Licensed Customer
Posts: 132
Joined: Mon May 10, 2010 8:56 pm
Location: Burbank, CA

Daniel79 wrote:I hope you can help me:

#I have rhino 5 beta V.30/08/2012 (last)
#I installed the exporter of GMillas but the render don't start and i see this message:
There was an error parsing the command-line arguments:

Couldn't read argument value from string '-3,25367189' Argument: (--cam-pos-x)

...

#I run OctaneExportMeshes and this is the string that it is being passed to octane:
File scritto con successo come C:\Users\Daniel\Desktop\OC\ISTANZE_PROVA\Scacchiera.obj
"C:\Users\Daniel\Desktop\OC\OctaneRender_TEST_1030_beta300_win64\octane.exe" -l "C:\Users\Daniel\Desktop\OC\ISTANZE_PROVA\Scacchiera.obj" -m Scacchiera.obj --cam-pos-x -3,25367189 --cam-pos-y 65,50555828 --cam-pos-z 79,82382224 --cam-target-x 14,94824272 --cam-target-y 12,91458539 --cam-target-z 8,93578344 --cam-up-x 0,14512862 --cam-up-y 0,81208167 --cam-up-z -0,56520885 --cam-fov 55,86344398 --film-width 729 --film-height 330


This looks like its due to using a comma as the delimiter rather than a decimal point. Taking a look at it now.

Sam
Win 7 64bit | 2x GTX 285 | i7 920 | ASUS P6T Deluxe | 12GB
User avatar
SamPage
Licensed Customer
Posts: 132
Joined: Mon May 10, 2010 8:56 pm
Location: Burbank, CA

OK Daniel,

The attached should address this issue. Only the Functions.rvb file has changed. Let me know if you need assistance loading the rvb.

For gmillas, if you are following on and want to recompile with your more bullet proof system, the change comes on line 200 of the functions.rvb, just adding the following:

Code: Select all


strCommand = Replace(strCommand, ", ", ".")

' Then comes the existing bit of code:

' If the user wants to print the result, then we don't pass the scene to Octane
If bPrintResult Then
	Rhino.Print strCommand
Else
	Rhino.Print "Passing scene to Octane"
	
	Dim wshShell
	Set wshShell = CreateObject("WScript.shell")
	wshShell.run strCommand, 1, False
	Set wshshell = Nothing
End If
Attachments
RenderOctane.zip
Only the Functions.rvb file has been updated in this zip
(11.15 KiB) Downloaded 447 times
Win 7 64bit | 2x GTX 285 | i7 920 | ASUS P6T Deluxe | 12GB
Post Reply

Return to “Rhinoceros 3D”