Recent Posts

Pages: 1 ... 8 9 [10]
91
General / Re: Feedback, Requests, & Suggestions
« Last post by Alex on May 13, 2017, 01:58:18 AM »
Hi, thanks for the suggestion! I agree that the UI needs more work- this is something I want to improve!

Sorry about the issue you're having. I just checked the online HowTo page, and realized that it hasn't been updated with the latest info. I went and updated it just now so you can refresh it if you're using it. The Howto that is included in the download of the program should be up to date though.

Some commands were changed in the last two versions of the program.
The Active selection key binding is now Shift+Enter. There is also a new key binding for the Object Edit mode (Enter). When you select an object instance, you can now simply press Enter to begin editing the object, or Enter to stop editing the object.
also, Middle mouse button for toggling Active Selection mode.

So you can use shift+enter or middle mouse button. Hope that helps.

I agree that more clickable buttons could help. However, I need to make sure that I don't keep adding more and more UI elements for everything because this is something that turns me off from other 3d programs- the amount of information that they throw at the user. I need to find a suitable way to increase usability without increasing complexity of the user interface.
With the current features, I feel the key bindings are enough, but as more features are added there will be additional UI elements to manage it appropriately.
92
General / Re: Feedback, Requests, & Suggestions
« Last post by Lollie on May 13, 2017, 01:26:12 AM »
I have a request for the UI: Toolbars. Give every mode and feature its own button, right along the top (or side) of the program window.

Crocotile is a really interesting tool, it does low poly art in a way that looks intuitive and easy to make sense of. But the learning curve is much higher than it could be, because most of the tools/features are currently only accessible via keyboard shortcuts.

I've also had issues getting Active Selection Mode to function. The Enter key appears to do nothing for me, except when I'm editing an object instance - pressing Enter will exit the object editing mode. Being able to enable Active Selection Mode from a toggle button would help alleviate something like this.
93
Support / Re: Itch Payment Register
« Last post by Alex on April 19, 2017, 04:46:23 AM »
Do you know the email you used with itch? If so, can you pm me it?
94
Support / Itch Payment Register
« Last post by Vaiktorg on April 19, 2017, 12:43:35 AM »
Hello, I don't know if this is the correct place but. If I payed full $10 for the software, can it be registered or not? =/ I did this without knowledge, thinking it would be possible. Also, i was locked out of my Itch account because i lost my 2FA verification code lol.
95
Off-Topic / UNITY - Use your Tileset texture as a repeatable texture
« Last post by Setsuki on April 05, 2017, 12:08:20 PM »
I am currently using Crocotile to do models for my Unity project, and while it is near perfect for texture atlasing, there are performance gains to be had when you simply want to repeat one tile on a plane ; Using crocotile, this forces you to have a higher ploycount than a simple quad.

I have made a shader that repeats a tile over a basic Unity quad, in order to benefit from both texture atlasing and texture repeating, with a low polycount.

You can see the result in the linked file

Here is what you need :
RepeatTileTool.cs (anywhere in your project)
Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif

[ExecuteInEditMode]
public class RepeatTileTool : MonoBehaviour
{
    public Rect position;
    public Vector2 v2UnscaledRepeat = Vector2.one;
    public Vector2 v2PaddingInPixels = Vector2.one;
    // Use this for initialization
    void Awake () {
        UpdateMesh();
}

// Update is called once per frame
void Update () {
#if UNITY_EDITOR
        if(!Application.isPlaying && Selection.activeGameObject == gameObject)
        {
            UpdateMesh();
        }
#endif
    }
    /// <summary>
    /// we "hide" the informations about the tiling in the mesh
    /// </summary>
    void UpdateMesh()
    {
        Mesh mesh = GetComponent<MeshFilter>().sharedMesh;
        Mesh newMesh = new Mesh();
        newMesh.vertices = mesh.vertices;
        newMesh.uv = mesh.uv;
        newMesh.triangles= mesh.triangles;
        newMesh.normals= mesh.normals;
        newMesh.tangents = mesh.tangents;
        Texture tex = GetComponent<MeshRenderer>().sharedMaterial.mainTexture;
        Vector2 v2Divided = new Vector2(position.width / tex.width , position.height / tex.height);

        //get the UVs corresponding to those
        float fUVxMin = v2Divided.x * position.x;
        float fUVxMax = (v2Divided.x * position.x) + v2Divided.x;
        float fUVyMax = 1- (v2Divided.y * position.y);
        float fUVyMin = 1-((v2Divided.y * position.y) + v2Divided.y);


        //padding
        fUVxMin += v2PaddingInPixels.x /tex.width;
        fUVxMax -= v2PaddingInPixels.x / tex.width;
        fUVyMin += v2PaddingInPixels.y / tex.height;
        fUVyMax -= v2PaddingInPixels.y / tex.height;
       

        Vector2 [] v2RepeatToInput = new Vector2[mesh.vertexCount];
        Color [] colorsToInput = new Color[mesh.vertexCount];
        for (int i = 0; i < mesh.vertexCount; ++i)
        {
            v2RepeatToInput[i] = new Vector2(v2UnscaledRepeat.x * transform.lossyScale.x, v2UnscaledRepeat.y * transform.lossyScale.y);
            colorsToInput[i] = new Color(fUVxMin, fUVxMax, fUVyMin, fUVyMax);
        }
        newMesh.colors = colorsToInput;
        newMesh.uv2 = v2RepeatToInput;
        GetComponent<MeshFilter>().sharedMesh = newMesh;
    }
}

