Texture unwrap settings are not applied

I’m running a script with the following key params:

-set "unwrapMinTexResolution=1024" ^
-set "unwrapMaxTexResolution=1024"  ^
-unwrap ^
-calculateTexture ^

But actually RC is creating texture with 8192 resolution, and when I check unwrap settings in UI afterwards it shows this:
image

RC version 1.4.1

Hi, those keys and values change the default unwrap parameters for the texture settings, you can test this in the console, so you should be able to just remove the unwrap command.

-set "unwrapMinTexResolution=1024" ^
-set "unwrapMaxTexResolution=1024"  ^
-calculateTexture ^

  1. It worked, but why is it behaving like this: why should unwrapping cause texture resolution to be out of control? And it seems the same issue persists on texture reprojection: if I set default unwrap settings, call unwrap and reproject texture to another model , it is again crating a 8192 texture for the later model :
-set "unwrapMaxTexResolution=2048"^
-unwrap ^
-reprojectTexture my_model model_decimated "%reproject_params%" ^

If I’m not wrong it behave differently in 1.3.

  1. Another question is how to control the texture maximal side on export via CLI? What is the expected exported texture resolution if the calculated texture has 1024 (or whatever smaller) size, but texture maximal side is set to 8192

Hey Wallace.

Why are you not continuing the discussion? If I still keeping to ask questions, it means that your response was not satisficing.

Thanks.

Sorry, I did not see this; thanks for the heads up; once a model has been unwrapped through the texturing process, you cannot unwrap it again using set commands via CLI; you need to use an XML. The Maximal Side Option is only intended for downscaling; nothing happens if you set it to upscale, and you will still get whatever size texture the model has.

1 Like

Thanks!
What if the model was not unwrapped, but was textured( -unwrap function was not called, but -calculateTexture was)? Is that model considered as already unwrapped? If that’s the case, what would you suggest for model decimating and texture downscaling? Right now I’m using the workflow:

-simplify 
-set "unwrapMaxTexResolution=2048"
-unwrap
-reprojectTexture model1 model2 "%reproject_params%" 

From your answer I concluded that this approach should not work

Texturing does unwrap the model unless it is already unwrapped, in which case it just uses the current unwrap. It’s not possible to texture a model without an unwrap. Those unwrap set keys and values do not change the settings in the unwrap tool at all, only in the default unwrap of the texturer.

Then how about texture decimation using reprojection?

Hi Serob,
I think what Wallace wants to say is, that texturing has its own unwrap.
-set "unwrapMaxTexResolution=2048" command is applied for the texturing settings and its unwrap, not the general unwrap.
image

For unwrap you need to use xml file with wanted settings.
image

Then your commands could look like:

-simplify 
-unwrap "params.xml" :: using the wanted unwrap settings exported into XML file
-reprojectTexture model1 model2 "%reproject_params%"
2 Likes

Thanks guys !!