Command Line

Started by AndyCocker, December 21, 2006, 12:44:42 PM

Previous topic - Next topic

AndyCocker

Hi,

I'm trying to start TG2TP from the command-line, but am getting lots of errors such as:

CreateObject: Unrecognised class: sphere_geometry_shader

It's possibly a path issue, but I can't get it to work.

Here's my commands:

set TERRAGEN_PATH="C:\Program Files\Planetside Software\Terragen 2 Technology Preview"

%TERRAGEN_PATH%\tgdcli.exe "G:\My Documents\Terragen\TG2\Scenes\Sunrise001.tgd" -hide -exit -r -o "G:\My Documents\Terragen\TG2\Output\Sunrise.%04d.IMAGETYPE.exr"


Here's the complete CLI output:


G:\My Documents\Terragen\TG2>"C:\Program Files\Planetside Software\Terrage
n 2 Technology Preview"\tgdcli.exe "G:\My Documents\Terragen\TG2\Scenes\Sunrise0
01.tgd" -hide -exit -r -o "G:\My Documents\Terragen\TG2\Output\Sunrise.sunrise4d
.IMAGETYPE.exr"
<<<### APP RUN STARTED ###>>>
Terragen 2 Technology Preview 1 (build 1.8.64.0)
TERRAGEN_PATH="C:\Program Files\Planetside Software\Terragen 2 Technology Previe
w"
AddClass: added class group (268577040 268577136)
AddClass: added class null (268577696 268577792)
AddClass: added class camera (268577808 268577904)
AddClass: added class render (268577920 268578016)
AddClass: added class lwo_micro_exporter (268578032 268578128)
AddClass: added class heightfield_load (268578144 268578240)
AddClass: added class lwo_reader (268580512 268578288)
AddClass: added class obj_reader (268578304 268578400)
AddClass: added class plane (268578416 268578512)
AddClass: added class disc (268578528 268578624)
AddClass: added class sphere (268578640 268578736)
AddClass: added class sunlight (268578752 268578848)
AddClass: added class light_source (268578864 268578960)
AddClass: added class enviro_light (268578976 268579072)
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\
No files matching *.tgp in this directory
Loaded 0 modules in this directory
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\plugins\
No files matching *.tgp in this directory
Loaded 0 modules in this directory
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\plugins\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\..\..\tgdplugins\
No files matching *.tgp in this directory
Loaded 0 modules in this directory
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\..\..\tgdplugins\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\..\..\tgdplugins\nt_intel\
No files matching *.tgp in this directory
Loaded 0 modules in this directory
Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\..\..\tgdplugins\nt_intel\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loaded a total of 0 plugin modules
Found existing prefs file
False UCBool
Successfully parsed prefs file
ReadXML: Attempting to read file: "C:\Program Files\Planetside Software\Terragen
2 Technology Preview\Terragen_2.ucr\Generic\default.xml"
creating camera (268577808)
creating render (268577920)
creating render (268577920)
creating enviro_light (268578976)
creating sunlight (268578752)
creating sphere (268578640)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
ReadXML: done
Content path for "Project" set to "C:\Program Files\Planetside Software\Terragen
2 Technology Preview\Terragen_2.ucr\Generic\"
Content path for "Project" set to ""
creating camera (268577808)
creating camera (268577808)
TG2ContentPathManager : Dumping...
Num paths = 1
TG2ContentPath : Source = Preferences, Type = Library, Recursive
        Path = C:\Program Files\Planetside Software\Terragen 2 Technology Previe
w

Searching for Library Item.txt
Couldn't find Library item
Searching for Library Item Sub.txt
Couldn't find Library sub item
Searching for Test Item 1.txt
Couldn't find User item 1
Searching for Test Item 2.txt
Couldn't find User item 2
Message Sent 0x12f67c : ID = 21
Message Sent 0x12f9a0 : ID = 21
CreateFile succeeded
destroying camera (268577904)
destroying camera (268577904)


Any ideas anyone?

I know I changed the library folder path and am not sure that I returned it to it's correct setting. What should that be?

Regards,

Andy Cocker

Matt

Hi Andy,

I think I know what the problem is.

It is not finding the plugins in the plugins/ directory. You can see that from this line:


Loading plugins in: "C:\Program Files\Planetside Software\Terragen 2 Technology
Preview"\plugins\
No files matching *.tgp in this directory
Loaded 0 modules in this directory


It is OK for all the other plugin directories to be empty, but this one should result in at least 2 modules being loaded.

Now, the reason why that plugin search failed is because there are quotes in %TERRAGEN_PATH%, and this is confusing the construction of the plugins path you see in the above output.

