Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Bradamante3D

Pages: [1] 2 3 ... 6
Dev Blog / Re: July 21, 2017 - Grass
« on: December 28, 2017, 06:07:31 AM »
When I am using Unity for architectural visualisation (often in VR) grass rendering and it's performance is a massive problem. There's no chance you can externalize this into an Asset Store asset? Let me guess, productization is not the problem - ongoing support is? Is it possible to publish an asset on the store explicitely "as is"?

NGUI 3 Support / NGUI vs TextMesh Pro
« on: March 08, 2017, 10:46:43 AM »
Hi there,

on the Unity blog here they are summarizing the Unity keynote at GDC 2017. There they are saying that in the future TextMesh Pro will be integrated natively into Unity.

I find this interesting because one feature of NGUI that I was never able to use was to create your own bitmap fonts via the FreeType.dll, since that never ran on Mac OS X. In this video the creators of TextMesh Pro are saying that TextMesh Pro can create bitmap fonts. I assume that the bitmap atlas TextMesh Pro creates can not be used directly by NGUI. But maybe that would be a feature worthy to add to NGUI in the future?

The reason this is attractive to me specifically is that I recently switched from a 1080p monitor to a 1440p screen. I am using the Aldrich bitmap font that came with NGUI (or was it Starlink UI?). On my new monitor I am noticing that the Aldrich bitmap font looks a bit blurry. So now I want to regenerate the bitmap font at a higher resolution, but FreeType does not work on OS X.

So I guess my question is: What could the relationship between NGUI and a native TextMesh Pro be in the future? Or, could you update Starlink UI to include a higher resolution Aldrich bitmap font?

TNet 3 Support / Re: Socket null exception error
« on: October 28, 2016, 03:29:53 PM »
It seems I have a similiar problem. This thread is the only thread Google finds in the context of "Access Denied" and TNet. See the attached screenshot.

The console says:

Access denied
TNet.TcpProtocol:RespondWithError(Buffer, String) (at Assets/Libraries/TNet/Common/TNTcpProtocol.cs:923)
TNet.TcpProtocol:RespondWithError(String) (at Assets/Libraries/TNet/Common/TNTcpProtocol.cs:897)
TNet.TcpProtocol:OnConnectResult(IAsyncResult) (at Assets/Libraries/TNet/Common/TNTcpProtocol.cs:321)

Access denied
TNet.TNTcpLobbyClient:Update() (at Assets/Libraries/TNet/Client/TNTcpLobbyClient.cs:100)

every two seconds or something. This is in my main menu, after hitting Play. There's nothing going on, I only have the "Network Lobby Listeners" GameObject in my Hierarchy. I assume that the calls are coming from there, but who knows.

TNet is 3.0.5 with Unity 5.4.1 on OS X.

TNet 3 Support / Re: Mass-exporting prefabs as DataNodes
« on: May 15, 2016, 05:38:33 AM »
Alright, I tried the new TNet version that you sent me via email. In that mail you said I should rename the built-in shaders. Not sure why that makes a difference since the Sonic Either shaders don't get reproduced too. But ... I renamed the Stanard shader to "CCStandard", both the name of the file and the string info at the top of the shader file text. The good news is that both text and binary mode now give the same result:

The bad news is that as you can see this is still not the desired result. Unlike before, the UVed texture is gone ("octotoad1_auv"). That's a step back. The data is in the text file though. I guess, at 694 KB. Don't mind that in the screenshot "octotoad1_auv" does not yet have the "CCStandard" shader applied. I did that and it didn't help.

It seams to me that - as before - materials are not applied correctly. Instead, the last material is applied, right now it's one of the beiges, before it was dark grey.