RepeatTileInspector.cs (NEEDS to be in an "Editor" folder)
Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

[CustomEditor( typeof( RepeatTileTool ) )]
public class RepeatTileInspector : Editor
{
private MeshRenderer m_renderer;
Texture2D m_editorTexture;
RepeatTileTool me;

public RepeatTileInspector()
{
Undo.undoRedoPerformed += RecalculateTexture;
}

public override void OnInspectorGUI()
{
me = ( RepeatTileTool )target;
if( m_renderer == null )
{
m_renderer = me.GetComponent<MeshRenderer>();
}

//if any changes is made, we remember it, as we'll need to redraw the texture
bool bChanged = false;
EditorGUI.BeginChangeCheck();

Undo.RecordObject( me, me.name );
me.position = EditorGUILayout.RectField( "Position and size", me.position );

me.v2PaddingInPixels = EditorGUILayout.Vector2Field( "Padding (In pixels)", me.v2PaddingInPixels );

me.v2UnscaledRepeat = EditorGUILayout.Vector2Field( "Texture repeat per meter", me.v2UnscaledRepeat );

bChanged = EditorGUI.EndChangeCheck();

//draw the editor texture and add a square around the selected tile
if( m_editorTexture == null || bChanged )
{
RecalculateTexture();
}
//show the texture

int nPadding = 35;
int nWidth = Mathf.Min( Screen.width - nPadding, m_editorTexture.width - nPadding );
float fRatio = 1;
if( nWidth != m_editorTexture.width - nPadding )
{
//we're screen bound
fRatio = ( float )( Screen.width - nPadding ) / ( float )( m_editorTexture.width - nPadding );
}

Rect r = GUILayoutUtility.GetRect( nWidth, m_editorTexture.height * fRatio );
GUI.DrawTexture( r, ( m_editorTexture ), ScaleMode.ScaleToFit );

}

private void RecalculateTexture()
{
m_editorTexture = new Texture2D( m_renderer.sharedMaterial.mainTexture.width, m_renderer.sharedMaterial.mainTexture.height );
m_editorTexture.SetPixels( ( ( Texture2D )m_renderer.sharedMaterial.mainTexture ).GetPixels() );

Rect realPosition = new Rect( me.position.x * me.position.width, me.position.y * me.position.height, me.position.width, me.position.height );

for( int x = ( int )realPosition.xMin ; x < ( int )realPosition.xMax ; ++x )
{

m_editorTexture.SetPixel( x, m_editorTexture.height - ( int )realPosition.yMin, Color.red );
m_editorTexture.SetPixel( x, m_editorTexture.height - ( int )realPosition.yMax, Color.red );
}


for( int y = m_editorTexture.height - ( ( int )realPosition.yMax - 1 ) ; y < m_editorTexture.height - ( ( int )realPosition.yMin + 1 ) ; ++y )
{
m_editorTexture.SetPixel( ( int )realPosition.xMin, y, Color.red );
m_editorTexture.SetPixel( ( int )realPosition.xMax, y, Color.red );

}

realPosition.x += me.v2PaddingInPixels.x;
realPosition.width -= 2 * me.v2PaddingInPixels.x;
realPosition.y += me.v2PaddingInPixels.y;
realPosition.height -= 2 * me.v2PaddingInPixels.y;

for( int x = ( int )realPosition.xMin ; x < ( int )realPosition.xMax ; ++x )
{

m_editorTexture.SetPixel( x, m_editorTexture.height - ( int )realPosition.yMin, Color.green );
m_editorTexture.SetPixel( x, m_editorTexture.height - ( int )realPosition.yMax, Color.green );
}


for( int y = m_editorTexture.height - ( ( int )realPosition.yMax - 1 ) ; y < m_editorTexture.height - ( ( int )realPosition.yMin + 1 ) ; ++y )
{
m_editorTexture.SetPixel( ( int )realPosition.xMin, y, Color.green );
m_editorTexture.SetPixel( ( int )realPosition.xMax, y, Color.green );

}

m_editorTexture.Apply();
}

}