The solution is to remove the quotes from your set %TERRAGEN_PATH% line :-)


set TERRAGEN_PATH=C:\Program Files\Planetside Software\Terragen 2 Technology Preview


Matt
Just because milk is white doesn't mean that clouds are made of milk.

AndyCocker

Quote from: Matt on December 21, 2006, 12:59:57 PM
Now, the reason why that plugin search failed is because there are quotes in %TERRAGEN_PATH%, and this is confusing the construction of the plugins path you see in the above output.

The solution is to remove the quotes from your set %TERRAGEN_PATH% line :-)


set TERRAGEN_PATH=C:\Program Files\Planetside Software\Terragen 2 Technology Preview


Hi Matt,

Removing those quotes was one of the things I've already tried.. in fact I added them to get rid of the following error which occurs when the quotes aren't present:

G:\My Documents\Terragen\TG2>C:\Program Files\Planetside Software\Terragen
2 Technology Preview\tgdcli.exe "G:\My Documents\Terragen\TG2\Scenes\Sunrise001
.tgd" -hide -exit -r -o "G:\My Documents\Terragen\TG2\Output\Sunrise.sunrise4d.I
MAGETYPE.exr"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.


Isn't this balking on the fact that there's a space in the path?

So, it's still not working unfortunately. Anything else it could be?

Regards,

Andy Cocker

Matt

In that case I think you need to put the quotes in when you call the command, like this:


"%TERRAGEN_PATH%\tgdcli.exe" "G:\My Documents\Terragen\TG2\Scenes\Sunrise001
.tgd" -hide -exit -r -o "G:\My Documents\Terragen\TG2\Output\Sunrise.sunrise4d.I
MAGETYPE.exr"

Just because milk is white doesn't mean that clouds are made of milk.

AndyCocker

Thanks for the quick response,

I just tried

set TERRAGEN_PATH=C:\Program Files\Planetside Software\Terragen 2 Technology Preview

"C:\Program Files\Planetside Software\Terragen 2 Technology Preview\tgdcli.exe" "G:\My Documents\Terragen\TG2\Scenes\Sunrise001.tgd" -hide -exit -r -o "G:\My Documents\Terragen\TG2\Output\Sunrise.%04d.IMAGETYPE.exr"


Which removed the previous missing class errors. However, TG2 launched as normal displaying the Tech Preview splash window, which when clicked left TG2TP with the default scene, just sitting there. My scene appears to not have been loaded?

Here's the CLI output now:

G:\My Documents\Terragen\TG2>"C:\Program Files\Planetside Software\Terrage
n 2 Technology Preview\tgdcli.exe" "G:\My Documents\Terragen\TG2\Scenes\Sunrise0
01.tgd" -hide -exit -r -o "G:\My Documents\Terragen\TG2\Output\Sunrise.sunrise4d
.IMAGETYPE.exr"
<<<### APP RUN STARTED ###>>>
Terragen 2 Technology Preview 1 (build 1.8.64.0)
TERRAGEN_PATH=C:\Program Files\Planetside Software\Terragen 2 Technology Preview

