@Bri_G You can comment this line as a temporary tip:
scn.sky = nil
then the red back light will disappear.
About the crash, I have a guess: the animation models need more memory. The more models we load, the more likely we are to crash due to insufficient memory. Please try to comment three models, and only keep one.
@binaryblues - hmmmmm, tried several sized skybox images and all seemed to show very similar images. Not sure on the syntax for the skybox in V4. I’ve been trying to add it in the background() function, as described in the docs, but with little success.
What sized images have you used?
Edit: slowly getting there now, found an example in the docs which uses a shader. Set up a model in it and it partially displays the skybox but elements above and below are not complete.
@binaryblues - thanks again for the post, tried it with my image and had the same effect. Tried to attach an image to show that the image is not wrapping. Image size was 2048 x 1536. Reduced it to 1024 x 768 and still same effect. What dimensions did you succeed with ?
@John - am I missing something here, your demo with the forest scene seems to be OK ?
Edit: Found my answer - @ John has used an interpolation of a solid image, not the cross shaped images used for V3, the skybox images that we are used to. The Norway Forest image does seem to be distorted a little almost like a fish-eye lens so we may have to modify a standard image before use. The forest image is 2048 x 1024.
Use following code to see it (in V3) :
pic = readImage(asset.builtin.hdr.Norway_Forest)
Edit 2: As I thought, grabbed recent space telescoped image and used that in the code you posted and it gives a complete skybox effect but where the edges meet show contrasting edge effects. Seem to remember this in V3 until @John modified it.
Yes, as you’ve noticed, V4 handles background images differently. In Craft we supported both cube-maps and HDRIs (equirectangular images). We need to explictly add support for detecting and loading t-shape cubemap images for them to display correctly in these situations
@John - thanks for the reply. Didn’t realise V3 could handle different types of textures in skyboxes. I’m intrigued about how you can create a texture, like the forest one, which wraps without edges. When you look at that image around the edges it does look like the image has been manipulated. What’s the technique ? Are there any references for it ?
A HDRI is a panoramic (360 degree) seamless image of an environment with a high dynamic range (pixel values go beyond 0-255). This is useful for more than just backgrounds because it can also be used as a source of indirect environmental lighting (see - image based lighting)
Here’s a video of how to make one with just your phone:
@John@binaryblues - thanks for the feedback on HDRi, did a little digging myself since the original post and found a Wikipedia page and lots of images on the net. Incorporated a couple into a Codes project. The video on make your own with your phone was interesting. Must try that.
Thanks again, will keep me busy for a while.