Another note is that instantiating a text-based DataNode export does not give me console errors. Instantiating the same file as binary however gives me:

  1. Unable to resolve type 'Rendering.ReflectionProbeUsage'
  2. UnityEngine.Debug:LogError(Object)
  3. TNet.Serialization:NameToType(String) (at Assets/Addons/TNet/Common/TNSerializer.cs:305)
  4. TNet.Serialization:ReadType(BinaryReader, Int32&) (at Assets/Addons/TNet/Common/TNSerializer.cs:2372)
  5. TNet.Serialization:ReadObject(BinaryReader, Object, Int32, Type, Boolean) (at Assets/Addons/TNet/Common/TNSerializer.cs:2404)
  6. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2390)
  7. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2282)
  8. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  9. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  10. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  11. TNet.Serialization:ReadObject(BinaryReader, Object, Int32, Type, Boolean) (at Assets/Addons/TNet/Common/TNSerializer.cs:2432)
  12. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2390)
  13. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2381)
  14. TNet.DataNode:Read(Byte[], SaveType) (at Assets/Addons/TNet/Common/DataNode.cs:585)
  15. TNet.DataNode:Read(Byte[]) (at Assets/Addons/TNet/Common/DataNode.cs:540)
  16. DataNodeWriter:Start() (at Assets/Scripts/DataNodeWriter.cs:55)
  18. Argument cannot be null.
  19. Parameter name: type
  20. UnityEngine.Debug:LogError(Object)
  21. TNet.Tools:LogError(String, String, Boolean) (at Assets/Addons/TNet/Common/TNTools.cs:1004)
  22. TNet.TypeExtensions:Create(Type) (at Assets/Addons/TNet/Common/TypeExtensions.cs:70)
  23. TNet.Serialization:ReadObject(BinaryReader, Object, Int32, Type, Boolean) (at Assets/Addons/TNet/Common/TNSerializer.cs:2713)
  24. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2390)
  25. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2282)
  26. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  27. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  28. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  29. TNet.Serialization:ReadObject(BinaryReader, Object, Int32, Type, Boolean) (at Assets/Addons/TNet/Common/TNSerializer.cs:2432)
  30. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2390)
  31. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2381)
  32. TNet.DataNode:Read(Byte[], SaveType) (at Assets/Addons/TNet/Common/DataNode.cs:585)
  33. TNet.DataNode:Read(Byte[]) (at Assets/Addons/TNet/Common/DataNode.cs:540)
  34. DataNodeWriter:Start() (at Assets/Scripts/DataNodeWriter.cs:55)
  36. Unable to create an instance of
  37. UnityEngine.Debug:LogError(Object)
  38. TNet.Tools:LogError(String, String, Boolean) (at Assets/Addons/TNet/Common/TNTools.cs:1004)
  39. TNet.Serialization:ReadObject(BinaryReader, Object, Int32, Type, Boolean) (at Assets/Addons/TNet/Common/TNSerializer.cs:2714)
  40. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2390)
  41. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2282)
  42. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  43. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  44. TNet.Serialization:ReadDataNode(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2287)
  45. TNet.Serialization:ReadObject(BinaryReader, Object, Int32, Type, Boolean) (at Assets/Addons/TNet/Common/TNSerializer.cs:2432)
  46. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2390)
  47. TNet.Serialization:ReadObject(BinaryReader) (at Assets/Addons/TNet/Common/TNSerializer.cs:2381)
  48. TNet.DataNode:Read(Byte[], SaveType) (at Assets/Addons/TNet/Common/DataNode.cs:585)
  49. TNet.DataNode:Read(Byte[]) (at Assets/Addons/TNet/Common/DataNode.cs:540)
  50. DataNodeWriter:Start() (at Assets/Scripts/DataNodeWriter.cs:55)

Which reminds of the one here, but that fix is in of course.

I am attaching the text-based exported file. Notice how only the "octotoad1_auv" material explicitely mentions the "CCStandard" shader where the materials from "Materials/Shared" don't. Could that be a problem?

TNet 3 Support / Re: TNet 3 - Send DataNode to ChannelData
« on: May 06, 2016, 03:37:15 PM »
You should have ragequit that company the minute they told you to use underscores in front of everything. Flipped the desk and left. Nothing else to do with an abomination like that.

