We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Export without textures

Home Forums Bug Reports and Feature Requests Export without textures

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34501
    web
    Customer

    It would be great if you could add an export without textures button. Sometimes I just do geometry updates and the textures I’ve got are saved with a lower resolution. So everytime I do a update these textures get overwritten.

    #34526

    May be we should think about it. Thanks for the feedback!

    Chief 3D Verger | LinkedIn | Twitter

    #42457
    web
    Customer

    Pushing that topic again. I’m currently working on a project were I constantly need to update stuff, but without the textures. Cause I have low res versions in the export folder which are getting overwritten every single time I export the gltf.

    I would be okay for the moment if there is a max script solution I could use.

    #42802

    Hi,

    I would be okay for the moment if there is a max script solution I could use.

    You can try this maxscript code:

    
    expPath = "C:\\path\\to\\export\\directory\\"
    extensions = #("png", "jpg", "hdr")
    bkpPath = expPath + "_texturesBkp\\"
    
    -- remove & create the backup dir
    DOSCommand("if exist " + bkpPath + " (del /f/s/q " + bkpPath + "* & rmdir " + bkpPath + ")")
    DOSCommand("mkdir " + bkpPath)
    
    -- copy existing files with the specified extensions into the backup dir
    for ext in extensions do (
    	DOSCommand("copy /b/v/y " + expPath + "*." + ext + " " + bkpPath)
    )
    
    -- run export
    macros.run "Verge3D" "exportGLTF"
    
    -- copy files from the backup dir back to the original dir
    for ext in extensions do (
    	DOSCommand("copy /b/v/y " + bkpPath + "*." + ext + " " + expPath)
    )
    
    -- remove the backup dir
    DOSCommand("del /f/s/q " + bkpPath + "*")
    DOSCommand("rmdir " + bkpPath)
    

    (here’s the link just in case: https://www.dropbox.com/s/xpht3rge7wb7d25/export.ms?dl=0)

    – it copies certain image files into a specified “backup” folder, then performs export and after that restores the files reverting changes that were made to them during the export.

    You can see at the top of the script the following variables:
    – expPath – you need to specify the export path for your scene (with double backslashes “\\”)
    – extensions – only files that have one of those are preserved by the script; you can add/remove any other extensions if you need
    – bkpPath – the temporary directory located inside the export folder; it is used for keeping the old files for restoring them after the export

    So, to perform export of your scene you can just run that script instead of the Verge3D->Export glTF… menu command. I tested it on an example scene and it works well. Hope this helps!

    Co-founder and lead developer at Soft8Soft.

    #42999
    web
    Customer

    Hey Ivan,
    thank you very much for the script. Working great for me! :good:

    Would still love to see that as an extra option in upcoming verge3d versions. Maybe you can consider that for the future ;-)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.