kadir.basol Posted April 11, 2012 Posted April 11, 2012 Hello , i wanted to ask is it possible to make heat & sand particles on terrain ? is it any ready made shader effects available on unigine?
Rob Posted April 19, 2012 Posted April 19, 2012 Im also interested in this, hope someone has suggestion on how to create such an effect
ulf.schroeter Posted April 20, 2012 Posted April 20, 2012 There is no out-of-the-box Unigine shader for such a very specialized effect available. For heat simulation Unigine material refraction on particles might be helpful. See flames in Sanctuary demo for example. You should search the internet for visual examples (e.g. youtube) of the exact effect you whant to achive and post a link here, so others will get a more detailed understanding of your effect requirements. In the end such an effect most probably boils down to a complex combination of particle animation, texture overlay animation and dynamic render post-processing.
manguste Posted April 20, 2012 Posted April 20, 2012 We can suggest the same approach as we used for creating a rain effect in Valley. It's drawn only around the camera. 1. Create two particle systems: sand particles and particles with refraction for heat. The second one is very much similar to the fire smoke (check library -> worlds -> sfx -> fire1 -> library_fire1_0.node). 2. Create a WorldExpression that drags its children across the scene after the player. Simply insert the following code: { // get player Player player = engine.editor.getPlayer(); if(player == 0) player = engine.game.getPlayer(); if(player == 0) return; // player position vec3 offset = vec3(0.0f,0.0f,-15.0f); mat4 transform = translate(player.getWorldTransform() * offset); // transform childs Node node = getNode(); forloop(int i = 0; node.getNumChilds()) { Node child = node.getChild(i); child.setWorldTransform(transform); } } 3. Make your particle systems children of WorldExpression.
Rob Posted May 2, 2012 Posted May 2, 2012 Is it possible to trigger that script in a certain area? So the attached nodes will get enabled as soon you enter the specific area? And if so could you provide an example of this? As I have 2 of these scripts in my scene, 1 to attach headlights as soon as you enter a cave and need the second one for the heat shader as soon as you enter a desert environment
ulf.schroeter Posted May 2, 2012 Posted May 2, 2012 Use WorldTrigger. Examples can be found in Unigine sample folder.
Rob Posted May 2, 2012 Posted May 2, 2012 Use WorldTrigger. Examples can be found in Unigine sample folder. Oke thanks will have a look at it
Recommended Posts