blueapples Posted September 25, 2017 Share Posted September 25, 2017 I am having a hard time finding a way to tweak the way that vegetation objects appear, specifically I am hoping to push them into the ground a bit to improve their appearance a bit. Right now roots are very visible on trees and rocks rest unnaturally on top of the terrain rather than appear partly into the terrain surface. Is there a way to do this that I'm missing? Ideally I'd like a method that can work on mld files. I know with fbx source files I can edit the models and this would probably solve my problem but I'm trying not to change my source models too much unless I'm rebuilding them. Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 6, 2017 Share Posted October 6, 2017 On 9/25/2017 at 4:19 AM, blueapples said: I am having a hard time finding a way to tweak the way that vegetation objects appear, specifically I am hoping to push them into the ground a bit to improve their appearance a bit. Right now roots are very visible on trees and rocks rest unnaturally on top of the terrain rather than appear partly into the terrain surface. Is there a way to do this that I'm missing? Ideally I'd like a method that can work on mld files. I know with fbx source files I can edit the models and this would probably solve my problem but I'm trying not to change my source models too much unless I'm rebuilding them. Any help is appreciated. Reset the model file itself so that the polygons are lower. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
blueapples Posted October 6, 2017 Author Share Posted October 6, 2017 Yeah I am aware of that as an option for custom assets prior to import, but as far as I can tell there isn't a way to do that for files that have already been imported or come from with the engine or an add-on pack, correct? It would be really nice if this were an option that could be tweaked in the vegetation settings for each item and a setting to have it randomly vary by some amount, it would really add a lot of visual variety without requiring more assets to be imported for each variation of depth a rock is pushed into the ground, for instance. 2 Quote Link to comment Share on other sites More sharing options...
Josh Posted October 7, 2017 Share Posted October 7, 2017 I'm thinking L5 will allow a Lua script to run like a plugin, so you will be able to do stuff like this: function RepositionVertices(model, offset) for n=0 to model:CountSurfaces()-1 local surf = model:GetSurface(n) for v=0 to surf:CountVertices()-1 local pos = surf:GetVertexPosition(v) pos = Transform:Point(pos,model,nil) pos = pos + offset pos = Transform:Point(model,pos,nil) surf:SetVertexPosition(v,pos) end end for n=0 to model:CountChildren()-1 RepositionVertices(model:GetChild(n),offset) end end if Editor.ModelEditor.model~=nil then RepositionVertices(Editor.ModelEditor.model, Vec3(0,-1,0)) Editor.ModelEditor:ChangeFile() Editor.ModelEditor:Render() end 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
blueapples Posted October 7, 2017 Author Share Posted October 7, 2017 That would be epic. I was wondering if there's a possibility for the same thing in C++ maybe? Like, load the project's custom code as a DLL into the editor and allow for extensions that could add really basic interface elements such as a custom sidebar panel, then create / manipulate world objects. I want to stick with Leadwerks and if I can develop my own systems by creating editor extensions in C++ that would go a long way towards making it an even more long lasting platform. Same thing is Lua would be a really great start though. Quote Link to comment Share on other sites More sharing options...
Josh Posted October 8, 2017 Share Posted October 8, 2017 15 hours ago, blueapples said: That would be epic. I was wondering if there's a possibility for the same thing in C++ maybe? Like, load the project's custom code as a DLL into the editor and allow for extensions that could add really basic interface elements such as a custom sidebar panel, then create / manipulate world objects. I want to stick with Leadwerks and if I can develop my own systems by creating editor extensions in C++ that would go a long way towards making it an even more long lasting platform. Same thing is Lua would be a really great start though. Hmmm, C++ plugins via a DLL might be possible. It would also be possible to call a DLL from a Lua script. I'm really looking forward to developing the Leadwerks 5 editor. It's going to be my masterpiece, with the community's help. 1 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
blueapples Posted October 9, 2017 Author Share Posted October 9, 2017 Main reason I'd be interested in C++ is for performance to do stuff like a new object streaming system I have in mind that would create and remove objects dynamically (picking up edits to objects and saving them out to a database before unloading them). Not sure if Lua as glue would cause too much of a delay, it might work, but would be ideal for it to be a native interface. Either way sounds very exciting, can't wait to get my hands on v5. Quote Link to comment Share on other sites More sharing options...
randomdude Posted October 16, 2017 Share Posted October 16, 2017 Sorry for hijacking this thread but if Josh says something like "new editor", I think I want to add something. Its just a recommendation. The good ol´hammer editor had this baby here. https://developer.valvesoftware.com/wiki/Hammer_Vertex_Tool At the moment, the shapes and operators are not enough to make any shape. for example roofs. The other benefit is, back in my days we had FPS problems as well, so to maintain a good performance we used triangles in combination with this tool. for example rockformations, uneven grounds etc. what kept perfomance high and allowed much more varieties. To come to an end, I just want to say, this tool is very useful and should be added. Quote Link to comment Share on other sites More sharing options...
randomdude Posted October 16, 2017 Share Posted October 16, 2017 And to the thread itself, any model has this root point. so you need to set this point higher. That is where the model is placed as far as I understand it. Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.