It's not that simple. There are languages - or rather: language communities - where the underscore is an accepted denotation. Python for example does not have private variables and instead replaces this language feature with a community agreement of putting an underscore in front of private variables. In your Unity code you usually use

  1. mPrivateVar

in other places I've seen

  1. m_PrivateVar

and in Python it would be

  1. _privateVar

and I kinda  like it.

Also note there are cultural factors to consider. On the german QUERTZ keyboard for example the underscore is very easy to produce, just as easy as an "m".

P.S. Yeah I know this isn't exactly TNet-related. Don't worry ... I will shower you with questions on how to combine TNet with Entitas very soon :P

Dev Blog / Re: Apr 17, 2016 - Once Upon a BRDF...
« on: May 02, 2016, 04:13:49 PM »
Did you try compiling this under GL Core? Just throwing both files into the Editor on OSX the Console complaines:

  1. Shader error in 'Tasharen/Specular': undeclared identifier 'samplerunity_SpecCube1' at Assets/Shader/Tasharen.cginc(158) (on glcore)

P.S. If you're on a mission to make those already good looking Forge3D Planets look even better, then please let them now, so that we all benefit :) (I bought them too)

TNet 3 Support / Re: Mass-exporting prefabs as DataNodes
« on: May 02, 2016, 08:30:38 AM »
Nuh, I am constantly re-exporting. I just tried both text and binary again, to no avail. I am almost sure that my assets are just s**t, since I am absolutely not a content creator.

When you see "***Glow" materials, it's a Sonic Either/Emissive/Textures material with only color settings, no texture. Same goes for the "Materials/Shared/ColorName" materials, which are Standard shader materials with no texture, but an Albedo color.

I am attaching the text version.

TNet 3 Support / Re: Making TNManager more customizable
« on: May 01, 2016, 01:59:03 PM »
Hm, I'm lost. For one, there is no TNManger.onCreateChannel. Shouldn't there be one?

For two, when I do:

  1. class MyManager () {
  3. void Start () {
  5.                         TNManager.onJoinChannel = HandlerJoinChannel;
  6.                         TNManager.onLoadLevel = HandlerLoadLevel;
  7.                 }
  9.                 void OnDisable () {
  11.                         TNManager.onJoinChannel = null;
  12.                         TNManager.onLoadLevel = null;
  13.                 }
  15. static public void HandlerJoinChannel ( int channelId, bool success, string msg ) {
  17.                         Debug.Log ( "HandlerJoinChannel" );
  18.                 }
  20.                 static public void HandlerLoadLevel ( int channelId, string eventName ) {
  22.                         Debug.Log ( "HandlerLoadLevel" );
  23. }
  24. }

nothing gets printed. But Debug.Log messages added to the TNManager.JoinChannel and TNGameClient.JoinChannel functions are being logged. But I want to circumvent those to have my own scene loading.

TNet 3 Support / Making TNManager more customizable
« on: April 30, 2016, 05:14:05 AM »

using TNet 3 I've now run into a bit of a problem. I will propbably start using other assets at one point, stuff like uFrame or the Entitas framework. The problem is that some methods in TNManager, especially JoinChannel are not really compatible with them. Methods like JoinChannel provide a lot of functionality, in this case loading a level. Other methods create a prefab. uFrame or Entities however handle these tasks differently. Sure I could just edit the TNManager class, but that would be a problem with future updates.

So, could you in future updates make TNManager more customizable? For example, by marking methods like JoinChannel as an override? Or make TNManager a partial class?

TNet 3 Support / DataNode serialization limitations
« on: April 26, 2016, 05:58:18 PM »
Sometimes here on the forum I read that TNet can serialize everything, but it seems I have run into a few limitations. I did only use text-mode though. Am I doing something wrong or is that TNet? Pseudo-code follows ...


When you add a child a la

  1. dn.AddChild ( "MyString", string.Empty )

the file creation on the server silently fails. Do

  1. dn.AddChild ( "MyString", "" )

and it works. Interestingly the log claims that the file was created, but it's just not there. I am not 100% sure of this though. Have to do more tests.


