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 - andy.dys

Pages: 1 [2]
16
Fantastic thanks Jeremie for the prompt response and answers :),

Hopefully you can also answer whether it's a bug or unavoidable feature that modifying a substance at runtime in Unity causes the substance to reset to it's default state upon return to the editor and subsequently loses all custom texture/shader allocations.

Thanks again Andy

17
Hopefully someone can answer the most important parts of my initial question;

1/In Unity how do you force a substance to automatically assign outputs to shader texture slots other than diffuse and normal? How would you automatically assign to a specular slot for instance?

2/Do you gain any performance benefit setting source textures to relative to parent so that they scale with the graph rather than remaining absolute?

Also does upgrading to a commercial license provide better access to support/help?

18
Got a couple of issues, questions regarding substances in Unity 4.2, hopefully someone here can help.

The first one relates to the way substance texture outputs get assigned to the material texture slots when using a custom shader. I know this has been answered to some extent before, but I still get some unsatisfactory behaviour in 4.2. The project I'm working on is very substance intensive and I do a lot of real time modifications to substances, so my ideal scenario is to use the substance materials directly rather than having a separate custom material that inherits it’s textures from the substance. As I understand it, when you import a substance into Unity for the first time, it only generates the first textures labelled diffuse and normal (Presumably based on the order they were created?). Incidentally is there any reason why only these 2 textures are created and non-of the others are? Wouldn’t it be easier to have a system where you flag which textures should be generated and exposed on the substance designer end, rather than having a default ‘diffuse and normal output’ or a ‘check box that forces the generation of everything’, there appears to be no middle ground? Moving on, if you set the ‘generate all‘ checkbox and assign the output textures to their relevant shader slots within the substance everything now works in 4.2 i.e. the textures remain in their slots after you click off the substance. However if you run your game and try making real time changes to the substance upon exiting and returning to the editor the substance you tweaked decides to reset back to its default state losing all your custom texture assignments:(. Which really is quite frustrating, as you effectively have to re-assign your textures every time you want to run the game, is this a bug?
So with this in mind is there any way of getting a substance to automatically assign the generated textures to any other slots than diffuse and normal? There is very little/no documentation on this behaviour. So any light that can be shed would be extremely helpful. For example is it possible to automatically assign a texture to a specular slot? How does a substance interpret the shader and know where to put the output textures?

My other question relates to the way source textures within the substance are handled. Say for instance you have a 2048 source texture in your substance and you set its inheritance to ‘relative to parent’ rather than ‘Absolute’ (I’ve found that according to the performance info in substance designer, substances generate more quickly at lower resolutions with ‘relative to parent’, presumably because it’s not having to downsize a 2048 every time you make an adjustment such as with ‘absolute’?). However the main problem I’ve found with setting textures to ‘relative to parent’ is when the parent output size is set to 0x0, substance designer exports your sbsar file with all the source textures at 256x256. Which in turn in Unity defaults at 512x512 but all the source textures have been downsized to 256x256 and the detail has been permanently lost (BTW this is really confusing as to why the defaults sizes are different between various applications, any reason why this is the case?).
To work around this issue and to try and claim the apparent performance benefit of using ‘relative to parent’ I have exported my substance at 3x3 instead of 0x0. However when this is imported into Unity the default 512x512 become 4096x4096. I appreciate these are really arbitrary numbers and changing the interface size makes no real difference to the final output. It just seems annoying that I can’t export a file from substance designer and have it interpreted by Unity such that they are equal 1 to 1.
I guess the most important question here is, is the performance info in substance designer accurate in the case of having 2048 source textures and using ‘relative to parent’ to ensure that they automatically scale appropriately with the rest of the graph? Or should I just stick with 'absolute' for source textures?

Sorry for the long questions, appreciate this might take a while to answer. Happy to try and clarify any of the above should it not make sense :).

Thanks and love your work.

Pages: 1 [2]