Home › Forums › Graphics / Blender › No animation in Background world node?
- This topic has 16 replies, 3 voices, and was last updated 1 year, 3 months ago by bigcatrik.
-
AuthorPosts
-
2023-07-27 at 12:52 am #65595bigcatrikParticipant
When attaching an animated Value node to the background node inputs in a world shader the animation does not work in Sneak Peek or a gltf export.
It works in Blender (in Rendered viewport shading mode) and those inputs are supported by Verge3D as per the manual (https://www.soft8soft.com/docs/manual/en/blender/Shader-Nodes-Reference.html#Background).
Attaching a value node and animating it works on other texture nodes, why not these? Bug, or WebGL limitation?
A very simple example is attached. Select Rendered viewport shading mode once loaded and press play (spacebar, the cube is blue). Then try it in Sneak Peek. Not the same.
In this file the animated Value node is attached to both the Color and Strength inputs. Either one on their own, or both, will work in Blender, but no combination works in gltf.
Attachments:
You must be logged in to view attached files.2023-07-27 at 1:16 am #65597kdvParticipantAnimations of the world material are not exported. Nothing to play.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-27 at 1:37 am #65598bigcatrikParticipantShould be in the manual. The requirement to use animated Value nodes to animate textures should also be noted in the manual since the normal animation method works just about everywhere else. I found that in a comment response section in a forum post.
2023-07-27 at 1:43 am #65599kdvParticipantyou can animate the world light intencity (with Value node) from light to dark and vice versa using this puzzle
https://www.soft8soft.com/docs/manual/en/puzzles/Animation.html#animate_param
You can but your app will die in several seconds. Never try to animate the world material…Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-27 at 5:28 am #65603xeonCustomerHi bigcatrik,
I can fully understand your frustration….but the good news the background environment lighting/world can be animated through textures and associated values.
To backtrack a little, I believe the manual does a good job of pointing out what tools are available to us as artists/developers but its not always the most clear. Especially when you are wanting to know what it cant do. Unfortunately, that part is up to us as users to figure that out but I think its that way with all manuals.
In the sample Blend file you provided you connected a value node directly to the input of color and strength. The problem with the setup is that the color input of the background node is expecting an RGB value. You could add a Combine XYZ node between your value and the color input and use the value then to drive the background color, but a direct value input is not the correct input for what you are trying to do.
But on to the good news. Attached are two images. The first is a World Environment shader that uses Value nodes to control rotation, color(HUE), and a wave pattern I put in just for kicks.
The second image is a puzzle set that will allow you to animate these values or in this case will automatically animate them. You can try this in sneak peak or export as a GLTF and try in your own application and you will find you can control and animate just about every parameter that you have control over with a normal material shader.
So yes… animate away.
Attachments:
You must be logged in to view attached files.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2023-07-27 at 11:10 am #65634kdvParticipantOnce again: trying to animate the world shader will force an app to die in several seconds (when video memory is overloaded. time directly depends on the amount of available video memory). Updating the world material is a very expensive process.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-27 at 5:16 pm #65643xeonCustomerHi kdv,
I think this may be a hardware-specific issue. I have tested the sample scene setup provided above on a MacPro, 192 GB of RAM on Verge3d 4.3.1 and 4.4.
Verge3D 4.4 displayed no errors in the console and had no issues restarting or closing the app using Chrome and was able to play for the full 30-minute test. I interrupted it and no issues occurred.
Vergd3D 4.3.1 had no errors in the console. I ran the same test for 30 minutes and no issues during the test. However, when the test was completed and you try to close the Chrome browser you can get some bad results requiring you to close the window or tab. I repeated this a few times with similar results.
So I went back to 4.4 and tried the test a few more times and each time the test worked as expected with no errors or issues.
It will be interesting to see what results you get once you move to 4.4.
Based on your graph the memory usage was very high. The size of the environmental texture will have a large impact on performance. How large of a texture did you use? I used a 2K HDR texture and did not see memory spikes above 12%. Browser memory was an issue for 4.3.1 but not one for 4.4.Given the results ktv encountered, I would offer a word of caution to anyone attempting to use this method. There are probably far more efficient methods to achieve the same visual effect. Always test your application on the hardware you are going to release your application on. Just because it can be done does not mean it will work in all situations but that goes for everything you design, develop and deploy.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2023-07-27 at 5:18 pm #65644kdvParticipantJust a simple test: share that app. And test it on your phone…
How large of a texture did you use? I used a 2K HDR texture
512×256
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-27 at 6:31 pm #65645xeonCustomerAs I mentioned:
Given the results ktv encountered, I would offer a word of caution to anyone attempting to use this method. There are probably far more efficient methods to achieve the same visual effect. Always test your application on the hardware you are going to release your application on. Just because it can be done does not mean it will work in all situations but that goes for everything you design, develop and deploy.
With the above said….I was answering a question – “Can a value node be used in the world shader” and the answer is yes.
I did not state that it would work on mobile. Nor did I bother testing it in mobile as it was not a parameter of the question originally proposed by bigcatrik.
But I did leave it up the reader to test and validate it works for their specific purposes. Obviously, mobile phones are a set of devices this solution would not work on. But it would be fine in many situations and devices.
Here are the links you requested:
https://v3d.net/atl. – web demo …. caveat I would never use this in this manner.
The project file: https://v3d.net/me1
Blender version 3.6.1.- This reply was modified 1 year, 3 months ago by xeon.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2023-07-27 at 6:33 pm #65647kdvParticipantDied in 1.5 seconds…
I was answering a question – “Can a value node be used in the world shader” and the answer is yes.
My answer has been the same. Yes, it’s possible. But most likely for a very short time )))
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-27 at 6:36 pm #65648xeonCustomeron a mobile device….sure…if it dies on your desktop….might be related to your hardware config.
I will create a video of this in the next few days showing how this works.
It very well could be a windows thing or something else…..I will have some people around here test it out as well on various devices and report on that too.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2023-07-27 at 6:38 pm #65649kdvParticipantI will create a video of this in the next few days showing how this works.
check the hardware monitor (RAM/video memory consumption)
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-27 at 7:20 pm #65650kdvParticipantWhat is really possible is animating the environment light intensity and the scene’s backgroung (color or image)
Trying to animate this nodes setup most likely will kill the app on average hardware.
This will run infinitely on any calculator supporting WebGL. And it does exactly what you see on the screenshot above.
https://v3d.net/me2Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-07-27 at 7:38 pm #65652xeonCustomerOk.. so I stated in my previous message that it might be your hardware configuration and the opposite may be more true.
I quickly tested this on a few different machines and found the following:
1. if you have a Mac with at least one discrete GPUs there are no issues
2 if your Mac uses and SOC (M1, M2) chrome runs out of memory and will crash
3. If you have a PC running windows with a SOC chrome will run out of memory and crash
4. I have to wait for a PC to become free to test discrete GPU.So at this time…. I can only confirm this works on Macs Intel based with discrete GPUs.
Yay Mac.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2023-07-29 at 3:50 am #65669bigcatrikParticipantThanks for all the responses. I’m still not sure where to go where with it (I’m on a Mac M1 ¯\_(ツ)_/¯ ).
Maybe animated lights? Would there be any hidden issues with that?
-
AuthorPosts
- You must be logged in to reply to this topic.