Dictionaries. This

  1. using System.Collections.Generic;
  3. public static struct MySaveStruct () {
  5. Dictionary<int,string> myCargo = new Dictionary<int,string>() {
  6. "Food" = 10 };

ends up as:

  1. Cargo = System.Collections.Generic.Dictionary`2[System.String,System.Int32]

Same thing for a Dictionary<int,int> which becomes

  1. Standings = System.Collections.Generic.Dictionary`2[System.Int32,System.Int32]

My guess is that you are not supposed to use Dicts? Instead add a lot of child nodes? Like, AddChild ( "Food", 10) ), AddChild ( "Industrial", 20 )? And then iterate through

  1. dn.GetChild<DataNode>("Cargo").children



TNet has problems with namespaces? The MySaveStructs works if the props are just ints and strings etc. But

  1. namespace MyNameSpace {
  3. public static struct MySaveStruct () {
  5. List<WeapStruct> weapons = new List<WeapStruct>();
  6. }
  8. public static struct WeapStruct () {
  10. string name = "MyWeapon";
  11. }
  12. }

will result in a hard failure and an entry in Debug/TNetErrors.txt:

  1. [2016/04/27 00:04:05] ERROR: Unable to resolve type 'MyNameSpace.WeapSave'
  2. (... Error Stack ...)

Again, same resolution as above?

Or just throw my complex struct of structs into the BinaryFormatter and send that to the server?

( bonus round )

System.Collections.Generic.List vs TNet.List caught be off guard. And you can't do

  1. BetterList.AddRange ( anotherList );


  1. BetterList<string> myBetterList = new BetterList<string> { "First", "Second" };

and the error talks about IEnumerator?
Is there something I am not seeing here? Design decision you regret now?

TNet 3 Support / Re: Mass-exporting prefabs as DataNodes
« on: April 26, 2016, 08:14:21 AM »
Hm, no that doesn't change anything. Importing my prefab as a text-based DataNode still errors out with:

Unknown prefix: 73 at position 1
TNet.Tools:LogError(String, String, Boolean) (at Assets/TNet/Common/TNTools.cs:1001)
TNet.Serialization:ReadObject(BinaryReader, Object, Int32, Type, Boolean) (at Assets/TNet/Common/TNSerializer.cs:2739)
TNet.Serialization:ReadObject(BinaryReader) (at Assets/TNet/Common/TNSerializer.cs:2375)
TNet.Serialization:ReadObject(BinaryReader) (at Assets/TNet/Common/TNSerializer.cs:2366)
TNet.DataNode:Read(Byte[], SaveType) (at Assets/TNet/Common/DataNode.cs:585)
TNet.DataNode:Read(Byte[]) (at Assets/TNet/Common/DataNode.cs:540)
TNet.DataNode:Read(String, Boolean) (at Assets/TNet/Common/DataNode.cs:509)
DataNodeWriter:Start() (at Assets/Scripts/DataNodeWriter.cs:52)

NullReferenceException: Object reference not set to an instance of an object
TNet.ComponentSerialization.Instantiate (TNet.DataNode data) (at Assets/TNet/Client/TNUnitySerializers.cs:1024)
DataNodeWriter.Start () (at Assets/Scripts/DataNodeWriter.cs:59)

When I import the same prefab as a binary DataNode I get the result shown in the screenshot above. In text mode TNUnityTools @ line 278 doesn't seem to fire, only in binary mode it does. I put a few Debug.Logs there for the class and the result is:

UnityEngine.MeshFilter, UnityEngine, Version=, Culture=neutral, PublicKeyToken=null
TNet.UnityTools:GetTypeEx(String) (at Assets/TNet/Client/TNUnityTools.cs:283)
TNet.ComponentSerialization:DeserializeComponents(GameObject, DataNode) (at Assets/TNet/Client/TNUnitySerializers.cs:1002)
TNet.ComponentSerialization:Deserialize(GameObject, DataNode, Boolean) (at Assets/TNet/Client/TNUnitySerializers.cs:943)
TNet.ComponentSerialization:Instantiate(DataNode) (at Assets/TNet/Client/TNUnitySerializers.cs:1063)
DataNodeWriter:Start() (at Assets/Scripts/DataNodeWriter.cs:60)

