Jump to content

.cpp error causing crash to desktop when applying material to terrain


CJO Games
 Share

Go to solution Solved by Josh,

Recommended Posts

This is a new one introduced with 0.9.5 and as the title suggests is caused when applying materials or creating materials from textures. This error will result in a preview.exe hang which is only recoverable by force close through the task - manager.

This is a new map and has only one material.

 

1870424537_Screenshot2024-03-14172300.thumb.png.b8ae5fea171d708d8dbdcc8354803d12.png

Link to comment
Share on other sites

This occurs when you add a new material layer to the terrain? What material are you using?

The error you are seeing indicates that an unsupported texture format was probably used. I would like to know what texture file it is.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The error above indicates there is some pixel format being used that I have not written support for yet. This is why the texture ID is zero.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

That was my understanding too Josh. The error out-put is not terribly difficult to decipher even for a none .cpp developer. The problem, I think, is that although the code output is indicating some kind of pixel format error - the only thing that has changed at my end is the version number of your editor.

With 0.9.4 this error was not being caught - with 0.9.5 it is.

I haven't changed any textures, materials, image formats or, indeed, pixel formats and, so would suggest that this could be a bug somewhere catching a none existent or, maybe existent but previously unseen problem with texture or material generation. I suggest this is further backed-up by the fact that this is then causing preview.exe to hang and the resulting crash to desktop.

I can't freely share my textures or materials with you they are not mine to share.

 

Link to comment
Share on other sites

Well, if you notice the folder name highlighted this is a folder of glTF models that are not yet wrapped (no textures) so, even if there was a way to provide them they would be no help because despite what your cpp is saying there aren't any textures in this folder (the asphalt ball is a blank sphere with the name asphalt). I prototype (or try to) with unwrapped models first and add the materials in once in scene - the scene is currently a blank one - I haven't been able to get to the stage of wrapping models because the editor is so unstable since the update. This is the case on Stable and Dev channels.

Link to comment
Share on other sites

Josh, can you try the following steps with this .png file? To reproduce simply right click and create material and, hopefully, it will do what it does to me and create the .cpp error and crash to desktop. This has just occurred for me within the last few moments.

 

Please note that the attached is a proprietary texture and should be treated as such.

Screen_distortion.zip

  • Thanks 1
Link to comment
Share on other sites

here is another one to try - again from a proprietary pack - in this case its a material that was created previously  and worked previously but which now causes a hard crash when I try to view it in the preview.exe 

 

Please note this is a proprietary texture and should be treated as such.

Grass Floor 1.zip

Link to comment
Share on other sites

  • Solution
1 hour ago, CJO Games said:

Josh, can you try the following steps with this .png file? To reproduce simply right click and create material and, hopefully, it will do what it does to me and create the .cpp error and crash to desktop. This has just occurred for me within the last few moments.

Please note that the attached is a proprietary texture and should be treated as such.

Screen_distortion.zip 424.39 kB · 1 download

 

I added the missing format. However, there are a few rules for terrain textures in 0.9.5 to take note of:

  •  All textures on one terrain must be the same size. There is an additional argument in the CreateTerrain function that lets you specify this size. I have not added a control in the editor yet to let you adjust the size of a terrain that is being created. The default size is 1024.
  • Base color, metallic-roughness, and emission textures used in a terrain must be in format BC7.
  • Displacement textures used in a terrain must be Luminance format (single channel 8 bit grayscale).
  • Normal maps used in a terrain must be BC5 format.

The reason for this is that array textures are now being used for terrain rendering. This solves the problems we were seeing with pixels on the borders invocation groups and will help make the engine runnable on a wider range of hardware.

21 minutes ago, CJO Games said:

here is another one to try - again from a proprietary pack - in this case its a material that was created previously  and worked previously but which now causes a hard crash when I try to view it in the preview.exe 

Please note this is a proprietary texture and should be treated as such.

Grass Floor 1.zip 418 B · 0 downloads

This zip file does not include any textures.

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Posted (edited)

Thanks for the information - though the texture file above was not being used on terrain - indeed I'm not even using terrain at the moment so, although useful information it's not really relevant to the issue - unless I'm missing something?

I've attached again the grass floor material with the needed textures and the output from the material file in .txt format - hopefully that will be everything you need...

 

Please note that these are proprietary assets and should be treated as such.

1077302805_GrassFloorOne.zip

Edited by CJO Games
typographical error
Link to comment
Share on other sites

7 minutes ago, CJO Games said:

Thanks for the information - thought the texture file above was not being used on terrain - indeed I'm not even using terrain at the moment so, although useful information it's not really relevant to the issue - unless I'm missing something?

I've attached again the grass floor material with the needed textures and the output from the material file in .txt format - hopefully that will be everything you need...

Please note that these are proprietary assets and should be treated as such.

1077302805_GrassFloorOne.zip 28.03 MB · 0 downloads

Okay, it will work in the build that goes up later today.

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...