A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by jbooth, Sep 14, 2018.
Does the texture have an alpha channel? Do you mind sending me the assets?
Yes it does and no I don't. But it won't help as I'm not able to reproduce it on clean project either. OB files copied from main project to clean project work fine, but those from clean project copied to main project work even worse (mesh data works the same, just material switching causes all object to be black).
Ok, I found something. I think it's this material refresh bug again. After closing and re-opening clean project, cutout is bugged (looks like opaque). Upon selecting the object in scene, it returns to normal. The only problem is, in the main project it does not get fixed.
I take it back, refreshing does work, but - here comes a good one - you have to have "selection outline" gizmo checked.
So cutout is somehow working. The only "problem" is no "cutout amount" value/slider.
I thought that was in the individual material properties? If not, I'll have to add it.
Hi, I just bought your asset and I love it. I wanted to know two things:
1 - could it be possible to add another uv layer (uv3 maybe) to the mesh with the plugin? I would like to adapt a multi-layer shader created in Amplify Shader, but I would need another index
2- could it be possible to have the mesh instantiated in the editor - not at runtime - without modifying the original mesh or creating a new asset in the project folder? I have used other plugins, like MeshCombine, that leave the choice to the user between asset instance creation and prefab/asset-in-project-folder creation. That could be useful to see the changes building the level, with a slider on a script attached to the mesh renderer gameObject. The script should create a copy with different vertices values, I suppose, without necessarily saving it.
If your mesh has uv3's, it will copy them over when it creates the new meshes, so that should work just fine.
I have no plans for runtime generation, mainly because packing the textures takes quite a bit of time.
And if my mesh has no UV3, can a function like Mesh.SetUV be used to create a new channel?
Yes.. It's still a standard mesh..
Can I ask you if you can add a button somewhere to add other channels to the mesh? I know that Mesh.SetUV exists, but that's all I know about mesh modification inside Unity via code
Sorry to bother you on this subject but I really don't know how to do it
No, turning One Batch into a UV editor doesn't really make sense. If you want a new UV channel, you should add whatever UV data you want in your 3d modeling program to your original mesh, which has a UV editor.
Also, judging from your last message, you seem to be confusing UV data on a mesh with vertex to fragment interpolators in a shader.
Is it possible to provide LTS compatibility for this asset?
Sorry! Unity LTS (Long Term Support) a.k.a. 2017.4.
I have a couple of quick questions in regards to One Batch and best practices for setting up a scene.
I was wondering about asset pack collections from the asset store (or wherever) that already have been committed to a texture atlas. What I mean is a scenario where we get an asset pack from the asset store (or wherever) and it has a lot of prefabs (models) and the entire collection is already dumped to a texture atlas. Then we use only a couple of prefabs and remove the rest, but the entire texture atlas is still there. Then for the few we kept, we run the specific prefabs through One Batch. I assume One Batch will have to grab the entire atlas, or will it grab only the textures needed?
Is there a way to "unpack" these type of assets (that are already committed to a texture atlas), with the goal that our project only has the needed textures?
This does look really cool indeed. Really clever approach to atlasing's main problem, which in my opinion is tiling.
Can you clarify what data you're adding to the meshes (I kinda missed that part in your video) ? I'm guessing material index to sample the right textures... What channel are you using for that ?
I'm considering using your system but I have some procedural geometry in some parts of my game, so I just wanna see if I need to plan for adding one batch compliant data when I create my meshes. (And BTW, is source code included so that I can have a look if needed to help understand what to do with my procedural meshes ?)
Did you ever get it working correctly for specular/smooth materials?
Yes, source is included. the data is stored in texcoord0.zw components.
The specular workflow? Yes- it works in my test cases. But if you have a particular case of data that does not work feel free to send it over.
Just tested the latest and sorry, you are right that the specular workflow works well!
Also, just sent you a project with a "IndexOutOfRangeException: Array index is out of range." edge case when using some models with LODs. Thanks
OK, I will "send you over a particular case of data" as apparently you can't even test your own asset. Or no, even better, I will use your "particular case of data".
Open your demo scene. Select a stone material. Delete all maps but diffuse and normal. Change shader to standard specular. Use stone_ao as specular map. Now create new OB config, drag and drop stone sphere. Extract, combine.
Compere before and after look.
Also try changing "specular color" in OB. Hint: it doesn't work even if per-pixel map is not provided.
Now tell me again that specular is working.
@jbooth this will be a massive workflow time saver, thanks so much
Now that you have provided ACTUAL repro steps I can test this. When you say specular is not working, that can have like 5 meanings. Specular values, specular textures, specular response in a metallic workflow, etc. that is why ACTUAL repro steps are important instead of just screaming “something doesn’t work”
It also doesn't help that the last submitted version of one batch is apparently still stuck in review since I submitted it a month ago. I submitted a new version, so hopefully that will unstick it..
Sorry to butt in but book of the dead assets are engineered for the HDRP pipeline which isn't the same setup as standard shader, just a heads up as as I wander along the forum (you'd need to swizzle your textures a bit).
One Batch is a great product and the support from Jason is incredible. Unfortunately, people like you "Dr. Internet" try to pollute the community, but hopefully, you will either fizzle out or change your attitude, while the rest of us move forward and create cool apps and games.
Hi, I noticed that there's a repetition in the script OneBatchConfigEditor_UI, at line 152. The "ma.metalStrength" was already set up at line 149, and the repeated one used the normal strength value, messing things up when moving the normal value slider.
I also tried to use the vanilla Amplify Shader example in the provided demo scene, and that was the result:
I just used the already created Albedo and Normal texture arrays. Is it possible that the OneBatch Texture Index function does not work as intended? Or do I have, with my already proved ignorance, to do something more to make things work?
Ah, nice catch. Yes, the indexing function is wrong; I just fixed it for the next patch, but it's easy to fix if you don't want to wait. Open up Examples/AmplifyShaderEditor/AmplifyFunctions/OneBatchTextureIndex and drag the output of the VertexColor A channel to the multiply node (it is incorrectly mapped from the B channel).
I just modified the multiplied channel, from B to A, in the vertex color window and I couln't see any change in my scene view. Here's the result:
Other ideas? I don't know how to help.
OneBatch worked as a charm with the included standard shaders anyway
I'll check it out after work- that was noticeably wrong, but there might be something else going on..
Any news about custom shader support? I really need that
Fixed. I'll pm you the files until the patch comes out..
I've just fallen in love... I will try it in the next hours, thanks
Apart from requiring textures to be the same size, what limitations should we be aware of if using One Batch? The benefits are clear, but are there down-sides to be mindful of?
Well, all textures will be scaled to be the same size. Right now, big limitation is that it's tied to the standard shader. Also keep in mind that it's not a cure all- many other things may break static batching in Unity as well as multiple materials.
@jbooth Sooo how I understand it not support lightweight yet?
Hi, I got this error trying to combine a list of prefab (and that's not my first use of OneBatch):
Any idea where did it come from?
Most likely some error case I'm not testing against - like a Mesh Renderer which has no material, or a Mesh Filter with no mesh assigned.
I already checked for those, with an automated script that removed every gameobject with a missing mesh filter and or material, before creating the prefabs. If I split the prefabs between two differents OneBatch config files, the error doesn't occur anymore. It looks like I've reached some kind of "not visible" internal limit
Not sure why, but removing a single, specific, prefab (that I already checked and that has no missing mesh asset under the mesh filter neither missing materials) from the config list solved the problem. I will investigate more
InvalidCastException: Cannot cast from source type to destination type.
JBooth.OneBatch.OneBatchConfigEditor.AlbedoHasAlpha (JBooth.OneBatch.OneBatchConfig cfg) (at Assets/OneBatch/Editor/OneBatchConfigEditor.cs:72)
JBooth.OneBatch.OneBatchConfigEditor.CompileConfig (JBooth.OneBatch.OneBatchConfig cfg, System.Collections.Generic.List`1 src, System.String ext, Boolean texturesOnly) (at Assets/OneBatch/Editor/OneBatchConfigEditor_Compiler.cs:432)
JBooth.OneBatch.OneBatchConfigEditor.CompileConfig (JBooth.OneBatch.OneBatchConfig cfg) (at Assets/OneBatch/Editor/OneBatchConfigEditor_Compiler.cs:955)
JBooth.OneBatch.OneBatchConfigEditor.DelayedCompileConfig () (at Assets/OneBatch/Editor/OneBatchConfigEditor_Compiler.cs:299)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)
@jbooth Wow. Thank you very much for the insightful detailed rendering-Explanation part at the end of the manual. You explain very! well. All I have as background in CG is a base-course in Computergraphics and Animation at University and some self-education. I study Computer Science. Am doing Unity-Related things as mainly in my free-time since 4 years. Have you ever thought of writing a small book / guide / Tips n Tricks / Overview & Explanation-"thing" for how this stuff in Unity works together ? If you sold a book with sharing these kind of useful insights into your knowledge, Ill be happy to throw money to you and instantly buy it , and I am sure I am not the only one PS: I am very happy with onebatch of course.
No- worked on some chapters in a book once (DX9 Audio Exposed), and it's an incredible amount of work with little chance of significant profit. So while I'm glad I did it, I have no desire to do it again. I do teach or lecture at schools and conferences sometimes, which is pretty similar on the work to profit ratio, but I find it a lot more enjoyable and much more bit sized.
@jbooth Hmm, yes I understand. Well, as a follow up, did you maybe think about a udemy-course ? thex can vary in length and, while there is a plethora of "how to make games in unity ( fast ) ", there is quite no such thing with regards to your knowledge. I think this is a hole you could potentially utilize as additional income. I already enjoyed every of your youtube videos, you explain really well! ( i will buy the microsplat-combo-package now ). I am saying this just because I think that your knowledge would really benefit to a lot of those many indies with scattered & varying degrees of knowledge. And I think making a video-course with a range of 1-4 hours maybe would be a assemblance of bit-sized work and less stressful than a book. ( I understand that selling specific technical books is probably not very rewarding these days ). I my own own quite a lot of udemy courses, not all are worth the money, but that is the same with assets. Therefore some really shine ( and also have quite some customers ). I am just saying and trying to encourage you a bit. Maybe just think about it Best regards, David.
I bought the asset.
Following the documentation, I created a new project.
I have opened example / scene
And this is what appears to me:
What Unity version? Are you running an SRP? Can you try in a new project?
- Unity Version - Unity 2018.3.13f1
- Running an SRP - No.
- Try in a new project - Yes.... but same problem.
Attach more images with more data. For your consideration.
I noticed that the Amplify Shader Function "OneBatchData" does not work. It always uses the first material data and not the next ones, like it's using the same 0 index.
You can see that using your "Amplify Shader" shader example with the already OneBatched scene: if you change the Tint color for the first entry, in the config file, to green it will turn the entire scene to green and not only the "Brick" materials of that entry.
I'm using Unity 2019.1 anyway
It looks like the Property Texture in your material is missing. The first entry is empty and it should not be like that
Well, I do not know, honestly.
It is the scene of the example, as is. Without changing anything.
I wonder if it got unhooked in the Unity version upgrade?