UnityEngine.MeshRenderer, UnityEngine, Version=, Culture=neutral, PublicKeyToken=null

UnityEngine.SphereCollider, UnityEngine, Version=, Culture=neutral, PublicKeyToken=null

... which is what I would expect. However in binary mode the prefab is instantiated, but the materials are not applied, even when both the material and the shader is in Resources. Putting only the shader file does not work btw, it has to be the material.

Do you want me to send you the files so you can take a look?

TNet 3 Support / Re: Mass-exporting prefabs as DataNodes
« on: April 25, 2016, 09:09:12 AM »
I emailed Unity QA about this via the Bug Reporter. They now came back to me:

You have to use AssemblyQualifiedName for GetType property.

instead of using
  1. var type = System.Type.GetType(typeof(UnityEngine.Rendering.ReflectionProbeUsage).ToString());
you have to use this:
  1. var type2 = System.Type.GetType(typeof(UnityEngine.Rendering.ReflectionProbeUsage).AssemblyQualifiedName);

Interesting... doing this:
  1. Debug.Log(typeof(UnityEngine.Rendering.ReflectionProbeUsage));
  1. UnityEngine.Rendering.ReflectionProbeUsage
Yet when I do this:
  1. var type = System.Type.GetType(typeof(UnityEngine.Rendering.ReflectionProbeUsage).ToString());
The result is "null". This must be some Unity glitch.

TNet 3 Support / Re: Mass-exporting prefabs as DataNodes
« on: April 23, 2016, 04:14:02 AM »
Ok I experimented a bit with this and ... c'mon why do I have to download this massive shader package and put it in Resources? Wouldn't it be better if TNet just detected if it's a built-in shader and then write the path entry accordingly?

Also it seems that the models I load from DataNotes don't get reconstructed correctly. Materials that don't include a texture (Standard shader with only a color setting) are just a dark grey color. I guess it sticks with the first detected material color. Looking at the model in the Inspector however shows that the settings are there. So I guess that's more a Unity issue than TNet.
The Sonic Bloom materials do get reconstructed but they don't glow.

Also note that importing a text format DataNode never works for me, only binary format does.

See the attached screenshot for an example. Left is the DataNode import, on the right the native Prefab. Notice how the Inspector complains about the mesh. So maybe that's a problem with my assets? Thing is I won't recreate my models, that would be insane. And if Unity can cope with it, so can TNet ;)

TNet 3 Support / Re: Mass-exporting prefabs as DataNodes
« on: April 13, 2016, 11:52:58 AM »
In order to be able to serialize materials, the material needs to not be a built-in resource. If you place the material in the Resources folder, a reference to it will be kept. If you don't, the material will be serialized fully.

I'm not sure I follow. My Assets/Resources folder is empty right now, except for the Sonic Ether Emissive shader. As it should, it gets referenced in an DataNode export:

  1. shader = "Sonic Ether/Emissive/Textured"

But I am also usign Unity-builtin standard shaders. I can't include those in the Resources folder. The Standard shader however gets exported/imported correctly, i.e. it is being reproduced. Builtin shaders relating to particles however are not.

DataNode won't serialize children if you are referencing a prefab located in the Resources somewhere, same as any other object. TNet keeps references, and only serializes objects it needs to.

The children on my test objects are prefabs, yes (for example blinking lights that a lot of ship models share), but they are not in the Resources folder. Why does that matter anyway, since Unity breaks prefab connections once you use prefabs as children of other prefabs? I.e., no "nested prefabs"?
Now there sure are scenarios where only exporting the top-level prefab makes sense. But as soon as your assets become more complex, for example for modding, you need more than that?

Maybe future versions of DataNode should have a "export dependencies" option?

TNet 3 Support / Re: Mass-exporting prefabs as DataNodes
« on: April 12, 2016, 05:19:46 PM »

Pages: [1] 2 3 ... 6