Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Erarnitox

Member
  • Content Count

    315
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by Erarnitox

  1. hey i wrote a pretty simple tool so you can create seamless Textures from Photos in Bulk: Results are okay and the Script is in a very eraly stage but here you go: Would love it if you could help me to make it better I might upload this to GitHub soon but im not sure yet what to do with it. btw. Here are some results: input: Output: If you just want to use/test it you can download a compiled version from here: https://mega.nz/#!JcsknC5a!RU_le-qnE7Pded4pMnlHTu_87Ra1x5T1G9lnArFVT3Q Thanks for reading Would love to get feedback ^^
  2. Erarnitox

    Prime Numbers

    yes but for what do you use this in a game?
  3. nope theyre not make sure to append the encryption key to the url als well edit: anyway im currently writing a program in Java that makes the Texture seamless and then creates an Albedo from that and calculates a normal map as well. Im just having issues with seting the alpha channel per pixel for an Buffered Image and how to sharpen the textures as well
  4. no problem i have some examples as a zip here: https://mega.nz/#!0UcDAI6K!NAxKc8Br0-mgwBofWPgbyVbhcH2I6vMZG8Ww_x8tGxs thank you very much for helping. Also i dont know why the url shows like this but it should still work ^^
  5. Yeah like thats not the problem. The Problem ist to create the textures for that from crappy pictures. I mean like really crappy
  6. Hey, the reason i post here is a long stroy but i have about 600 low res pictures of different floors and need to create a near photorealistic render of a room with these floors. How would it be possible to do this in about 2 weeks? Any ideas would help since i have no idea how this would be doable. The model of the room is already done and i have prepared a blender project with everything else but the textures of the floor. Any help and/or tips are higly apprechiated
  7. when you change Strings often it might be faster to use StringBuilder to reduce waste that has to be collected by the garbage collector
  8. Erarnitox

    Array of arrays

    yeah youre right it should be: //you mean something like this?: for(int i=0; i<allSequences.length; i++){ for(int j=0; j<allSequences[i].length; j++){ //read suff: something = redStuff(); allSequences[j] = something; } //seq finished reading } //array finished reading sorry bout that ^^
  9. Erarnitox

    Array of arrays

    That is actually what i just posted. Havent coded in c# a while so you might need to use .Length ... not sure if it was captial, but other than that my code does exactly that. Loops thorough the 1st array then goes to the next and so on... In the for loop the condition is the length of the array so arrays with different sizes wont be a problem.
  10. Erarnitox

    Array of arrays

    //you mean something like this?: for(int i=0; i<allSequences.length; i++){ for(int j=0; j<allSequences.length; j++){ //read suff: something = redStuff(); allSequences[j] = something; } //seq finished reading } //array finished reading
  11. Erarnitox

    Refresh Rate

    Good question but lower frefresh rates can: 1) look more natural 2) dont stress the cpu/gpu too much when your game doesnt require a high refresh rate
  12. Erarnitox

    Array of arrays

    dude its basics: int[][] allSequences = new int[][] {{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15}};
  13. have opened a topic on the unity forums and would apprechiate any help or even just hints or ideas: https://forum.unity.com/threads/help-seams-on-new-terrain-2018-3.634732/ thank you very much
  14. Hey, just wanted to update my asset: https://assetstore.unity.com/packages/tools/terrain/xenosandboxgenerator-132459 to work with the new Terrain System but there are some problems. I got everything working so far based on the new Terrain Layers i did use splatmaps before to texture the terrain so it wasnt that hard to switch it to Terrain layers but now here is the problem: There are seams now between Terrain chunks and they are very well visible: With the old system this Terrain was completely seamless but i dont have a clue why it isnt anymore. Im pretty sure it has to do with the new layer system in some way. It looks like the normals on the edge are not calculated correctly. I did use setNeighbours() and flush() on both terrain chunks to recalculate the normals at the edge. And in the past that did work. But its also strange that at some points the textures dont seem to match somehow. Could be an illusion tho. Any ideas are greatly apprechiated Also the asset is free if you want to have a look for yourself. Source is included ofc. Also if you have any documentation of the new Terrain Layer system that would be apprechiated as well. Thanks for your help. Pretty stuck "Instancing also improves the appearance of terrain normals; we decouple the terrain mesh normals from the geometry by storing them in a normal map texture that is generated from the heightmap and sampled in the pixel shader. This means the normals are independent of the mesh LOD level. "~Unity Blogs Maybe that has something to do with it?
  15. still want to have the other features up to date. Probably im just to dumb to use the new system and just frustrated me quite a bit. Since there is very little documentation on the scripting side of it. I guess have to figue it out somehow. Just not today. So much enexpected problems with this new system Its also about my characted once there is a new stabe release i have to have all the new stuff ^^ But ill call it a day now and see why all of this happens by tomorrow. (Its time to get into unity again)
  16. I know everybody likes the new terrain system of unity but i just dont. Since 2018.3 was release i only had problems with the new terrain system. If i set the new gpu instancing to true on the terrain -> whole terrain glitches out.... okay so i wont use it then im alright with that. Warning: Splat Maps are obsolete now ... okay ill change it no problem... ofc. there is very little documentation on the new Terrain Layers api but ill figure it out. mhmm your seamless terrain has seams now -> chaning auto connect to true ... still seams .... set the same group id to all terrains tiles... still seams but why? this doesnt make sence you start to annoy me unity. well at least i have this multy terrain editing thing now. huess what. that doesnt work as well. Here are some funny pictures of a once seamless terrain: now has obvious seams and the normals are obviously not right at all but lets have a look at the editing tools now shall we. I always wanted to draw textures on multiple terrains at once: well then... maybe move it slightly.... ?? at least its not stretched like that anymore.... can i just have the old terrain back, please? I mean wtf is this, nothing works the way it should and this isnt even the beta version. Screenshots where made in Stable release 2018.3 And when it comes to scripting there really is a lack of documentation what methods are new how they work as well if any old methods are affected by changes or not useable anymore for the new Terrain System. I mean i like the idea but this the things i have experienced so far are not a stable release to me.
  17. its literally right on this page... anyways here you go:
  18. hope so he really deserves it for this awesome work. Like to see it is growing now at 6k still not a lot but i can see it getting rolling
  19. how this only has 4k views?
  20. Erarnitox

    Loading Scene

    Very simple script you can just paste into a scene to make it a loading scene for a bigger Level/Scene to follow. using System.Collections; using UnityEngine; using UnityEngine.SceneManagement; public class AsyncLoad : MonoBehaviour { [Header("Name of the Scene to be loaded:")] public string sceneToLoad = "Map"; //Name of the Scene we want to load. [Space(10)] public GUISkin myskin; //Our GUISkin to use for the text and loading bar. private float progress = 0; //progress in % void Start () { //use a Coroutine to handle the loading: StartCoroutine(LoadNewScene()); } #region Loading IEnumerator LoadNewScene() { AsyncOperation loading = SceneManager.LoadSceneAsync(sceneToLoad); while (!loading.isDone) { progress = 100*loading.progress; yield return null; } } #endregion #region Display private void OnGUI() { GUI.skin = myskin; //Set the style to our GUISkin GUI.Box(new Rect(Screen.width / 2 - 500, Screen.height - 40, 1000, 20),""); //background Box GUI.color = Color.cyan; //Color for the loading bar GUI.Box(new Rect(Screen.width / 2 - 500, Screen.height - 40, 10*progress, 20),""); //loading bar GUI.color = Color.white; //color for the display test GUI.Label(new Rect(Screen.width / 2 - 100, Screen.height - 45, 200, 30), progress + "% Loaded..."); //display text } #endregion } nothing special but i hope its useful for some of you.
  21. hey, i wrote a quick and simple editor window that lets you check your texel density by replacing each texture with a checker texture in the same size to make it clear which textures have too much and which too little resolution !!Warning!! 1.Back up your project so you can restore your materials if they get messed up 2.only works with square textures with a power of 2 resolution(16x16 - 4096x4096) 3.not debugged only a very fast script i put together so please, please do 1. first Code here: using UnityEngine; using UnityEditor; using System.Collections.Generic; public class XenoTexelTool : EditorWindow { int c = 0; List<Texture> CheckerTextures = new List<Texture>(); List<Texture> OrginalTextures = new List<Texture>(); [MenuItem("Erarnitox/XenoTextelTool")] public static void Menu() { XenoTexelTool window = (XenoTexelTool)GetWindow(typeof(XenoTexelTool)); window.minSize = new Vector2(300, 120); window.maxSize = new Vector2(300, 120); window.Show(); } private void LoadCheckers() { CheckerTextures.Add(Resources.Load<Texture>("check16")); CheckerTextures.Add(Resources.Load<Texture>("check32")); CheckerTextures.Add(Resources.Load<Texture>("check64")); CheckerTextures.Add(Resources.Load<Texture>("check128")); CheckerTextures.Add(Resources.Load<Texture>("check256")); CheckerTextures.Add(Resources.Load<Texture>("check512")); CheckerTextures.Add(Resources.Load<Texture>("check1024")); CheckerTextures.Add(Resources.Load<Texture>("check2048")); CheckerTextures.Add(Resources.Load<Texture>("check4096")); /* Debug.Log("Loading Checkers..."); if (EditorGUIUtility.FindTexture("Checker/check16")){ Debug.Log("Check16 found!"); CheckerTextures.Add(EditorGUIUtility.FindTexture("Checker/check16") as Texture); } */ } void OnGUI() { GUI.color = Color.cyan; GUILayout.Box("XenoTexelTool"); GUI.color = Color.white; GUILayout.Space(10); GUILayout.Label("This tool lets you check your texel density:"); GUI.color = Color.green; GUILayout.Space(5); if (GUILayout.Button("Set Checker Texture")) { if (CheckerTextures.Count < 1) { LoadCheckers(); } SetAllMaterialsInSceneToChecker(); } if (GUILayout.Button("Set Original Texture")) { SetAllMaterialsInSceneToOriginal(); } } void SetAllMaterialsInSceneToChecker() { if (OrginalTextures.Count == 0) { foreach (Material mat in Resources.FindObjectsOfTypeAll(typeof(Material)) as Material[]) { if (mat.HasProperty("_MainTex")) { if (mat.GetTexture("_MainTex") != null) { if (!mat.mainTexture.Equals(null)) { OrginalTextures.Add(mat.mainTexture); switch (mat.mainTexture.width) { case 16: mat.mainTexture = CheckerTextures[0]; break; case 32: mat.mainTexture = CheckerTextures[1]; break; case 64: mat.mainTexture = CheckerTextures[2]; break; case 128: mat.mainTexture = CheckerTextures[3]; break; case 256: mat.mainTexture = CheckerTextures[4]; break; case 512: mat.mainTexture = CheckerTextures[5]; break; case 1024: mat.mainTexture = CheckerTextures[6]; break; case 2048: mat.mainTexture = CheckerTextures[7]; break; case 4096: mat.mainTexture = CheckerTextures[8]; break; default: mat.mainTexture = CheckerTextures[0]; break; } } } } } } } void SetAllMaterialsInSceneToOriginal() { if (OrginalTextures.Count>0) { c = 0; foreach (Material mat in Resources.FindObjectsOfTypeAll(typeof(Material)) as Material[]) { if (mat.HasProperty("_MainTex")) { if (mat.GetTexture("_MainTex") != null) { if (!mat.mainTexture.Equals(null)) { mat.mainTexture = OrginalTextures[c++]; } } } } OrginalTextures.Clear(); } else { Debug.LogWarning("Warning: Can't restore Textures since they have not been replaced!"); } } } Download with checker textures and everything set up for lazy ppl. like myself: https://mega.nz/#!BY9GmawZ!K50VZGxbk08S2J16oRSuKVq1OEvOkGkDBcHJCS4IIE0 Please have a look at it and tell me what i can improve This is a must have for every leveldesigner etc. so i was surprized i couldnt find anything like that script online meaning: i will probably improve it so if you dont need it right now ill be working on a stable/tested version of this script. Thanks for the read
  22. @OcularCash even tho this is kind of a workaround and could get messy when you have multiple objects you want to do that for, i still love this idea cuz its so simple <3 so now... first of all if a pbr material looks wrong but every other pbr material in the scene looks fine the material is most likely wrong and your first thing to to would be to check if all the textures are correct (is the albedo to bright maybe?) So if you dont care about physical accuracy you can download the standard shader and add a float to the material 0-1 where 1 would be recives the full light and 0 would be none. There should be a line col = ... in the function the vertex color gets calculated now just multiply by the float you defined .... shaderlab is a bit tricky i guess you have to declare that you want to actually use the float somewhere and this method is like a tint im sure you can actually calculate the light better but im not a shader pro. Pro: to this would be that you can set the light for every material differently without the need of an extra layer or light. Con: you actually have to understand some shaderlab to get this working (i could do it for you as soon i got time tho.) edit: download shaders from here and Tutorial on shaderlab here and especially on how to add a tint to the shader here (note: im sure there is a better way to do this tho.) hope this helped somewhat
  23. this is really no eather or question since GeNa has its focus clearly on the coding side to place objects in a natural way while ADPI is a pure asset pack. So it would be also possible to combinde both to get the best of both, just replace the "placeholder" assets from GeNa with the ones from ADPI. If i had to decide to pick one i would probably go with ADPI since it looks fantastic and you can still "hand craft" your level with it. (Dont get me wrong: they both look very well made and worth the money it just depends on what you need.)
  24. hey ive got a problem when i try to restore my original seed from the "shortened" one. Shortened Seed/Inut is (cant copy/paste the exact string since it uses unicode): ǻM߸ࡪʙŅࠚœՈϰňfҬ̓ࡒ߮Ϝר£Ӹτ߻ݍєࡪݍ̟[¡Lτ߽ņ Output sould be: 003i50i0i99i2i30i173i0.01020087i53i1.700173i4.7i20i0.54i87i0.6729521i-0.37699i-0.6940705i0.5029541i1i1 The long seed only uses 13 different chars (so i theated it as a base 13 number) and converted it to a higher base to shorten it and get the shortSeed. (egs. like you would do to convert from binary to octal) here is the code: private void RestoreSeed(string shortSeed) { char[] toDecode = shortSeed.ToCharArray(); char[] seed = new char[toDecode.Length * 3]; int value = 0; int counter = 0; for(int i=0; i< toDecode.Length; i++) { value = toDecode[i]; counter = 0; //3rd letter: while(value >= 169) { value -= 169; counter++; } if (counter < 10) { seed[i * 3] = (char)counter; } else if (counter == 10) { seed[i * 3] = '-'; } else if (counter == 11) { seed[i * 3] = '.'; } else { seed[i * 3] = 'i'; } counter = 0; //2nd letter: while (value >= 13) { value -= 13; counter++; } if (counter < 10) { seed[i * 3+1] = (char)counter; } else if (counter == 10) { seed[i * 3+1] = '-'; } else if (counter == 11) { seed[i * 3+1] = '.'; } else { seed[i * 3+1] = 'i'; } //1st letter: if (value < 10) { seed[i * 3 + 2] = (char)value; } else if (value == 10) { seed[i * 3 + 2] = '-'; } else if (value == 11) { seed[i * 3 + 2] = '.'; } else { seed[i * 3 + 2] = 'i'; } } string Seed = new string(seed); Debug.Log("Seed:"+ Seed); } in debug log i get an completely empty seed and i wonder why that is since i have no clue thanks for your help guys (If any information on how i created the seed etc. is needed feel free to ask and i will provide additional information for better understanding.)
×
×
  • Create New...