Forum

Author Topic: Build Texture not using GPU?  (Read 9136 times)

Braeden

  • Newbie
  • *
  • Posts: 18
    • View Profile
Build Texture not using GPU?
« on: May 15, 2024, 02:40:44 AM »
Hi,

I am getting the following when Building a texture:

Cannot use GPU. Reason: Atlas cannot render on the device NVIDIA GeForce RTX 4090 limits x/y/z: 32768/32768/2048
Performing blending on CPU...

Should this be a step that the RTX4090 can be utilized for?

Thanks,

Braeden

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15366
    • View Profile
Re: Build Texture not using GPU?
« Reply #1 on: May 15, 2024, 03:59:00 PM »
Hello Braeden,

Can you share the full log from the start of Build Texture operation (so that task parameters are visible) and also please specify OS version and GPU driver version installed.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Braeden

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Build Texture not using GPU?
« Reply #2 on: May 30, 2024, 01:16:52 AM »
Are the logs written to file anywhere by default, or do I need to grab the output / details from the processing window?

Thanks

Braeden

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Build Texture not using GPU?
« Reply #3 on: May 30, 2024, 01:30:49 AM »
Windows 11

Driver: 31.0.15.5222

Is this sufficient log detail?

BuildTexture: mapping_mode = AdaptiveOrthophotoMapping, page_count = 1, texture_size = 35000, blending_mode = MosaicBlending, texture_size = 35000, encode_winner_camera_id = off, fill_holes = on, ghosting_filter = on, texture_type = Diffuse map, enable_gpu = on, relaxed_precision = on
Parameterizing texture atlas...
Model size: 11006080 faces, 5504235 vertices
Analyzing model...
duplicate faces detected - fixed
multiple edges detected - fixed
flipped normals detected - fixed
total 35 faces removed
Decimated to 999964
Parameterizing texture atlas...
Achieved effectiveness 0.191824
Parameterizing done in 38.54 sec
Blending textures...
Done "load_model" in 0
Found 2 GPUs in 0 sec (CUDA: 0 sec, OpenCL: 0 sec)
Using device: NVIDIA GeForce RTX 4090, 128 compute units, free memory: 22596/24563 MB, compute capability 8.9
  driver/runtime CUDA: 12040/10010
  max work group size 1024
  max work item sizes [1024, 1024, 64]
Found device NVIDIA GeForce RTX 4090 driver version 552.22.0.0, API version: 1.3.277, location 1::0
Found device Intel(R) UHD Graphics 770 driver version 1659673, API version: 1.3.261, location 4294967295::4294967295
Only NVIDIA and AMD devices are currently supported
All cameras are fine
Done "feasibility_check" in 0.018
Activating context...
Cannot use GPU. Reason: Atlas cannot render on the device NVIDIA GeForce RTX 4090 limits x/y/z: 32768/32768/2048
Performing blending on CPU...
calculating mesh connectivity... done in 3.235 sec
detecting outliers... *********************************************************************************************************************************************************************************************************************************************** done in 157.605 sec
estimating quality... ********************************





Thanks for your help!
« Last Edit: May 30, 2024, 01:41:28 AM by Braeden »

olihar

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Re: Build Texture not using GPU?
« Reply #4 on: May 30, 2024, 02:01:17 PM »
You are trying to texture something that does not fit in VRAM so it moves to CPU and your RAM.

ilia

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Build Texture not using GPU?
« Reply #5 on: May 30, 2024, 04:23:59 PM »
Wish we could have a way to split atlas in parts which fit into GPU and texture on GPU even if it doesn't fit there as a whole.

Bzuco

  • Full Member
  • ***
  • Posts: 247
    • View Profile
Re: Build Texture not using GPU?
« Reply #6 on: May 30, 2024, 04:47:21 PM »
For now, manually split the mesh in several pieces in blender, better utilize UV space in e.g. RizomUV is the way how to create texture on GPU with less VRAM.

