Planetside Software Forums

General => Terragen Discussion => Topic started by: ajcgi on February 08, 2018, 07:08:54 AM

Title: Exporting Spotlights
Post by: ajcgi on February 08, 2018, 07:08:54 AM
This may seem like an odd thing to want to do, but... can spotlights be exported somehow? I can get the directional lights out no problem and the cameras, but spotlights are left behind.
I'm using them in TG to do quick lighting LookDev and then taking them into other 3D packages for other purposes. I know I can copy coords across by eye, but a handy export would be... handy. I've exported to FBX and tried reading that into both Softimage and Houdini but neither shows the spotlights as coming across.
Title: Re: Exporting Spotlights
Post by: KlausK on February 08, 2018, 09:49:52 AM
Couldn`t get them to export no way I tried.
I am curious what you might need them for in the "other" application that a workaround you can replace once exported won`t do?
CHeers, Klaus

edit: in the tgd I renamed the class "spotlight" to "sunlight". The picture shows the errors and warnings window
when reopening the modified tgd. I guess it is simply not implemented.

edit: when I import a fbx from SI into TG the spotlights from SI are converted to "directional" or sunlights.
The parameters in the picture before are lost.

Might be something to finally ask for the TG SDK ;)
Title: Re: Exporting Spotlights
Post by: ajcgi on February 09, 2018, 07:34:03 AM
It's not a deal breaker for the moment but thanks Klaus.
Title: Re: Exporting Spotlights
Post by: KlausK on February 09, 2018, 10:31:29 AM
btw:
http://planetside.co.uk/wiki/index.php?title=FBX_Compatibility
CHeers, Klaus
Title: Re: Exporting Spotlights
Post by: Matt on February 10, 2018, 02:50:31 PM
"spotlight" nodes aren't exported, but "light_source" nodes are. You might want to use a text editor on the .tgd to replace the following:

"spotlight" -> "light_source"
"position" -> "source_centre" (but only in lights, of course)

You'll lose rotation and other spotlight-specific properties, but at least you can export position, colour and intensity this way.

Matt
Title: Re: Exporting Spotlights
Post by: ajcgi on February 12, 2018, 09:56:07 AM
Ah interesting to know for the future. Thanks both.