Jump to content
TroyT

Applying textures to vehicles in editor

Recommended Posts

I'm reposting this in a different forum because it had no response in the A3 Modelling forum.

---

Is there a script to define the texture paths in the editor for a specific vehicle for preview and screenshot purposes?  I'm developing a lot of custom vehicle skins for our Exile servers and am constantly having to re-pack and re-launch, then spawn the vehicle and apply the skin at the vehicle customs trader.  It would be a lot quicker if I could test and update the skins in the editor.  It would also allow me to better position the vehicles for greenscreen editing the preview images for our website.  

 

The skin textures, when complete, get packed into our community Steam mod but they temporarily are packed into the mission file until they are ready for prime time.

 

Ideally, though this may be a longshot, it would be great if I could point to image files directly on my system during development.

 

Share this post


Link to post
Share on other sites
((get3DENSelected 'object') # 0) setObjectTexture "texturePath";

Executing that in the debug console (found under Tools, or Ctrl-D) while having a object selected should work.
If you enable filepatching in the launch options, then you should be able to point texturePath at something outside your mission directory.

  • Like 2

Share this post


Link to post
Share on other sites

Sorry about the repost Dedmen, my sense of urgency and frustration got the better of reason.

 

On 10/15/2019 at 10:59 AM, Freddo3000 said:

((get3DENSelected 'object') # 0) setObjectTexture "texturePath";

Executing that in the debug console (found under Tools, or Ctrl-D) while having a object selected should work.
If you enable filepatching in the launch options, then you should be able to point texturePath at something outside your mission directory.

I'm not having any luck with this. Does this target a selected vehicle? Does "# 0" refer to the entity ID or the hidden selection number?  I've tried many versions and most end up throwing "Error, invalid number in expression". On the BI page for SetObjectTexture, there is a texture id shown in the examples:
 

_objectname setObjectTexture [0, "\pboname\texture.paa"];

I've enabled file patching if that matters.

 

 

 
 
 
 
On 10/15/2019 at 10:12 AM, Mr H. said:

will do what you ask but only if the vehicle has hidden selection textures check with https://community.bistudio.com/wiki/getObjectTextures

The vehicles do have hidden selections and the textures are functioning correctly in-game.  I just need to apply them temporarily in the editor.

 

Share this post


Link to post
Share on other sites

You answered your own question
 

((get3DENSelected 'object') # 0) setObjectTexture "texturePath";

is not correct

((get3DENSelected "object") # 0) setObjectTexture [0,"texturePath"];

should work for selected vehicle in 3Den

  • Like 1

Share this post


Link to post
Share on other sites

The textures appear to be cached once loaded.  Is there a way of clearing that cache without restarting the game?  It would be great if I could modify the texture and just reload it.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×