ashwin.sudhir Posted July 28, 2011 Share Posted July 28, 2011 The documentation mentions that a 3D texture can be used to as a mask texture for terrain so that unlimited materials can be painted on to each surface. Is this correct? If so, what is the best way of creating a 3D texture? I tried imagedds with "-t 3d" and multiple input files. But on importing that image as a mask texture, it still shows up as 2D. What is the workflow for using a 3d texture as a mask? Any suggestions for tools to view and edit 3d textures? As a side note, I also noticed a "2d_array" option for -t parameter in imagedds. What does it mean and how different is from a 3d texture? As I understand, a 3d texture is a volumetric texture. Thanks, Ashwin. Link to comment
ulf.schroeter Posted July 28, 2011 Share Posted July 28, 2011 It's mentioned in the docs but not implemented. See this thread Link to comment
ashwin.sudhir Posted July 29, 2011 Author Share Posted July 29, 2011 @ulf.schroeter Thanks! Link to comment
manguste Posted July 30, 2011 Share Posted July 30, 2011 The documentation mentions that a 3D texture can be used to as a mask texture for terrain so that unlimited materials can be painted on to each surface. Is this correct? Yes, you can use 3D texture (R8) for masking not more than 4 materials (the same limitation is in place for DirectX 9 compliance). If so, what is the best way of creating a 3D texture? I tried imagedds with "-t 3d" and multiple input files. To create a 3D image for the terrain mask, run ImageDDS with the following flags imagedds_x86 -t 3d -f r8 your_file.png There should be a message in your console that the 3D image was created: your_file.png (2D:RGB8 128x512 1) -> your_file.dds (3D:R8 128x128x4 1) If not, check your input file. But on importing that image as a mask texture, it still shows up as 2D. Even if you import a 3D texture (see the attachment), it is split to small 2D images per each surface. As a side note, I also noticed a "2d_array" option for -t parameter in imagedds. What does it mean and how different is from a 3d texture? As I understand, a 3d texture is a volumetric texture. Take a look here. Link to comment
ashwin.sudhir Posted October 10, 2011 Author Share Posted October 10, 2011 I tried creating a 3d texture again, but still it fails W:\extern\Unigine\bin>imagedds_x64 -t 3d -f rgb8 "W:\media\data\fx\Textures\attenuation_white.dds" W:\media\data\fx\Textures\attenuation_white.dds (2D:RGB8 64x8 1)Image::convertToType(): can't convert 64x8 2D image to 3D -> W:\media\data\fx\Textures\attenuation_white.dds (2D:RGB8 64x8 1) I've carefully followed your sample commandline above; can't figure out what's wrong. And I still can't find in the documentation (or on the forums) how to convert multiple files into one 3d texture. Link to comment
manguste Posted October 11, 2011 Share Posted October 11, 2011 It is because the texture you are trying to convert does not fit to be 3D texture. 3D texture should be square layers of equal size that are glued together in avertical column. Check the attached texture: it can be divided and will have 3 layers when converted to the 3D texture. Link to comment
manguste Posted October 12, 2011 Share Posted October 12, 2011 There's no batch option for converting into 3D. Link to comment
ashwin.sudhir Posted October 12, 2011 Author Share Posted October 12, 2011 Thank you, but I feel this should be (along with cubemaps) be explicitly mentioned in the documentation. I have worked with other engines that expect multiple images as input which are then "stitched together" into cubemaps and volumetric textures. Hence the confusion. Link to comment
Recommended Posts