AddClass: added class group (268577040 268577136)
AddClass: added class null (268577696 268577792)
AddClass: added class camera (268577808 268577904)
AddClass: added class render (268577920 268578016)
AddClass: added class lwo_micro_exporter (268578032 268578128)
AddClass: added class heightfield_load (268578144 268578240)
AddClass: added class lwo_reader (268580512 268578288)
AddClass: added class obj_reader (268578304 268578400)
AddClass: added class plane (268578416 268578512)
AddClass: added class disc (268578528 268578624)
AddClass: added class sphere (268578640 268578736)
AddClass: added class sunlight (268578752 268578848)
AddClass: added class light_source (268578864 268578960)
AddClass: added class enviro_light (268578976 268579072)
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\
No files matching *.tgp in this directory
Loaded 0 modules in this directory
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\plugins\
AddClass: added class displacement_shader (229838848 229839748)
AddClass: added class function_to_displacement_shader (229838848 229839748)
AddClass: added class constant_colour (229847532 229847704)
AddClass: added class constant_scalar (229847720 229847888)
AddClass: added class constant_vector (229847904 229848092)
AddClass: added class get_altitude (229848108 229848228)
AddClass: added class get_altitude_in_texture (229848244 229848364)
AddClass: added class get_diffuse_colour (229848516 229848636)
AddClass: added class get_emitted_colour (229848652 229848772)
AddClass: added class get_specular_colour (229850284 229850404)
AddClass: added class get_final_alpha (229848788 229848908)
AddClass: added class get_final_colour (229848924 229849044)
AddClass: added class get_final_opacity (229849060 229849180)
AddClass: added class get_frame_number (229849196 229849316)
AddClass: added class get_camera_position (229848380 229848500)
AddClass: added class get_ray_origin (229850148 229850268)
AddClass: added class get_normal (229849604 229849724)
AddClass: added class get_normal_in_geometry (229849332 229849452)
AddClass: added class get_normal_in_texture (229849468 229849588)
AddClass: added class get_position (229850012 229850132)
AddClass: added class get_position_in_geometry (229849740 229849860)
AddClass: added class get_position_in_texture (229849876 229849996)
AddClass: added class add_colour (229839764 229840128)
AddClass: added class add_scalar (229840144 229840508)
AddClass: added class add_vector (229840524 229840888)
AddClass: added class subtract_colour (229840904 229841168)
AddClass: added class subtract_scalar (229841184 229841448)
AddClass: added class subtract_vector (229841464 229841728)
AddClass: added class difference_colour (229841744 229842008)
AddClass: added class difference_scalar (229842024 229842288)
AddClass: added class mix_colour (229842304 229842692)
AddClass: added class mix_scalar (229842708 229843096)
AddClass: added class mix_vector (229843112 229843500)
AddClass: added class component_mix_vector (229843516 229843904)
AddClass: added class negate_colour (229843920 229844040)
AddClass: added class negate_scalar (229844056 229844176)
AddClass: added class negate_vector (229844192 229844312)
AddClass: added class complement_colour (229844328 229844448)
AddClass: added class complement_scalar (229844464 229844584)
AddClass: added class inverse_scalar (229844600 229844720)
AddClass: added class inverse_vector (229844736 229844856)
AddClass: added class rotate_x_vector (229844872 229845156)
AddClass: added class rotate_y_vector (229845172 229845456)
AddClass: added class rotate_z_vector (229845472 229845756)
AddClass: added class abs_colour (229845772 229845892)
AddClass: added class abs_scalar (229845908 229846028)
AddClass: added class abs_vector (229846044 229846164)
AddClass: added class clamp_0_1_colour (229846180 229846300)
AddClass: added class clamp_0_colour (229846316 229846436)
AddClass: added class clamp_colour (229846452 229846840)
AddClass: added class clamp_0_1_scalar (229846856 229846976)
AddClass: added class clamp_0_scalar (229846992 229847112)
AddClass: added class clamp_scalar (229847128 229847516)
AddClass: added class cross_product (229850420 229850684)
AddClass: added class dot_product (229850700 229850964)
AddClass: added class multiply_colour (229850980 229851244)
AddClass: added class multiply_scalar (229851260 229851524)
AddClass: added class multiply_vector (229851540 229851804)
AddClass: added class divide_colour (229851820 229852084)
AddClass: added class divide_scalar (229852100 229852364)
AddClass: added class divide_vector (229852380 229852644)
AddClass: added class modulo_scalar (229860476 229860740)
AddClass: added class power_colour (229852660 229852924)
AddClass: added class power_scalar (229852940 229853204)
AddClass: added class square_colour (229853220 229853340)
AddClass: added class square_scalar (229853356 229853476)
AddClass: added class square_root_colour (229853492 229853612)
AddClass: added class square_root_scalar (229853628 229853748)
AddClass: added class exp_colour (229853764 229853884)
AddClass: added class exp_scalar (229853900 229854020)
AddClass: added class log_colour (229854036 229854156)
AddClass: added class log_scalar (229854172 229854292)
AddClass: added class floor_scalar (229854308 229854428)
AddClass: added class ceiling_scalar (229854444 229854564)
AddClass: added class nearest_integer (229854580 229854700)
AddClass: added class build_colour (229854716 229855304)
AddClass: added class scalar_to_colour (229855320 229855440)
AddClass: added class vector_to_colour (229855456 229855576)
AddClass: added class red_to_scalar (229855592 229855712)
AddClass: added class green_to_scalar (229855728 229855848)
AddClass: added class blue_to_scalar (229855864 229855984)
AddClass: added class luminance_to_scalar (229856000 229856120)
AddClass: added class x_to_scalar (229856136 229856256)
AddClass: added class y_to_scalar (229856272 229856392)
AddClass: added class z_to_scalar (229856408 229856528)
AddClass: added class length_to_scalar (229856544 229856664)
AddClass: added class build_vector (229856680 229857192)
AddClass: added class colour_to_vector (229857344 229857464)
AddClass: added class scalar_to_vector (229857208 229857328)
AddClass: added class perlin_3D_scalar (229857480 229857868)
AddClass: added class voronoi_3D_cell_scalar (229857884 229858272)
AddClass: added class voronoi_3D_diff_scalar (229858288 229858676)
AddClass: added class voronoi_3D_A_vector (229858692 229859080)
AddClass: added class voronoi_3D_B_vector (229859096 229859484)
AddClass: added class arccos_scalar (229859500 229859620)
AddClass: added class arcsin_scalar (229859636 229859756)
AddClass: added class arctan_scalar (229860060 229859772)
AddClass: added class cos_scalar (229859788 229859908)
AddClass: added class sin_scalar (229859924 229860044)
AddClass: added class tan_scalar (229860060 229860180)
AddClass: added class adjust_saturation_colour (229860196 229860460)
AddClass: added class step_scalar (229860756 229861020)
AddClass: added class conditional_scalar (229861036 229862020)
AddClass: added class image_writer_exr (230297600 230297696)
AddClass: added class default_shader (230822872 230822856)
AddClass: added class surface_layer (230770548 230770664)
AddClass: added class alpine_fractal_shader (230771952 230774780)
AddClass: added class distribution_shader_v2 (230759076 230759192)
AddClass: added class distribution_shader_v3 (230759208 230759324)
AddClass: added class distribution_shader_v4 (230759340 230759456)
AddClass: added class cloud_layer_v2 (230756352 230756468)
AddClass: added class layered_shader (230762160 230762276)
AddClass: added class cloud_fractal_shader_v3 (230756616 230756732)
AddClass: added class crater_shader (230756748 230756864)
AddClass: added class colour_adjust_shader (230756880 230756996)
AddClass: added class constant_shader (230757012 230757320)
AddClass: added class distance_shader (230758948 230759060)
AddClass: added class erosion_shader (230759472 230761276)
AddClass: added class fake_stones_shader (230761292 230761408)
AddClass: added class fractal_displacement_shader (230761424 230761536)
AddClass: added class heightfield_displacement_shader (230761684 230761800)
AddClass: added class heightfield_shader (230761552 230761668)
AddClass: added class image_map_shader (230758816 230758932)
AddClass: added class image_map_shader (230758816 230758932)
AddClass: added class lambert_shader (230761816 230762144)
AddClass: added class merge_shader (230762292 230763672)
AddClass: added class MOLA_map_shader (230763688 230763804)
AddClass: added class multi_shader (230763820 230764968)
AddClass: added class planet_atmosphere (230764984 230768072)
AddClass: added class planet_surface_shader (230768088 230769672)
AddClass: added class power_fractal_shader_v2 (230769688 230769804)
AddClass: added class power_fractal_shader_v3 (230756484 230756600)
AddClass: added class power_fractal_shader_v3 (230756484 230756600)
AddClass: added class redirect_shader (230769820 230769932)
AddClass: added class reflective_shader (230757336 230758800)
AddClass: added class translucent_shader (230770680 230771164)
AddClass: added class strata_and_outcrops_shader_v2 (230770416 230770532)
AddClass: added class transform_shader (230771696 230771808)
AddClass: added class twist_and_shear_shader (230771180 230771292)
AddClass: added class visualise_normal (230771308 230771420)
AddClass: added class visualise_tex_coords (230771436 230771548)
AddClass: added class warp_shader (230771824 230771936)
AddClass: added class water_shader (230771564 230771680)
AddClass: added class sphere_geometry_shader (230770076 230770400)
AddClass: added class terrain_set (230822744 230822728)
AddClass: added class shader_set (230769948 230770060)
AddClass: added class tex_coords_from_XYZ (230774796 230774908)
AddClass: added class compute_normal (230774924 230775036)
AddClass: added class compute_terrain (230822616 230822600)
AddClass: added class experiment_TEST (230771952 230774780)
AddClass: added class heightfield_generate (230776108 230776224)
AddClass: added class heightfield_adjust_vertical (230775052 230775168)
AddClass: added class heightfield_clip_vertical (230775316 230775432)
AddClass: added class heightfield_curve_vertical (230775448 230775564)
AddClass: added class heightfield_crop (230775184 230775300)
AddClass: added class heightfield_erode_v2 (230775580 230775696)
AddClass: added class heightfield_erode_v3 (230775712 230775828)
AddClass: added class heightfield_export_LWO (230775844 230775960)
AddClass: added class heightfield_from_shader (230775976 230776092)
AddClass: added class heightfield_make_river (230776240 230776356)
AddClass: added class heightfield_merge (230776372 230776488)
AddClass: added class heightfield_resize (230776504 230776620)
AddClass: added class heightfield_smooth (230776636 230776752)
AddClass: added class heightfield_smooth_erode (230776768 230776884)
AddClass: added class heightfield_erode_experiment (230776900 230777016)
AddClass: added class grass_clump (230777032 230777148)
AddClass: added class planet (230777296 230778212)
AddClass: added class populator_v3 (230778228 230778344)
AddClass: added class rock (230778360 230778476)
AddClass: added class tgo_reader (230778492 230778608)
AddClass: added class lake (230777164 230777280)
AddClass: added class object_writer_tgo (230778624 230778736)
Loaded 3 modules in this directory
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\plugins\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\..\..\tgdplugins\
No files matching *.tgp in this directory
Loaded 0 modules in this directory
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\..\..\tgdplugins\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\..\..\tgdplugins\nt_intel\
No files matching *.tgp in this directory
Loaded 0 modules in this directory
Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\..\..\tgdplugins\nt_intel\
No files matching *.cpp in this directory
Loaded 0 modules in this directory
Loaded a total of 3 plugin modules
Found existing prefs file
False UCBool
Successfully parsed prefs file
ReadXML: Attempting to read file: "C:\Program Files\Planetside Software\Terragen
2 Technology Preview\Terragen_2.ucr\Generic\default.xml"
creating camera (268577808)
creating render (268577920)
creating render (268577920)
creating enviro_light (268578976)
creating sunlight (268578752)
creating sphere_geometry_shader (230770076)
creating constant_shader (230757012)
creating sphere (268578640)
creating sphere_geometry_shader (230770076)
creating constant_shader (230757012)
creating planet (230777296)
creating sphere_geometry_shader (230770076)
creating planet_atmosphere (230764984)
creating power_fractal_shader_v3 (230756484)
creating heightfield_shader (230761552)
creating heightfield_generate (230776108)
creating compute_terrain (230822616)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
creating group (268577040)
ReadXML: done
Content path for "Project" set to "C:\Program Files\Planetside Software\Terragen
2 Technology Preview\Terragen_2.ucr\Generic\"
Content path for "Project" set to ""
creating camera (268577808)
creating camera (268577808)
TG2ContentPathManager : Dumping...
Num paths = 1
TG2ContentPath : Source = Preferences, Type = Library, Recursive
        Path = C:\Program Files\Planetside Software\Terragen 2 Technology Previe
