Thesis Progress - A general way of slicing model 1.0
2/18 Updates:
Function is from the forum, but the author didn't give full codes, so I tried to write a new script to apply the those functions. In the main script, the function here creates the array to store 2D textures, the variable sliceCount defines the resolution. The problem I met is when I tried to assign numbers for value RampValue, I was confused with the new value range and the syntax of array usage. Now it's corrected with the help of Professor, RampValue(i,0,sliceCount,-0.5f,0.5f);
Also, I assumed the Blur in if condition could be put behind, so I didn't use it at all, but now 'blurmaterial' has been turned into public for assigning blur outside. Even though, there code is still not working perfectly.
The second part of this script, bascially just create the 3D texture based on the 2D texture array above. As expected, it should assign the texture in the array to the function here, and then print it on planes that will be created in the scene. Somehow, it's not showing anything, still remains correction. The picture above shows the progress so far. The quads are created, but nothing on them, each quad is transparent without texture. (one of the functions must be missed)
For integrity, more documentation of other codes will be followed, the above part shows the key updates.
This part from sliceblur.shader, the most of offset codes are commented out, which were used for moving each quad to simulate blur effect, but now it just make quads transparent.
Comments
Post a Comment