olihar

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Re: Build Texture not using GPU?
« Reply #7 on: May 30, 2024, 04:52:01 PM »
Wish we could have a way to split atlas in parts which fit into GPU and texture on GPU even if it doesn't fit there as a whole.

Texturing on the CPU works absolutely fine.

ilia

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Build Texture not using GPU?
« Reply #8 on: May 30, 2024, 04:57:47 PM »
Quote
Texturing on the CPU works absolutely fine.

Not really, if you need to do it fast and an atlas doesn't fit into RAM also. It can be only resolved by splitting model into smaller ones, texture them individually and merge them back later. Then you can have even 100 pages of 8k x 8k textures and Metashape will have no issues to display that model.
« Last Edit: May 30, 2024, 05:10:47 PM by ilia »

olihar

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Re: Build Texture not using GPU?
« Reply #9 on: May 30, 2024, 05:54:42 PM »
Quote
Texturing on the CPU works absolutely fine.

Not really, if you need to do it fast and an atlas doesn't fit into RAM also. It can be only resolved by splitting model into smaller ones, texture them individually and merge them back later. Then you can have even 100 pages of 8k x 8k textures and Metashape will have no issues to display that model.

You can already do this by splitting it. Why would you do 8K texture anyways when you can do 16K or 32K

ilia

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Build Texture not using GPU?
« Reply #10 on: May 30, 2024, 06:00:34 PM »
Quote
You can already do this by splitting it. Why would you do 8K texture anyways when you can do 16K or 32K

And how it will help to fit textures into the memory? Maybe just a bit, not not much in general. If UV of the specified size don't fit into memory, then increasing page size and decreasing amount of pages will not help here. Also some viewers have preferences on texture size of a model.

jenkinsm

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Build Texture not using GPU?
« Reply #11 on: March 06, 2025, 03:27:16 AM »
Windows 11

Driver: 31.0.15.5222

Is this sufficient log detail?

BuildTexture: mapping_mode = AdaptiveOrthophotoMapping, page_count = 1, texture_size = 35000, blending_mode = MosaicBlending, texture_size = 35000, encode_winner_camera_id = off, fill_holes = on, ghosting_filter = on, texture_type = Diffuse map, enable_gpu = on, relaxed_precision = on
Parameterizing texture atlas...
Model size: 11006080 faces, 5504235 vertices
Analyzing model...
duplicate faces detected - fixed
multiple edges detected - fixed
flipped normals detected - fixed
total 35 faces removed
Decimated to 999964
Parameterizing texture atlas...
Achieved effectiveness 0.191824
Parameterizing done in 38.54 sec
Blending textures...
Done "load_model" in 0
Found 2 GPUs in 0 sec (CUDA: 0 sec, OpenCL: 0 sec)
Using device: NVIDIA GeForce RTX 4090, 128 compute units, free memory: 22596/24563 MB, compute capability 8.9
  driver/runtime CUDA: 12040/10010
  max work group size 1024
  max work item sizes [1024, 1024, 64]
Found device NVIDIA GeForce RTX 4090 driver version 552.22.0.0, API version: 1.3.277, location 1::0
Found device Intel(R) UHD Graphics 770 driver version 1659673, API version: 1.3.261, location 4294967295::4294967295
Only NVIDIA and AMD devices are currently supported
All cameras are fine
Done "feasibility_check" in 0.018
Activating context...
Cannot use GPU. Reason: Atlas cannot render on the device NVIDIA GeForce RTX 4090 limits x/y/z: 32768/32768/2048
Performing blending on CPU...
calculating mesh connectivity... done in 3.235 sec
detecting outliers... *********************************************************************************************************************************************************************************************************************************************** done in 157.605 sec
estimating quality... ********************************





Thanks for your help!

You're trying to make a texture that is 35000 pixels and the limit is 32768. Why are you not using power-of-two sizes? That is standard for 3D renderers. Other sizes can cause issues anyway, so just limit your texture size to 32768.