w

Searching for Library Item.txt
Couldn't find Library item
Searching for Library Item Sub.txt
Couldn't find Library sub item
Searching for Test Item 1.txt
Couldn't find User item 1
Searching for Test Item 2.txt
Couldn't find User item 2
Message Sent 0x12f67c : ID = 21
Message Sent 0x12f9a0 : ID = 21
CreateFile succeeded
destroying camera (268577904)
destroying camera (268577904)


It seems to be finding things now, except this path looks a bit strange :

Loading plugins in: C:\Program Files\Planetside Software\Terragen 2 Technology P
review\..\..\tgdplugins\


Any further ideas?

Sorry to be a pain  :(

Regards,

Andy Cocker

AndyCocker

Has anybody got command line rendering to work in TG2 TP?

If so, could you perhaps offer some insight into whether I'm doing this correctly?

Regards,

Andy Cocker

Matt

This is nothing to worry about Andy. It should be working now. The ".../.../tgdplugins" bit on the end of the path is a bit ugly, but it is a valid directory. It doesn't need to contain anything, though. It looks like everything is running as it should be now.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

AndyCocker

Hi Matt,

Yes, but it's not working. When I run my .bat file, TG2 launches, waits for me to click 'OK' on the splash screen, then sits there with the default scene loaded, just as it would if I'd launched it by double-clicking. My scene is not loaded, nor is it rendered.

Help. ;-)

Regards,

Andy Cocker

Quote from: Matt on December 21, 2006, 06:12:21 PM
This is nothing to worry about Andy. It should be working now. The ".../.../tgdplugins" bit on the end of the path is a bit ugly, but it is a valid directory. It doesn't need to contain anything, though. It looks like everything is running as it should be now.

Matt


Matt

Hi Andy,

Ah, sorry! It's not working for me either - something has changed recently.

I will try to get this fixed in the next update.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

AndyCocker

Quote from: Matt on December 22, 2006, 12:18:53 AM
Hi Andy,

Ah, sorry! It's not working for me either - something has changed recently.

I will try to get this fixed in the next update.

Matt


Posted at 05:18 am? Get some sleep!

Thanks for confirming that.

Regards,

Andy Cocker

hansiMUC

I just wanted to post that as well :)
We need that to do some flyovers and put the job onto the renderfarm...
ps: thanks for the nuke channels hint...