Member deadalvs Posted July 18, 2013 Member Report Share Posted July 18, 2013 (edited) Hi, I'm interested in the angelScript functionalities. Is it possible to automattedly import geometries, e.g. tons of cubes and use them to add / remove voxels from a model ? e.g. start with adding a series of cubes for a building facade, then cut out the windows, .. reason I ask is because I'm interested in combining voxels with standard procedural modeling techniques. ( not Houdini .. ) let me know. matt Edited July 18, 2013 by deadalvs Quote Link to comment Share on other sites More sharing options...
Reputable Contributor AbnRanger Posted July 19, 2013 Reputable Contributor Report Share Posted July 19, 2013 Hi, I'm interested in the angelScript functionalities. Is it possible to automattedly import geometries, e.g. tons of cubes and use them to add / remove voxels from a model ? e.g. start with adding a series of cubes for a building facade, then cut out the windows, .. reason I ask is because I'm interested in combining voxels with standard procedural modeling techniques. ( not Houdini .. ) let me know. matt I would try to ask Andrew directly, to get a detailed response (support@3d-coat.com). Sounds like a cool idea Quote Link to comment Share on other sites More sharing options...
Andrew Shpagin Posted July 20, 2013 Report Share Posted July 20, 2013 Yes, you may do it.Angelscript allows you to do actions instead of UI.First, write function that places and merges cube.Use commandsbool cmd(string &in ID);to press buttons (see scripting manual)bool SetEditBoxValue(string &in ID,float val);fo fill floatin fields.After merging of 1 object do Step(1) command.In so way you may merge objects. If you will not be able to get to success, I will help more, just drop me mail. 1 Quote Link to comment Share on other sites More sharing options...
Member Creator Posted July 29, 2013 Member Report Share Posted July 29, 2013 Hey,But how to scale when there is no Edit Box in UI?For example i get Select Tool in Retopo Room: cmd("$[Page2]Select");/*Select*/Next Transform:cmd("$[Page2]Transform");/*Transform*/Now i have got UI for Transform tool, and i want to scale selection to 0, but only option is to click Scale buttons, and i dont know how to set value:cmd("$CubPrimClose::ScaleY");/*Scale Y*/ It would be awesome to have some log window with last command used, like in maya. It will help to learn scripting Quote Link to comment Share on other sites More sharing options...
Andrew Shpagin Posted July 30, 2013 Report Share Posted July 30, 2013 Yes, now it is impossible to input text via script now. In next build I will introdice commands void SubstituteInputText(string& val);void SubstituteInputText1(float val); so that script will look like void main(){ SubstituteInputText(200.0); cmd("$CubPrim::ScaleY"); Step(1); } 1 Quote Link to comment Share on other sites More sharing options...
Member Creator Posted July 30, 2013 Member Report Share Posted July 30, 2013 Ok, Thanks !! Quote Link to comment Share on other sites More sharing options...
Andrew Shpagin Posted July 31, 2013 Report Share Posted July 31, 2013 From updated manual: void SubstituteInputText(const cstring& val); void SubstituteInputText(float val); Substitute string or value to the next input text dialog. You need this command if there is button that triggers input dialog to enter some text or value. Example - transform tool, ScaleY button. Code to scane object twice along Y axis: SubstituteInputText(200.0); cmd("$CubPrim::ScaleY"); Step(1); Quote Link to comment Share on other sites More sharing options...
Andrew Shpagin Posted July 31, 2013 Report Share Posted July 31, 2013 As soon as Vector3D and Matrix3D classes will be introduced in script, I will insert a lot of low-level meshing commands. 1 Quote Link to comment Share on other sites More sharing options...
Member Creator Posted July 31, 2013 Member Report Share Posted July 31, 2013 As soon as Vector3D and Matrix3D classes will be introduced in script, I will insert a lot of low-level meshing commands. Great! Next question is if there is an option to run angelscript function, after hitting button from loaded xml UI? To be clear: (For Example) I open xml UI from angelscript and after clicking a button, some function from angelscript is running. I know i can run for ex. vox() merge() (etc.) from xml UI, but running own created functions/procedures would be awesome. Documentation for xml UIs would be useful. Now i'm learning how to build them, by analyzing existing xmls, so i can only recreate existing scheme. Of course there are more important topics, like brush improvements etc. but if you'll found spare time , some scripting improvements would be welcomed Quote Link to comment Share on other sites More sharing options...
Member deadalvs Posted January 18, 2015 Author Member Report Share Posted January 18, 2015 Hi Andrew. It's been some time, but I would like to get back to this. I finally updated to version 4. Would it be possible to post the complete code to do the following steps automatted to I can just run it? I would like to get a starting point since I only have experience in MEL and Python, nothing really C++ alike. You also said in the posts above that some functionality was added, so I don't know the best approach anyway.. What I would like to do is the following: I have 2 objs, one is voxels to be added, one is to be subtracted. [1) create a new empty scene] 2) Define the two file paths as strings 3) Rename the default voxel layer and set it's resolution to e.g. '8x' 4) Load obj 1 and add the voxels to the layer 5) Load obj 2 and subtract the voxels from the layer (maybe this needs to be done with a second layer?) 6) Remove enclosed holes 7) Convert the voxels to a surface Add a procedural surface noise (if possible) 9) export the surface to an obj file with a specific name 10) create a new empty scene Please let me know.. Thanks! Matt 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.