RepeatTileShader.shader, anywhere in the project
Code: [Select]
Shader "Custom/Repeat Tile Shader" {
Properties {
_MainTex("Albedo (RGB)", 2D) = "white" {}
_FakeTex("Seriously?", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200

CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf Lambert

// Use shader model 3.0 target, to get nicer looking lighting
#pragma target 3.0

sampler2D _MainTex;

struct Input {
float2 uv_MainTex;
float2 uv2_FakeTex;
float4 color : COLOR;
};
void surf (Input IN, inout SurfaceOutput o) {
//IN.uv2_FakeTex contains the repetition values
//IN.color contains the UVs of the tile we want to repeat

//uv are currently between 0 and 1. We make them between 0 and Repeat
IN.uv_MainTex.x *= IN.uv2_FakeTex.x;
//then, we remove the overflow to get it back between 0 and 1
IN.uv_MainTex.x -= floor(IN.uv_MainTex.x);

//We do the same with y
IN.uv_MainTex.y *= IN.uv2_FakeTex.y;
IN.uv_MainTex.y -= floor(IN.uv_MainTex.y);

IN.uv_MainTex.x = lerp(IN.color.r, IN.color.g, IN.uv_MainTex.x);
IN.uv_MainTex.y = lerp(IN.color.b, IN.color.a, IN.uv_MainTex.y);

fixed4 c = tex2Dlod (_MainTex, half4(IN.uv_MainTex.x,IN.uv_MainTex.y,0,0));

o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}

All you need to do now is :
Create a quad (GameObject/3D Object/Quad)
Apply a material using the Custom/Repeat Tile Shader shader, and using your tileset as texture
Add the component "RepeatTileTool" to the quad.
You should now see in your inspector your texture, and a simple editor to set the position, width and height of the rect you want to see on your quad. You can also set a pixel padding, and finally, a scaling tool.

Note : Due to visual issues, the shader doesn't use mipmaps. You can have mipmaps enabled, but the shader will ignore them.
96
In Development / Re: Hyohnoo's work
« Last post by Alex on April 04, 2017, 02:41:10 PM »
hey \o
that ship is pretty radical! I like it a lot! The way you added the smaller details like the ores/anchor and lines is really great. I need more :)
97
In Development / Hyohnoo's work
« Last post by Hyohnoo on April 04, 2017, 01:10:09 PM »
Hello! o/

98
General / Re: Feedback, Requests, & Suggestions
« Last post by Alex on March 31, 2017, 10:23:09 PM »
Yeah, that makes sense. I believe something like this has been suggested in the past and it is a good idea. I want to eventually add more tools that can accomplish such tasks like what you describe.
99
General / Re: Feedback, Requests, & Suggestions
« Last post by Jake on March 31, 2017, 09:27:21 PM »
Now I'm not entirely sure if this feature is already implemented, but this is a feature I'd really like to have.  ::)

When I'm placing down numerous tiles that are identical, it's a very long and drawn out process. Instead of clicking and popping down a tile, then moving along to the next space and repeating until you've got a long row of tiles. It'd be nice to have a feature that lets you place down one tile at the start, you hold down a feature button, and then you go to the very end of the row, place a tile down like normal whilst holding down this feature button, and all the tiles in-between the start and end position are automatically filled up.

Does that make any sense? It'd be a great time saver! :P
100
General / Re: Problems with Crocotile 3D and Unity?
« Last post by Jake on March 31, 2017, 09:20:35 PM »
I think this sort of issue is a common one that people face when dealing with creating 3d models/textures. I think it just becomes more apparent in our case because of the nature of it being tiled and the uvs of tiles being right next to each other. There might be solutions to this sort of issue if you do some general searches online related to this sort of thing. I'm not sure what they would be.
Anyways, hope I've helped some. If you figure out a better solution, feel free to let me know about it!
I appreciate all the help you've given!  8)

I've searched far and wide online, I've noticed there have been a few users who had similar issues with this. Fixes seem varied, but I'll keep looking! In the meantime, I've messaged Giromancy (the user on this forum who made the Silent Hill maps using Unity). I'm hoping he might have an answer, but there's no guarantee he'll reply!

If I come across a better solution I'll be sure to let you know!  :)
Pages: 1 ... 8 9 [10]