You need to reimport any meshes after recompiling the engine with that change. Other than that, not sure why it wouldn’t be working.
I made the UDIM fix with the fbx static mesh import and it worked like a charm, however I am having the same issue with alembic imports. Could you direct me as to which file I would need to edit to get that to work? Would I use the same code?
so I noticed even with 4.24 I can’t reload a virtual texture without ue crashing immediately, is there a safe way to reload a virtual texture?
@hashu786 I’m not familiar with the alembic code, but some quick searching led me to the function AbcImporterUtilities::ApplyConversion(). Making this work will be a bit more involved since it’s doing more, but the basic idea should be similar. Extract the fractional UV part and apply the transform to that, but preserve the integer UV part.
@YuuJin Do you mean reimporting? That’s currently broken for VTs, you’ll need to delete/import the textures for now. Fix for this should be in 4.25 (possibly 4.24.X).
ahh okay cool thanks, good to know it’s not just me doing somethin wrong then
Going to remind, that while not really important for virtual texture, being able to sample runtime virtual texture in domain/vertex shader is very much needed for a whole range of effects.
Hi, I am having issues with Unreal crashing when I import 16UDIM images to use as Virtual Textures, I have updated to the latest 4.24.2 version, and restarted both the engine and my computer several times.
When I first got the 4.23 release, the Virtual Textures imported just fine, but then this problem started happening and I have not found a solution since then.
This is the message I get after the crash occurs:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x00000000
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_AssetTools
UE4Editor_AssetTools
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
Any idea what is going wrong?
thanks
Hi, I am not able to properly import UDIM textures. VT is enabled and it is a low res 4x4 tile.
I also tested with those files, but the texture 1001 is constantly repeated.
The expected size is 1024x1024 and is correct in the content browser, but when opened it is 256x256, so only 1 texture. But the path to other textures is also good.
Tested in 4.23.1 and 4.24.1
What am I doing wrong ?
Anyways this is just happening in linux, works fine for windows
Is Virtual Texturing enabled out of the box? Tried the official 4.24 version but trying to convert a texture to virtual texture does nothing. The same happens when downloading the code from dev-rendering branch.
If you look at the code in FAssetTypeActions_Texture::ConvertVTTexture you see that the code was disabled like this: #if 0.
Do I need to enable something in the code of compile it somehow to have VT working?
Check the posts from into this thread and his comments on user questions. You need to enable “Virtual Texture Streaming” in your project settings. There was also a Live Streaming about the feature that you should check out aswel. I think the documentations is already a thing for the feature, so check this link and the other links inside the page: Virtual Texture Memory Pools in Unreal Engine | Unreal Engine 5.3 Documentation
Ok thanks. I was able to enable VT for a texture in the project.
I wonder how they implemented VT on D3D11 if the D3D11 headers that come in the ThirdParty folder do not support D3D11.2 (don’t contain the definitions for tiled resources or tile pools).
Aren’t they using D3D11 tiled resources?
@jgp80 That is a good question, lets hope is able to answer that for ya! I didn’t get into the source code for this particular part, mainly because it is still Beta and there are quite an amount of fixes for few issues and of course a good point to test the feature will be currently 4.25, because two major features are becoming production ready with 4.25: Real-time Raytracing and Niagara, which must be stable enough for any new feature dependent on them, like virtual texturing.
I’d say they are NOT using D3D11 native virtual textures (tiled resources) because:
- The version of D3D11 included in the engine does not support D3D 11.2.
- There is no trace of the D3D11 Tile resouce API calls in the code.
- In a video, they mentioned that this were introducing a performance cost (extra texture sample) for an extra indirection (perhaps to map UVs to the actual textures).
So, if this is the case I’d ask: why aren’t they using native tiled resoruces for this?? (maybe to develop a unified virtual texturing solution once at a higher level, not depending on the underlaying graphcis API?)
Hopew or someone else at Epic can give us some answers
This is usually how they worked. They implemented their own SharedRef and SharedPtr architecture as well for example to be able to maintain cross-platform compatibility. Can’t say if this why they 've done it with VTs but that’s my guess.
> I’d say they are NOT using D3D11 native virtual textures
Yes this is correct, we’re not using native tiled textures anywhere at the moment.
> So, if this is the case I’d ask: why aren’t they using native tiled resoruces for this??
You’re pretty much correct, in that we wanted an implementation that would work everywhere, even on platforms that had no/poor support for tiled resources. We do have plans to take advantage of native tiled resources at some point on platforms where it makes sense, but this can happen as an implementation detail. It shouldn’t change how anything works, it can just provide some performance/memory improvements when supported.
I should note that even using native tiled functionality adds some overhead compared to regular non-virtual textures. You still need some way to provide feedback on missing tiles, and you still need some way to handle displaying lower resolution texture data when the require high-res data isn’t streamed in yet.
Hey , thanks a lot for the clarification.
In my case I don’t want to read the feedback of missing tiles. I just want to be able to update “tiles” or texture portions “at will” from C++ code. Is this possible with the current implementation? In case it is… could you point us to the functions / APIs that would allow to do that?
So if I have a virtual FTexture2D… where’s a way to update tiles into it from C++ code so that the system automatically takes care of the min mips per region? (to avoid sampling “unmapped” tiles)
IRendererModule::RequestVirtualTextureTilesForRegion() should have the functionality you need. It may take some work to set this up the way you need however. To get an IAllocateVirtualTexture*, you’ll need to go through UMaterial rather than UTexture, since material allocate virtual texture space for stacks of virtual textures.
As far as calling RequestVirtualTextureTilesForRegion(), parameters work like this:
InTextureRegion: Region of texture you want to load, empty rectangle for entire texture.
InMipLevel: Mip level of texture to load
InScreenSpaceSize: If InMipLevel < 0, then this will be the size of texture on screen, used to automatically compute the proper mip level, ignored if InMipLevel >= 0
There is a CVAR to disable VT feedback ‘r.VT.EnableFeedBack’. If this is 0, feedback buffer will be skipped (although currently it’s still rendered). This is mostly intended for debugging at the moment, so you may need to do some cleanup if you intend to use it for production.
Hi!
I am doing some tests, but I guess I am doing something wrong, I hope you can help
-
In Maya, I have one object with a UV shell ocuping more than one udim tile, and in Unreal I can see a black line where the UV tile “cuts” the UV shell, is this expected? (I baked the texture with Octane) I would love this to work so I can do this big with chunks of photogametry, both geo and textures.
-
Also, the textures don´t line up perfectly, the line up good in the classic uv space, tile 1001, but not in the others.
Thanks in advance for your help and time, much appreciated :)))