@piinthesky it’s supposed to use the “Surfaces:Desert Cliff” syntax (one of the parts that’s quite tricky to update to asset keys at the moment). But I’ll look into it
@piinthesky hero’s quest assets download for me in the asset picker. What are you seeing?
@Simeon since the 223 beta,
terrainEnt.material = craft.material.preset (“Surfaces:Desert Cliff”)
generates an error on scene:draw()
“could not cast shader uniform value”
Same error in two very different programs.
Hmmm, the Heros quest is okay now, do those assets have to download for each codea update?
Not each Codea update, but it’s possible they can get purged if your iPad is running low on space
@Simeon @John, by defining each component of the preset explicitly, i conclude the crash connected to using craft.material.preset comes from the normalMap.
@piinthesky we’ve fixed the preset function in 3.2.2, next beta will have the fix
@Simeon, tested the fix for craft.preset…
if i use the old way to address the assets it no longer crashes.
if i use the new way, it will always crash and exit codea (no error msg).
Even though it works, i have the impression that the lighting on the image is darker/less shiny than before! Are you sure it is should be same as previously?
@Simeon is this the correct syntax for normalMap?
terrainEnt.material.normalMap=readImage(asset.builtin.Surfaces.Desert_Cliff_Normal)
in the material documentation, the readImage is not present and it indicates the old way to refer to an asset. Preset is not mentioned in documentation.
@piinthesky @John implemented this fix so I might need to check with him. Will get back to you on that
@piinthesky the presets are used like this:
myEntity.material = craft.material.preset(asset.builtin.Surfaces.Basic_Bricks)
Or (the old way)
myEntity.material = craft.material.preset("Surfaces:Basic Bricks")
I think normalMap just has to be an image, not a preset. So you can’t put an asset key for a preset into readImage, and would have to give it an asset key pointing to an image