Obsttorte Posted August 27, 2013 Report Posted August 27, 2013 OK, I was able to finish the script. For it's usage, you need two things. The script (obiously ): ase_export_blend.py.txt This material file: blendtexture.mtr.txt The texture defined in the latter is textures/common/blend. It uses the caulk editor image as I didn't replaced that, but it does not behave like caulk. You only need it to apply the blending effect. It does not get exported and don't need to be shipped with your FMS that use those models. As explained earlier, blending textures consist out of two textures, where the first one is marked with VertexColor and the second one is marked with inverseVertexColor. It could be vice versa, too. But for reference let's assume it is like that. To apply the blending effect, you just need to texture the appropiate parts of the later model with your blending textures. Then create some brushes textured with the blend texture and place them in a way, that all vertices that should use the second texture are included in those brushes. Note that vertices are not neccessarely the same on patches as what you can select in DR. The amount of vertices a patch has, depends on the tesselation. Every corner point of a triangle is a vertex. Note also that the script takes the AABB, the axis-aligned bounding box into consideration for checking whether or not a vertex is inside those brushes. So don't rotate them. Once you are going to export your brushes/patches as a model, make sure that the blend-textured brushes are selected, too. I will post some examples in this thread so you can see how to use it. Enjoy! 3 Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
greebo Posted August 27, 2013 Report Posted August 27, 2013 I can package that in the next release if you think this is ready for it. Quote
Obsttorte Posted August 27, 2013 Author Report Posted August 27, 2013 Sounds great. I guess after some people used it and give some feedback we can decide upon that. (Who knows which bugs I missed) Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Obsttorte Posted August 27, 2013 Author Report Posted August 27, 2013 Some example videos: 1 Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
RPGista Posted August 27, 2013 Report Posted August 27, 2013 Thats freaking lovely, this guy is a genious! Did not quite get it how you picked the textures you blended together, but I love the results and the fact its all done one the go, inside DR. Amazing work. Quote
grayman Posted August 27, 2013 Report Posted August 27, 2013 Can't read any of the text in the videos; too blurry. So can't really tell what's going on. Perhaps a textual step-by-step would help. Quote
Obsttorte Posted August 27, 2013 Author Report Posted August 27, 2013 Yeah, the quality is not really good. Sorry. The blue texture is the shader that can be seen in game later, the pink one is common/blend. @RPGista: textures/blendtest { { blend diffusemap map textures/darkmod/plaster/plaster_01 VertexColor } { blend diffusemap map textures/darkmod/stone/brick/blocks_brown inverseVertexColor } } That's the shader for the room. No bump or specular as it's just for testing, though. All vertices inside the pink box use the scond texture, while the other ones use the first one. Between those the texture gets blended. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Obsttorte Posted August 27, 2013 Author Report Posted August 27, 2013 OK. Here comes a little step by step explanation of how to use the script. For an example I am going to create a pond. It should use a mud earth texture in the middle and a dry earth one on the borders. The textures I've choosen are:darkmod/nature/dirt/dry_dirt_01 darkmod/nature/dirt/dry_earth_muddy In DR the texture for common/blend looks like this: The first thing to do is writing the material file. It looks like this textures/mud_blend { qer_editorimage textures/blend/mud_blend surftype15 description "dirt vine_friendly" { blend diffusemap map textures/darkmod/nature/dirt/dry_dirt01 VertexColor } { blend diffusemap map textures/darkmod/nature/dirt/dry_earth_muddy inverseVertexColor } } textures/blend/mud_blend is this image: Now first I have to create my pond. I create a cylinder patch and invert it. Than I drag the upper vertices outside and the lower ones downside to create a nice little cone: Some more vertice movement and I have my pond shape (very roughly here, but it's just for explanation ): --- to be continued --- Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Obsttorte Posted August 27, 2013 Author Report Posted August 27, 2013 After that I project the mud_blend textore on the patch from above: Now I have to define which parts should use the second texture. For this purpose I use brushes textured with common/blend. After I'm done with that I can check if the tesselation of the patch is fine enough for my needs, then select everything and start the script: I've used the name pond here. After the script ran through, I reload the models and find my pond in the model browser: --- to be continued --- Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Obsttorte Posted August 27, 2013 Author Report Posted August 27, 2013 And this is how it looks in-game: Note that due to the very simple shader definition the textures look a bit odd here. If you take a look at the shaders of the two original textures, you can see that there is some more magic done with the images, and bump- and specular maps are added as well. This can be done here, too, of course. I hope this tutorial is understandable and that mappers will have a lot of fun using this tool to create good looking missions. If there are questions left, just ask. Please report any bugs or errors that may occour. Sincerly, your Obsttorte 1 Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Bikerdude Posted August 28, 2013 Report Posted August 28, 2013 And this is how it looks in-game, Sincerly, your Obsttorte Chocolate starfish! Quote
Bikerdude Posted September 24, 2013 Report Posted September 24, 2013 Some example videos:Once the the blend is done, is the mapper then free to flatten out the patches..? Quote
Obsttorte Posted September 25, 2013 Author Report Posted September 25, 2013 I don't understand the question. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Bikerdude Posted September 25, 2013 Report Posted September 25, 2013 I will have a go at replicating my question in DR and then come back here if I still need help. Quote
Lux Posted September 25, 2013 Report Posted September 25, 2013 Its exported as an .ase right? So changing it after importing it again isn't going to happen. It needs to be the way you want it prior to exporting. We can't edit models in DR as I understand it. Quote
Obsttorte Posted September 25, 2013 Author Report Posted September 25, 2013 That's correct. All you can do is to create skins. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Lux Posted September 25, 2013 Report Posted September 25, 2013 Thanks for clarifying, Obsttorte. Quote
STiFU Posted September 26, 2013 Report Posted September 26, 2013 Have you considered adding further blendmaterials like "blend 50%", "blend 33%", "blend 66%" etc. so that the vertex color assignment is not binary? Quote
Obsttorte Posted September 26, 2013 Author Report Posted September 26, 2013 I have thought about this, but currently I'm thinking it would make things only more complicated (at least for me, as I would have to implement it ). I'm still hoping that there may be a more intuitive way of doing this. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
STiFU Posted September 26, 2013 Report Posted September 26, 2013 Well, the most intuitive way would obviously be to write a plugin that allows for actual grayscale painting of vertices of ASE models. But that'd be a whole lot of work... ^^ I would have thought extending the script with further blend materials would boil down to basically a simple switch-statement: If (material == blend50) currentVertex.Color = .5; elseif (material == blend33) currentVertex.Color = .33; .... Ok, now that I think about it, you would also have to handle overlapping brushes with different blend textures etc. Ok, that's indeed getting more complicated... Quote
Obsttorte Posted September 26, 2013 Author Report Posted September 26, 2013 As this works best with patches, a simple way of creating a similar effect is to change the vertex positions. This also changes the tris and the way the texture gets blended. You can already do quite a lot with that. In addition, the ase files can be manipulated per hand afterwards. Not very intuitive but I guess this is basically for people who want to have it look perfect. The absolute end goal would be to add vertex coloring support to the game engine and alow to manipulate this via DR. But this is definetely a whole load of work. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Bikerdude Posted September 26, 2013 Report Posted September 26, 2013 Ok I have tried to follow this thread but Im egtting nowhere and the blurry vids were practically impossible to follow. @Obs, can you have a look at my test map and tell me where I am going wrong..? -skydrive Quote
New Horizon Posted September 26, 2013 Report Posted September 26, 2013 Indeed, how come the videos are only 360p max? Quote
Obsttorte Posted September 26, 2013 Author Report Posted September 26, 2013 I have a limited up-/download amount. That's why I've added a tutorial based on pictures I may upload a tutorial video next month. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Obsttorte Posted September 26, 2013 Author Report Posted September 26, 2013 @Bikerdude: Your materials folder is called matrials, which I guess is part of the problem. The script does not have to be shipped with the pk4, it is only used by DR to create the model. The latter must be shipped with the pk4. The script must be placed under scripts/commands/ in your DR install folder. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.