Posts

Tutorial 7

Tutorial 7- Spark AR Intro Main Content To setup audio we will need to import the sound clips from resource folder. Add 3 audio playback controllers from the asset panel. name them wind, birds, rain respectively.....in properties of each audio playback controller add the appropriate audio clip...checkmark loop on all and play on wind and birds....hook the play value of rain with the third variable of native ui picker.. now add 3 speakers and name them wind_speaker, birds_speaker, rain_speaker respectively....add the appropriate audio playback controller to them...adjust the volumes to your liking and you are done Short Summary import clips...create playback controllers...add clips...create speakers....add playback controllers Resources audio clips Fun Points Show the documentation page to show what format of audio should be used

Tutorial 6

Image
Tutorial 6- Spark AR Intro Main Content To make the rain effect add an emitter in the scene....drag it up in the y axis a little bit so that it is just out of the camera....play with different values to see what effects what....use the values below to get the result similar to below...change the material to raindrop material....make sure the emitter has a new layer of its own and is topmost on the layer list   Hook the visibility of the emitter with the third variable of the native ui picker Short Summary add emitter, change layers, change values, change materials, hook with native ui picker Resources raindrop texture Fun Points play with different values to show what else can be done

Tutorial 5

Image
Tutorial 5- Spark AR Intro Main Content To make the native ui picker add a script from the assets panel and copy the script...then explain what each part of code does(will explain it later to you). To make the script work....create 3 variables under the properties panel of script under from script panel now click create to to make a producer patch....now the native ui is hooked we can get rid of the buttons we used earlier(you may choose to keep it...its up to you.....hook the new variables to earlier object taps....keep one variable free for rain effect) make sure to add native ui picker patch to the patch editor and click is visible on it. Short Summary Write the script, create variables , hook the variables to the right spot Resources script.js Fun Points Tell how to add new variables how to change icons in the native ui picker

Tutorial 4

Tutorial 4- Spark AR Intro Main Content To make the instructions  1)Add a rectangle by right clicking on the canvas....make sure the rectangle is on the same layer as canvas....this will be used as a temporary button to toggle the info screen until the native ui picker is hooked properly....rename it accordingly......move the rectangle to top right of the screen. Create a new material in the assets panel and name it info_icon....use the info_icon image as the texture of the image....Apply the material to the texture 2)Add another rectangle by right clicking on the canvas....make sure the rectangle is on the same layer as canvas....this will be used as info screen....rename it "instructions" .create and add material in the same way as before....Scale this by 3 on all axes by filling the values in properties panel. 3)Add object tap to info_icon and connect it with the visibility of info screen Short Summary connect the info screen Resources info icon and instructions image Fun ...

Tutorial 3

Image
Tutorial 3- Spark AR Intro Main Content To complete the navigation, open the patch editor make the following setup 1)Drag 2d node needs to be first imported from the resources folder 2)The device node can be brought in by dragging the devie from the hierarchy in the scene panel. 3)Hook the object tap from map icon to "drag enabled" in the drag 2d node and also connect it the visibility from "map". Now we need to restrict the range of pointer...we can do this by using a clamp node(clamp node restricts between 2 values)Make the clamp node to be vector 2. Then use divide patch and make it vector 2 as well....fill 3 in both x and y because we scaled the map by 3 earlier....Connect it to position of pointer. Now we need to hook the movement of the camera with these values...we will do this by hooking our main world root object in the opposite direction to create a sense of the camera moving... First we use the from range node and make it vector 2 as well.(This node conve...

Tutorial 2

Image
Tutorial 2- Spark AR Intro Main Content To setup the navigation 1) Add a canvas by right clicking on scene panel on the left 2)Add a new layer to the canvas and make sure the new layer is on the top....You can see the layers just adjacent to scene tab 3)Add a rectangle by right clicking on the canvas....make sure the rectangle is on the same layer as canvas....this will be used as a temporary button to toggle the map until the native ui picker is hooked properly....rename it accordingly......move the rectangle to top right of the screen. Create a new material in the assets panel and name it map_icon....use the map_icon image as the texture of the image....Apply the material to the texture 4)Add another rectangle by right clicking on the canvas....make sure the rectangle is on the same layer as canvas....this will be used as map....rename it "map" .create and add material in the same way as before....Scale this by 3 on all axes by filling the values in properties panel. 5)Add ...

Tutorial 1

Image
Tutorial 1- Spark AR Intro Main Content Import the whole scene asset from blender...Place them under one empty game object(ye part tune hi kiya tha) and setup the animation controllers Rename the empty game object to something useful like "main world object root" or "world root" Drag the world root in hierarchy from under camera to independent object. We will set the position and scale of the world root. position will be set automatically but for now change the Y value to something around -0.7 set the scale to be 6,6,6 Short Summary Tell about animation controllers and the properties window Resources Blender scene gltf file Fun Points Tell the difference between parenting under camera and parenting under world root