Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 03/29/2023 in Posts

  1. This script can be used to easily place fences/power lines on a map using a spline. It consists of a basic spline placement script and a modified easyFence script (by modelleicher) combined with some extra enhancements. The script works by first placing posts/poles aligned to the terrain along a spline, it then places fence boards/wires on these posts/poles scaling them to match the distance to the next post/pole. To install download the script (available at the end of this tutorial) unzip the fencePowerPlacement.zip and Copy/Paste the script into C:\Users\Your Computer Name\AppData\Local\GIANTS Editor 64bit 9.0.4\scripts. Once installed, to initiate the script select the Fence Power Placement script in the GE Scripts tab. A panel will pop up somewhere on the screen. The image below shows the Panel, together with a brief description of the Inputs/Parameters Points to Note before using this script. All posts/poles/wires/boards Must be scaled at 0,0,0 before use in the script Items to be placed Must be aligned along their ‘Z’ axis with the point of origin at one end. Number of Wire/Board alignment nodes Must be the same on all posts/poles used and in the same order top to bottom otherwise you will have crossovers between the posts. The post/pole transform group hierarchy must always start with the post mesh followed by the wire/board alignment nodes it can then be followed by any other meshes although I think best practice would be to have a single mesh for the pole/post including all the parts. The following image shows the transform group hierarchy and the telegraphPost placed using the script Above Telegraph pole taken from the FS19_telegraph pole kit by Robbie available on modhub Placing a Simple Fence Simple post, fence board creation For this example I will create a simple post/board using the Create- Primitive - Cube in GE The finished fence will consist of square posts and three fence boards If you already have a suitably aligned post and fence board then skip the next section, import post and fence wire/board into GE and go to Adding the alignment nodes to a post. section. If not continue with the following, In GE Create - Primitive - cube In the attributes panel Translate 'Y' enter 0.5 also rename this post_1 Select Edit - Freeze Transformations and select Translate - this will move the cubes point of origin to the base of the cube In the attributes panel enter the following into the Scale transforms 'X' 0.15 , ‘Y’ 1.5, 'Z' 0.15 and Freeze transformation Scale (only Scale ensure all others boxes are deselected) In the material panel in Albedo Colour enter 0.4, 0.2, 0.2 this will give a brownish colour to the post Create a second cube In the attributes panel Translate 'Z' enter 0.5 and rename this to board_1. Select Edit - Freeze Transformations and select Translate - this will move the cubes point of origin to edge of the cube In the attributes panel enter the following into the Scale transforms Scale 'X' 0.1, 'Y 0.2 'Z' 4 and Freeze Transformation Scale (only Scale ensure all others boxes are deselected) Because this second cube still uses the material name ‘Unnamed material’ it will be the same colour as the post. Create a new transform group and name this fencePowerItems Select post_1 with the middle mouse button and keeping the middle mouse button pressed move post_1 into the fencePowerItems transform group, do the same with board_1. The reason for this is to keep the transforms all set to 0,0,0, which will prevent any unseen conflicts with translation positions. With the fencePowerItems transform selected on the keyboard select Ctrl B to place it in your current view port for reference. Adding the alignment nodes to a post. Create a new transform group –Create – Transform Group Select the new transform group with the middle mouse button and keeping the middle mouse button pressed move the new transform group into the post_1 transform. If you do not have a middle mouse button then cut/paste the new transform into the post transform. Next move the new transform up to where you want the lowest board to be With the new transform selected on the keyboard select Ctrl D to duplicate then move this second transform to the centre board position, repeat this step for the third transform placing it where the top board will be. Your post_1 alignment transforms should look like the post in the alignment image above. Your post transform should look like the following image Open your map in GE Create a spline – Create- Spline rename to spline_1 and align it along the route you want to place your fence. Select Scripts – Fence Power placement to initiate the script. In the Scenegraph a new transform group ‘fence_powerObjects’ will have been created consisting of three transform groups wire_fenceNode – place the fence board(s), wire(s) in this transform group fencePlacement Transform Group postObject – place your post(s)/ pole(s) in this group placedObjects – your complete fence/power line will be placed in this group when the script has been executed (select Create Fence/Power Line) The spline has to be placed in the fencePlacement Transform Group For those familiar with the original Spline Placement script this fencePlacement Transform Group works in the same way as the Spline Placement script. I have renamed the post_1 and board_1 meshes to post1S1,board_1S1 (S1 being spline_1) respectively. Unfortunately GE will scale all objects of the same name throughout the map so I have done this so that I can easily freeze the scale transformations on the completed fence/power line without affecting any other mesh in the map. Copy/Paste board_1 into the wire_fenceNode transform (rename if you want to). Copy/Paste post_1 into the postObject transform. (rename if you want to). Cut/Paste the spline into the fencePlacement transform Set Post Distance – 4 – posts will be set 4m apart Stay Upright – Selected – this will ensure the posts remain upright regardless of terrain contour Select Random Spline Order – Deselected – this will be used in a later section of the tutorial Select Random Wire/Board Placement – Deselected -- this will be used in a later section of the tutorial No of Wire/Board Nodes – 3 – this is the number of transform nodes on the post Maximum Posts – 0 – Default setting means all post will be used Start Post – 0 – default setting script will start at first post Remove Current Fence/Power Placement – Deselected With the fencePlacement transform Selected, Select the Create Fence/ Power Line button The fencePlacement transform must be selected for the script to run. In following image ‘Image 1’ shows the renamed post_1 and board_1 in their correct transform groups together with the spline in its correct position and the Fence/Power Placement Panel ready for input. Image 2 shows the Fence/Power Placement Panel with all the relevant data entered and the script executed by selecting Create Fence/ Power Line button Image 3 shows another view of the placed fence and the two other insets shoe the difference between Selecting/Deselecting the Stay Upright parameter You can check out the difference between the Stay Upright modes by, Remove Current Fence/Power Placement –Select – this will delete the current fence placement Stay Upright – Deselected Remove Current Fence/Power Placement –Deselect – Important step otherwise new placement will not take place Select -- Create Fence/ Power Line button – this will create the same fence placement but with the posts following the terrain contour To return to the original placement, Remove Current Fence/Power Placement –Select Stay Upright – Selected Remove Current Fence/Power Placement –Deselect – Important step otherwise new placement will not take place Select -- Create Fence/ Power Line button The Remove Current Fence/Power Placement selection can be used to delete an existing placement and add/change any parameter then execute the script with the new settings. For wire placement the alignment method is slightly different in that the transform nodes are placed on the outside of the post on the ‘X’ face. Although normally a fence post created for wire would already have the staples (the staples would have to be on the ‘X’ face of the post) as an integral part of the post mesh. Random Post/Board Placement For this example I have created a shiny round post by, Create – Primitive – Cylinder Rename – post_2 Translate ‘Y’ – 0.5 Freeze Transform Translate Scale X 0.2, Y 2, Z 0.2 Freeze Transform Scale Albedo Color 0.8,0.8,0.8, Smoothness 1 Metalness 1 Cut Paste into fencePowerItems Transform For the boards I have just duplicated board_1 twice renamed board _2, board _3 respectively and scaled X,Y values (not Z as this is the distance between posts) then Freeze Transformed scale on the new boards Ctrl B the new fencePower Items to your map location The alignment nodes on the post are set up the same way as for the post_1 (must be the same number) Copy/Paste board_2,3 into wire_fenceNodes Copy/Paste post_2 – into the postObject transform Using the same spline the script set up is as follows Set Post Distance – 4 – posts will be set 4m apart Stay Upright – Selected Select Random Spline Order –Selected Select Random Wire/Board Placement – Selected No of Wire/Board Nodes – 3 – this is the number of transform nodes on the post Maximum Posts – 0 – Default setting means all post will be used Start Post – 0 – default setting script will start at first post Remove Current Fence/Power Placement – Deselected With the fencePlacement transform Selected, Select the Create Fence/ Power Line button The image below shows the Script parameters and random placement of both the posts and boards If you want to create some missing fence boards add another empty transform group to the wire_FenceNode transform group. The odd posts are deliberate to highlight the effect of the random spline placement Power Lines I will be using some premade power pole and wires for this example An example of a power pole with multiple objects is shown in the Points to Note before using this script section at the beginning of this tutorial The alignment node set up method is slightly different for the power poles. Create a transform group and Select the new transform group with the middle mouse button and keeping the middle mouse button pressed move the new transform group into the powerPole transform group. With the new transform node selected, hover the mouse over the insulator you want to hold one of the wires, then Ctrl B left click twice to place it on the insulator Do the same for all the other insulators Image below shows the placement of Power Lines together with the relevant script settings, inset gives a clearer picture of the placement Below Power Placement using the Select Random Wire/Board Placement with an extra saggy wire (wireSag2) randomly placed again inset shows clearer placement Finally using the script twice to place power Lines and a damaged barbed wire fence Further Notes Wire_FenceNode objects must be single meshes and not part of any transform group. There is no limit on the no of items that can be placed in either the wire_FenceNode or the postObject node the only stipulation on extra posts is that they must all have the same number of alignment nodes. Post/poles must also be single meshes and not part of any transform group. The alignment nodes on any post/pole must be the first children of that mesh, however other meshes can be placed after the alignment nodes for example Though currently if using a tree it will only be placed in one rotation and LOD1 is not supported. You can of course manually place a tree in place of a post by first selecting the post in the viewport and then in the scenegraph copy the three transform nodes of that post. Using the replace function select the post as the Target and the tree in the Replace With section and select Replace, align the tree with the end of the previous posts wires and with the tree transform group selected paste the original 3 transform copied previously into it The following image shows the result of this method Error Messages Error messages will appear in the console log if, Nothing is in the wire_FenceNode transform group Nothing is in the postObjects transform group Incorrect number of transform alignment nodes on a postObject item error message and name object will be printed in the log Spline is in the wrong transform group or not present in the fencePlacement transform Group When the script has finished the following will be printed in the log Finished! Enjoy the fence 🙂 Spline Name: (name of spline) As normal I suggest you try this script out on a test map before using on any WIP map also this script is still being developed so may change at a later date. Original Easy Fence script available here select all and paste into new notepad++ file and save as easyFence.lua. https://pastebin.com/1DR6qDcE Damaged barbed wire/poles taken from FS 19 Barbed wire fence kit by Robbie https://www.farming-simulator.com/mod.php?mod_id=105801 Fence_Power_Placement.zip
    3 points
  2. Create Duplicate Offset Splines This is an updated version of an original script by TracMax all I have done is added a simple panel UI and allowed the creation of a new folder (parallelSplines) in the same place as the map.i3d for the newly created i3d and txt files. As always copyright remains with the originator. One use of the script is when creating roads/lanes etc as it creates a new spline at the chosen distance parallel to the original so making it easy to add fences/power lines etc aligned to the roadway/lane and also for traffic/pedestrian splines To install Download the Parallel Splines Panel.zip (available at the end of the tutorial) unzip and copy/paste into the following directory. C:/Users/******/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts Replacing * with your computer name. Using the script Select -Script -Parallel Spline Panel in GE --Scripts in the pop up select the spline, enter desired offset and select Create Offset Spline, a new folder will be created in the same place as the map.i3d called parallelSplines and the newly created spline .i3d will appear in this folder along with a data.txt file for that spline, data.txt file suitable for importing into Blender with the correct alignment using the addOn available here, https://farmerboysmodding.com/index.php?/topic/2438-blender-plugin-300-and-above-for-splinecsv-data/ The spline name will include the following:- name of spline (in scenegraph) offset value parallel.i3d e.g. spline02_-10_parallel.i3d A message will also be printed in the console log showing the two files have been created in the parallelSplines folder. New Spline .i3d and .txt files: spline_20_parallel.i3d and spline_20_parallelData.txt created in /parallelSpline Folder The full file path to the new spline.i3d will also be printed in the log. Then simply import the required spline into GE in the normal manner and use as required. Although the spline can be used in conjunction with an existing splineObjects transform group I suggest creating a new splineObjects transform group (Select – Scripts - Spline Placement Combined Panel) otherwise if deleting placedObjects you could delete all previous object placement. The following image shows the operation and the resultant new files in the folder. ParallelSplinePanel.zip
    2 points
  3. This plugin is for Blender version 3.0.0 and above. It allows the SplineCSV data created in the Spline CSV Creator script to be directly imported into Blender instead of having to use an earlier version of Blender and exporting/importing as an obj. Installation Download the spline_csv_importer.zip file at the bottom of this topic. Open Blender (3.0.0 and above) Select –Edit—Preferences –Install and in the file browser navigate to where you saved the spline_csv_importer.zip file, Select and Install the Add-on. Once installed Activate it by selecting the check box (a single Left click usually brings up the Activation and Information panel) The Add-on can also be found in the Blender Preferences panel under Import-Export: Spline CSV Importer. To use the spline_csv_importer add on; Select File –Import – Import_Spline Data (*txt) A file Browser Panel will pop up, (an undocumented operator panel appear but this can be ignored it just means I haven’t documented it with Blender), Navigate to where your CSVdata folder has been created in your map root directory, double click to open the folder and select the required spline_Csvdata.txt file and select Import CSV . on the file browser. The spline_CSVdata will have been placed in a separate Collection named SplineCSV , retaining the original name,converted to an edge mesh and placed at the same location the spline in your map was, see image below for reference. All subsequent spline_CSVdata when added will be placed in this new Collection. Note: This Add-on will only create an single edge mesh (no other type of mesh) from a txt file created in the same format as the spline_CSVdata.txt file (i.e. no header), coordinates in the spline_CSVdata.tx have already been converted to the Blender format in the CSV Creator script and can be exported as an i3d or Nurbs curves (spline)directly back into Giants Editor. This new method will be placed in the relevant tutorial (along with a second copy of the spline_csv_importer.zip) https://farmerboysmodding.com/index.php?/topic/2413-export-a-spline-from-giants-editor-into-blender-to-create-roadsrailways-updated/ replacing the old method spline_csv_importer.zip
    2 points
  4. I had no problems with laying crves before, all I am saying is that creating a spline layout just got more confusing, before it was just a case of selecting either end point ('S' or 'E') selecting Insert and Ctrl B to place the cv on the terrain at the point of your cursor, simple, now you have to be careful which end you start with otherwise you end up going backwards. One sorely needed function in the editor is to allow export of the spline as a nurbs curve (for use in 3d modelling software), something that has been asked for many times over the years along with updated instructions and tutorials.
    2 points
  5. Unfortunately there is no way to turn off the road labels but you can reduce the size of the font by Tools --Options --3D Font and selecting the smallest size and Apply. I will add a rider to the main tutorial regarding the new method for later versions of Blender.
    1 point
  6. Did you follow the new tutorial for Blender 2.93 and above on page three of this topic.
    1 point
  7. Create Field Dimensions and Farmlands Tutorial This tutorial will endeavour to show you how to create field dimensions, paint the farmland area (InfoLayer_farmlands.grle) and automatically add the relevant farmland entries in the farmland.xml together with painting your chosen Ground Type (i.e Plowed,Cultivated etc) and painting foliage at a chosen growing state on the chosen field using custom scripts. For clarity the abbreviation TG will be used to denote a Transform Group throughout this tutorial. I would like to thank Modelleicher for allowing me to use and giving permission to slightly modify the following scripts in this tutorial in order to add some extra functions. Create Field Dimension Panel Creates field dimensions from markers Paint_Farmland_Field_ID_Panel Paints the InfoLayer farmlands.grle and adds relevant data to the farmlands.xml. Paint Field Ground Foliage Panel Paints the chosen Ground Type (i.e.Plowed,Cultivated etc) and Foliage at a chosen state (i.e. wheat, harvest ready). All scripts are available in the Field Dimensions and Farmlands zip file available at the end of the tutorial. Also have a look at the following youTube videos by Modelleicher on the creation of the original scripts and for a master class on script creation. https://www.youtube.com/watch?v=jLL7x064mJc --Field Dimensions https://www.youtube.com/watch?v=QhCOBkOxjPE –Paint Farmlands https://www.youtube.com/watch?v=dxnZI8C02NY --Farmlands.xml Create Field Dimensions, Create Farmlands and Paint Ground and Foliage on the field The three scripts used for this are the Create Field Dimension Panel, Create Farmlands Panel and the Paint Field Ground Foliage Panel. The Paint Field Ground Foliage Panel script now automatically reads the Foliage Type, Ground Type, Ground Angle, Spray Type associated with your map from the map.i3d and displays it in a dropdown selection. However the Foliage State for each Foliage Type still requires a number value (position in the Layer State dropdown in GE) To assist with this the script now reads all the Foliage States of each Foliage Type directly from the maps foliage folder xml’s and prints result to the console log and to a foliage_States.txt file in the same folder as the map.i3d for easy reference, the image below shows the extracts from console log print out and the foliage_States.txt file . The foliage states listed here are from a test map based on the US map so yours may differ depending on your map set up. Open your map in Giants Editor and Select –Scripts, select the Field Dimensions and Farmlands folder to open it and then select the Create Field Dimension Panel script a popup Panel will appear on your screen. A new transform Group will automatically have been created in the Scenegraph called Field_Creation_Transform consisting of the following TG groups newFieldMarkers – this TG will be the the reference point for the fieldMapIndicator and also contains the Markers transform where the markers are placed. fieldsNew -- containing a fields transform although this will have the FieldUtil.onCreate attribute set by the script I suggest deleting the attributes and reassigning them by Add New Attribute --Type --scriptcallback -- onCreate -- Add and in the new onCreate box enter FieldUtil.onCreate as some times GE doesn't recognise some script set User Attributes. This only applies to the field TG in the fieldsNew TG. The relevant entries created in this fields TG must be copy/pasted in to the gameplay –fields TG replacing originals before using in game farmlandDimensions -- containing a fields TG with the FieldUtil.onCreate attribute set. This will be used in the creation of the farmlandsDimensions Create a primitive (Create –Primitives, I will be using a cone throughout this tutorial.) and cut/paste into the newFieldMarkers transform (this will be the position of your fieldMapIndicator in the new fields TG). Copy/paste a cone into the Markers TG Your Scenegraph should now look like this. If you haven’t already got an outline of your proposed field area then I suggest you make one using the Terrain Detail Texture Mode and a suitable texture. Once you have a field border then CTRL ‘B’ the newFieldMarkers transform into the field area. Note: The newFieldMarkers transform MUST be placed in a position that allows ALL the field boundary to be seen from that position (the cone in the newFieldMarkers TG will provide a reference point) otherwise the script will not work correctly, so for complicated field shapes you will have to create the fieldDimensions manually or by using FieldDimensionsWithBitmap script available from here https://ls-modcompany.com/forum/thread/5852-fs19-ge-script-fielddimensions-per-bitmap/ Also the Markers (cones) must be in a consecutive order, so if you have to add any additional markers to your layout (after creating one) then the extra marker must be placed in between existing ones in the Markers TG as the script uses each marker in turn to create the field Dimensions. Place the ‘cones’ along the edge of the field by CTRL ‘D’ (copy existing cone)-CTRL ‘B’ (place new cone) at suitable points as shown in the following image ( I have scaled the cones up for better definition). Using the fields transform in the fieldsNew TG to create the new field dimensions. In the Enter Field Number box enter the field number you want for this field. Now, first selecting the fields transform and holding Ctrl key select the Markers transform, releasing the Ctrl key and select the Create Field Dimension button. The new field dimensions together with the fieldMapIndicator will be created in the fields TG in the fieldsNew TG, if they are not visible in GE then with the fields TG selected Select – Scripts – Map –Toggle Render Field Areas and they should appear in GE. A Created Field Dimension for Field ‘field01’ message will also appear in the console log (field number will change to field created in subsequent operations). Results shown in following image. The script sets the default for fieldGrassMissions and fieldMissionAllowed to false. To change this to your prefered setting select the field number transform (field01 in the folowing image) And select the relevant box as shown below. fieldAngle can be left at 0, fieldDimensionIindex and nameIndicatorIndex refers to their position in the field(01) transform group 0 and 1 respectively. Painting the Field and adding details to farmlands.xml There are some tasks and settings to be done before this can be carried out. Firstly if you are starting from scratch then I suggest you ’Wipe’ the infoLayer_farmlands.grle if you already have fields painted then skip this next step. ‘Wipe’ infoLayer_farmlands.xml In GE zoom out until the whole map area (I use a pda camera for this ) is in view select the Terrain info Layer Paint Mode and in the Info Layer Painting panel select farmland in the drop down, select all the info channels (1-7). In the Terrain Editing Brush panel set a radius of 1000 and Brush Type square, paint the whole map area (ensure it is completely covered otherwise you will get errors in the log) and save the map. farmlands.xml If you have renamed your farmlands .xml then obviously use that name in the following and check the note in the Create Farmlands section regarding filePaths. Navigate to where the map.xml is located in your map normally Map Name/maps/mapUS (orFR/alpine) And open this in notepad++ and locate the <farmlands filename entry in this case it is <farmlands filename="$data/maps/mapUS/farmlands.xml" /> Change this to <farmlands filename="maps/mapUS/farmlands.xml" /> if you want to keep your farmlands.xml in the default position However I am going to put my farmlands.xml in a separate xml folder so my <farmlands filename entry will look like this <farmlands filename="maps/mapUS/xml/farmlands.xml" /> with the farmlands.xml placed in the new xml folder. Save the maps.xml. Open the farmlands.xml in notepad++ and ensure the path to the infoLayer_farmland.grle is correct the densityMapFilename should read densityMapFilename="maps/mapUS/data/infoLayer_farmland.grle" If you are starting from scratch open farmlands.xml and delete all the farmland entries like so. However if you already have fields created in the farmlands.xml then only delete any entries that have not yet been created leaving only the created ones e.g A second set of field Dimensions now need to be created in the fieldDimensions TG using the original set of markers. Select each of the field border markers in turn and move them to the outside of the field boundary (or if you have two fields that you want to have as one farmalnd area, to the outside of the whole area) Remember if you add any new markers the extra marker must be placed in between existing ones in the Markers TG as the script uses each marker in turn to create the field Dimensions. Once done first select the fields transform in the fieldDimensions TG and holding the Ctrl key select the Markers TG release the Ctrl key and select the Create Field Dimension button. Note: the field number is left as 1 in the Create Field Dimension script because this is the field number to be painted. Create Farmlands To paint the field infoLayer_farmland_grle and create the correct entries in the farmlands.xml in Giants Editor Select –Scripts, select the Field Dimensions and Farmlands folder to open it and then select the Create Farmlands Panel script, a popup Panel will appear on your screen. Set Land Price Scale- Enter your chosen price scale multiplier default is 1 Set NPC Area- Enter your chosen NPC area "ALPINE", "US" or "FR" Number of Different NPC’s Number of different NPC's (found in base maps npc.xml normally default 15) The npc number is randomly selected between 1 and the npcCount value in the script. Show on Farmlands Screen Default is true --false will stop field being shown on farmlands screen i.e showOnFarmlandsScreen="false" /> <!-- BGA, farmland bought via placeable --> When true the game scripts automatically show the farmlands so no showOnFarmlandsScreen entry will appear in the farmlands.xml Default Farm Property Default is false --true assigns ownership of field to player farm i.e defaultFarmProperty="true" /> Once you have made the relevant settings in the Panel , with the field01 TG (farmlandDimensions – fields - field01) selected, select the Create Farmlands button. Note: If your map has a non standard heiarchy or extra custom NPC characters then you will need to adjust some variables in the script, obviously if the map is a standard layout then this section can be ignored. The variables to change are, local farmLPath = {"farmlands.xml","xml/farmlands.xml"} – these are the normal places where the farmlands.xml is found. The script will automatically search for the xml in the following locations Main map folder Main Map/maps folder Main Map/maps/mapUS (orAlpine,FR) folder If your farmlands.xml has another name or placed in a different folder location then add this to the ‘farmLPath array ‘ not forgetting the quotes. local areas ={"ALPINE","US","FR"} – If you have another set of custom characters at a different location then add this to the ‘areas’ array again not forgetting the quotes. local npcCount = 15 -- If you have more custom characters then increase this number to the new amount. To carry out any of the above changes open the script in the GE Script Editor Window – Script Editor -- Field Dimensions and Farmlands - Create Farmlands Panel At the top of the script (lines 12,13,14) you will find these variables, adjust as necessary and save the script. The Script Editor can now be closed as it is no longer needed and the script is ready for use. The image below shows the resultant farmland painted (in Brown) with the farmlandDimensions overlayed in green. The inset shows the same farmland but selecting Farmland 1 in the Lands dropdown and show unmasked selected (removes the background colour) A INFO : Farmland id 1 Painted and farmlands.xml entry created message will also appear in the console log (field Id will change to any new Id created for subsequent fields). Note: Colours will vary as the Toggle Render Field Areas script randomly assigns colours to fields And the new entry in the farmlands.xml showing field 1 as belonging to the farm. You can create the fields in any order the script will adjust the farmlands.xml numerical order automaticaly and insert the next number in the appropriate place replacing the <farmland/> with the new field entry as shown below. If you try to create/paint a field ID that already exists then a warning will appear in the Console panel window and the existing farmland ID will not be overwritten , for example, +++++++++++++++++++++++++ Farmland ID 25 already exists in farmlands.xml Delete farmland Id 25 in the farmlands.xml if you wish to create a new farmland at Id 25 +++++++++++++++++++++++++ Should you wish to increase/decrease the size of the painted farmland area then in GE with the Terrain Layer Info Paint Mode selected and the farmland selected in the drop down in the Info Layer Painting Panel With the cursor over the area you wish to change select Ctrl ‘R’ on the keyboard and the correct farmland entry will appear in the Info Layer Painting Panel ready for you to paint Once happy save the map (sets the infolayer_farmland.grle) Painting Field Ground Type and Foliage This requires the Paint Field Ground Foliage Panel script. The script requires the correct Farming Simulator 2022 installation path, it uses a default path of "C:/Program Files (x86)/Farming Simulator 2022/". If your installation path is different then open the script in the GE Script Editor Window – Script Editor -- Field Dimensions and Farmlands - Paint Field Ground Foliage Panel At the top of the script at line 24 there is the following local gInst = "C:/Program Files (x86)/Farming Simulator 2022/" replace the "C:/Program Files (x86)/Farming Simulator 2022/" with your file path (including the quotes) and save the script. The Script Editor can now be closed as it is no longer needed and the script is ready for use. This script uses the created field dimensions to allow the painting of the Ground Type and Foliage to the field dimension area With the map open in GE select Scripts select the Field Dimensions and Farmlands folder then the Paint Field Ground Foliage Panel script the following pop up panel will appear on your screen Set Foliage Layer Select the Set Foliage Layer box and a dropdown will open listing all the various foliage layers in your map for example 'terrainDetail' Set Foliage State Only applies if terrainDetail not selected in the Set Foliage Layer. The number entered corresponds to the position of your chosen foliage state in the Layer State dropdown in the Foliage Layer Painting Panel of GE. To assist with finding the relevant foliage state all the foliage states for each ‘crop’ are printed in the console log and also in a foliage_states.txt file in the map.i3d folder Ground Type Selected from the Ground Type dropdown (all available terrain detail ground type’s listed). Ground Angle-Degrees Selected from the Ground Angle-Degrees dropdown (all available ground angles listed). Spray Types Selected from the Spray Type dropdown (all available spray types listed) Paint Ground/Foliage Executes the script Once you have entered your chosen settings with the field TG (i.e. field01) selected, select the Paint Ground/Foliage button Note: the Spray type works the same as if painted in GE so you will still get the requires lime/etc in the in game field info gui. The images below show console log print out for foliage states and the Paint Field Ground Foliage Panel settings for, Set Foliage Layer --terrain detail, Ground Type Ridge, Ground Angle -90,Spray Type Manure. Set Foliage Layer- potato, Foliage State - 5 (green big) Ground Type/GroundAngle/Spray Type left as previous as they have no effect if terrainDetail not selected. To erase/change any option select the foliage layer you want to change and either deselect it (blank) to remove or choose another foliage type , the same applies to the other options. For example selecting terraindetail and deselecting (blank) in the other setting(s) to be erased and selecting the Paint Ground/Foliage button will revert the field to the original ground texture ( in this case ‘dirt’) To remove foliage , select that foliage in the Set Foliage Layer dropdown and enter ‘0’ in the Foliage State select the Paint Ground/Foliage button will remove all the foliage of that selected Foliage Layer The script will work on any TG that has field dimensions so for example can be used to fill a predefined area that has been created using the field dimensions script. Note : Density Map Modifier details will also be printed in the log whenever the Paint Ground/Foliage script is used, this is not an script error but a GE info regarding number of channels e.g. DensityMapModifier: defaulting num channels to 10 DensityMapModifier: called from =C:/Users/Admin/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts/PanelScripts/Field Creation Scripts/Paint Field Ground Foliage V4.lua (275) If manually painting the terrain detail a little tip, in the Limit to Texture drop down in the Foliage Layer Painting panel select the texture of your field area this will restrict the painting to that texture only and not paint over the grass border texture the image below shows the effect of these settings. To create other fields repeat the above methods. Once you have completed all your fields then, if starting from scratch cut/paste the fields TG from the fieldsNewTG to the gameplay TG replacing original. However if you already have fields created then copy/paste the fields TG from the fieldsNewTG to the gameplay TG and move any existing fields into the new field TG. Save the map. --------------------------------------------------------------------------------------------------------------- Method 2 Using a Spline This method is more or less the same as the first except I will be using a spline to create the field border and place the markers, the placedObjects TG will be used instead of the Markers TG when creating the field Dimensions. The scripts used in this section of the tutorial are:- Spline Placement set –Transform/Place/Delete Sets the required transform groups in the scenegraph Places objects along a spline Option to delete the current placed objects Create Field Dimension Panel Creates field dimensions from markers Create Farmlands Panel Paints the InfoLayer farmlands.grle and adds relevant data to the farmlands.xml. Paint Field Ground Foliage Panel Paints the chosen Ground Type (i.e.Plowed,Cultivated etc) and Foliage at a chosen state (i.e. wheat, harvest ready). Spline Paint Panel Paints chosen texture(s) along/either side of a spline If you haven’t used the Spline Placement scripts/ Spline Paint Panel scripts before then I suggest you have a look at the tutorials linked below. https://farmerboysmodding.com/index.php?/topic/2414-terrain-height-paint-terrain-and-spline-placement-scripts-tutorials/ Initial set up When using scripts in GE that do not require access to the script editor (such as the Toggle Render Field Areas) what I normally do is go to Scripts –Map, which opens the folder at the bottom of the popout is Detach Menu, selecting this undocks the folder from the Scripts list which can then be place anywhere on the screen or redocked into the side panels (see images in the tutorial for examples). Open map in GE, open Script Editor (Window – Script Editor) select and execute the following script (found in the Spline Placement folder):- SplinePlacement Transform – this will create the necessary transform group heirachy for the script In GE create a spline (Create—Spline) and cut paste it into the splinePlacement transform. Create a primitive (Create—Primitives) again I will be using a cone, and copy/paste one into the objectsTo Place transform and another into the splineObjects transform (this one is used as a guide for the fieldMapIndicator) . I will be using the exsisting transform group farmlandDimensions TG from the previous method infoLayer_farmlands.grle and farmlands.xml set up is the same as previous method. The splineObjects transform will be used to create a field boundary and place the markers, the spline itself will also be used to paint a field border in a suitable texture The farmlandDimensions TG with the fields transform will be used to create a second set of fieldDimensions in a new (in this case ) field02 transform to be used for painting the infoLayer_farmland.grle and creating a new entry in the farmlands.xml in the same way as before. Creating Field Dimensions These are created much the same way as the before the exception is now the field boundary is created using a spline. Select the splineObjects TG place it into the field by Ctrl ‘B’ , again the whole field boundary must be visible from the chosen location. Select the spline and place it in a suitable postion on the field boundary (I have chosen the top right corner and have also deleted the ‘S’ cv to forestall any rotation problems with the spline) and using just the ‘E’ cv create the field boundary (to get sharp corners insert an extra cv before continuing along the boundary). Once the boundary has been completed the field border can be painted by selecting the spline in the splinePlacement TG and in GE -- Select - Scripts—Spline Paint Panel the following image shows the panel set up for this particular field edge. This will paint a 5m ROUGHGRASS border to the left of the spline (viewed from the ‘S’ cv). The script reads all the various textures from the map.i3d and assigns them (in order) in the relevant dropdowns. You can of course select your own texture from the dropdown any texture/area you do not want painted the -1 must be selected. If required you can now easily paint the field texture (DIRT) itself by using the Limit to Texture method described earlier. With the border now painted select the splinePlacement transform to bring up the splinePlacement User Attributes and set the User Attributes as follows, Set Object Distance – 20 -- This can be set to any suitable number as long as the complete field border covered Fixed Distance --Selected –Enables items to be placed a fixed distance away from the spline Set Distance Fixed -- -5 --Is the distance objects will be placed away from the spline in this case - 5 m to allow for a 5m field border ( - 5 to the left of the spline viewed from the ‘S’ cv) other settings can be left as default. With the splinePLacement TG selected and the Spline Placement script selected either in the Script Editor or from the Detached Panel execute the script, (I have scaled the cone by 4 and freeze transformed for clarity). This image shows the field border painted together with the cones placed around the field perimeter The next step is to thin the cones out by deleting unnecessary ones (either one by one or left click drag to select multiples) and adjusting the position of others for better shaped field dimensions, in the next image the inset shows the the cones thinned out and the field dimensions created after entering field number then first selecting the fields transform (in the fieldsNew TG) and holding the Ctrl key select the placedObjects TG, release the Ctrl key and in the Create Field Dimension Panel select the Create Field Dimension button Note any other field dimension already created will also show when selecting Toggle Render Field Areas Next to create the second set of farmlandDimensions first select the spline Placement TG and in the Script Editor select Spline Placement Delete, in the Spline Placement folder (this will execute the script) In the Spline Placement User Attributes change the Set Fixed Distance to 2 (this will place the cones 2m outside the spline) and with the Set Object Distance still at 20 select Spline Placement, again adjust the position of the cones to create a smooth path around the field border If creating the fields farmlandDimension next to one already created then to ensure no gaps in the painting between the fields in the infoLayer_farmland.grle, with the fields TG ( in the farmlandsDimension TG) selected, select Scripts - Map – Toggle Render Field Areas, this will show all the farmlandDimension currently created. Then adjust the cones so that they align with the other fields farmlandDimensions, the following image shows an example of this in the inset. Once done, in the Create Field Dimension Panel leave the field number the same as the one for field dimensions first select the fields TG ( in the farmlandsDimension TG) and holding the Ctrl key select the placedObjects TG and select the Create Field Dimension button. The newly created field02 farmlandsDimension created Painting field infoLayer_grle and farmlands.xml This is done in the same way as the previous tutorial. Open the Create Farmlands Panel (Scripts - Field Dimensions and Farmlands - Create Farmlands Panel ) Set the options as required then in the fields TG ( in the farmlandsDimension TG) select (in this case) field02 and then the Create Farmlands button to execute the script. The image below shows the new field02 farmland painted in the infoLayer_farmland.grle (Terrain Info Paint Mode selected) together with the previous field01 creation. And in the farmlands.xml the following settings. Painting the Ground Type and Foliage State can be done using the Paint Field Ground Foliage script as described earlier in the tutorial in the Painting Field Ground Type and Foliage section. The spline can now be used to add fences/foliage/hedges etc by using the releveant scripts Fence Power Placement Paint Foliage by Spline Spline Placement All the above can be found in the relevant tutorials on the forum and are include in the Field Dimensions and Farmlands folder The following is an example using the Spline Placement. Adding hedges etc Delete the cones in the placedObjectsTG (with the splinePlacement TG selected, select and execute the Spline Placement Delete script) . Replacing the cone in the objetsToPlace TG with a 4m hedge from the in game foliage-hedge folder and setting the Set Object Distance to 4m with the splinePlacement TG selected execute the Spline Placement Script. Delete the 4m hedge from the objectsToPlace TG and replace it with a pagoda dogwood tree (or another of your choice) and reset the Spline Placements User attributes to Execute the spline Placement script Once happy with the reults then copy paste the placedObjects TG to another part of the Senegraph and rename and with the splinePlacement TG selected execut the Spline Placement Delete script to clear the placedObjects TG if required. Image below shows the result with the farmland painted with a wheat foliage texture in Giants Editor NOTE: At this point If using a fields Transform Group other than the default one in the maps gameplay TG do not forget to cut/paste the new fields TG to the correct place in the maps gameplay TG before saving the map. Also the fieldMapIndicator can now be moved to a different location if required as it is no longer used as a reference point for the scripts. With the map saved and then opened in game the following image shows the farmlands screen with farmland 01 selected showing field area with number and price. In game showing NPC details Finally field User Attributes if you want a particular field to have grass missions then all you have to do is select the fieldGrassMission option in the relevant field User Attribute in this case field01. Installation of scripts To install unzip the file and copy/paste the Field Dimensions and Farmlands folder into. C:/Users/Your Computer Names/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts Note: Panel scripts can only be used with GE 9.0.6 if using earlier versions of the GE Editor then download the 'Archive Field Dimensions and Farmlands.zip' which also contains a web page copy of the old tutorial for reference. Field Dimensions and Farmlands.zip Archive Field Dimensions and Farmlands.zip
    1 point
  8. Import Placeables This script is for those people who want to modify/edit existing maps and want to load all the placeables in taht map in one hit. However any modification/deleting of any of the loaded placeables will still require manual changes to the placeables.xml. The script will import all the placeables listed in the placeables.xml into the map at the location set in the xml and with any User Attributes that are assigned to each placeable. Script will only import placeables from i3ds so any placeables.xml script that does not have an i3dPath in its base.filename will not be loaded and an error message with the problem xml's filePath will be printed in the console log, error message will also be printed if the mod directory doesn't have a mod associated with that map. Any file not loaded automatically will have to be manually added to the placeholders TG. Limitations: Where fences/hedges/power lines have been created using the in game construction tool and then copy pasted into the placeables.xml from a save game these will not appear in their assigned position as any editing/deletion must be carried out in game and the placeables.xml manually adjusted from a new save game. Installation and Use To use the script unzip the Import Placeables.zip (available at the end of this tutorial) and copy/paste the folder to the location of your GIANTS Editor 64bit 9.0.6/scripts folder in this case it is, C:/Users/*****/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts (replacing the *** with your computer name) Open GE and open the Script Editor , Window -- Script Editor and select Import Placables Check and amend the following lines as necessary : - Line 50 local gInst = "C:/Program Files (x86)/Farming Simulator 2022/" --change to your Farming Simulator 2022 Installation Path if different. Line 52 local pathModDir = "C:/Users/ccrjs/Documents/My Games/FarmingSimulator2022/mods/" --change to your mod directory path if different. Line 54 local placePath ={"placeables.xml","xml/placeables.xml","xmls/placeables.xml","maps/mapUS/placeables.xml"} The 'placePath' array contains the various paths that the placeables xml can normally be found, if your placeables are in a different place/folder then add the path to the list. When done save the script, the Script Editor can now be closed. In GE create a new transform group and name it 'placeholders' with the new placeholders transform group selected, in the User Attributes Panel of GE add a new attribute Type 'script callback' with the name 'onCreate' select Add and in the new onCreate box type 'Placeholders.onCreate' (correct Font and spelling required). This will allow the placables to be seen in GE, the new placeholders TG will be ignored when the map is opened in game and the placeables will be loaded as normal from the placeables.xml. Select -- Scripts --Import Placeables A pop up panel will appear with a button marked Import Placeables Image below shows the Scenegraph and User Attributes entries together with the pop up panel With the placeholders Transform Group selected, select the Import Placeables button. All the placeables listed in maps placeables.xml will be loaded into the map together with any User Attributes assigned and a print out of the file path to each one loaded will appear in the GE Console log. The name of each individual placeable in the Scenegraph will be its xml/i3d name not its placeable folder name. The script will continue running until all placeables listed (including error messages) in the placeables.xml have been loaded An example of the console log print out showing normal and error path print outs is shown below, I have tested the script on several maps inc FS22_Maypole_Farm FS22_BucksCounty FS22_FrontierMap FS22_Calmsden FS22_Monette_Farms however there maybe other maps on which the script may/may nort work as expected but I'm sure you will tell me about them. Import Placeables.zip
    1 point
  9. I have updated and added some extra functions to the Terrain Height, Spline Placement and Paint Terrain scripts. All these scripts together with installation instructions are available here See Updated Spline, CSV, Height, Paint, Place, Scripts – Installation Link to installation post https://farmerboysmodding.com/index.php?/topic/2412-updated-spline-csv-height-paint-place-scripts/ Splines The spline can now be given any name as long as it includes the name ' spline ' in any part of it i.e. road1_Spline or roadspline01 etc. Problems will occur if the spline transform or the spline itself does not have the correct rotation, whether in the transform group of the spline or the spline itself . The rotation has to be set at 0,0,0 for any of the scripts to work correctly. There are a couple of ways of ensuring this, one is to set up your spline in the position you want and freeze transform only the rotation, the other is to select the S cv of the spline and delete it, this brings S to the centre (rotating point) of the spline, then just use the E cv to create the rest of the spline so lessening the chance of inadvertently rotating the start of the spline. Terrain Paint This consists of two scripts Terrain Paint Set Up Terrain Paint To use, create a spline in Giants Editor and align the spline along the terrain to whatever you are intending to paint., the spline does not have to be accurately aligned painting will only occur at the terrain height. Then with the spline selected, Select –Scripts-- Terrain Paint Set Up This will create the User Attributes the necessary for the Terrain Paint script and will also print out the terrain layer textures in the Console log in the following format, Texture No :93:Texture Name : shingle01 Texture No :94:Texture Name : shingle02 Texture No :95:Texture Name : shingle03 Texture No :96:Texture Name : ANIMALMUD Texture No :97:Texture Name : AS Texture No :98:Texture Name : ASPHALT Texture No :99:Texture Name : CONCRETE Texture No :100:Texture Name : DIRT User Attributes panel for Terrain Paint Set Centre Texture Width ---Width of the Centre Texture in metres Set Edge Texture Width ---Width of the Edge Textures in metres (Value set is applied to both left and right edges) Set Edge Texture Left ---Enter required left edge texture number from Consol log. Set Centre Texture ---Enter required Centre texture number from Console log Set Edge Texture Right ---Enter required Right edge texture number from Consol log. Set Distance Between Textures ---How far apart the textures are painted along the spline (default 0.5) To Allow painting of just one edge and not the centre or the other edge set the Set Centre Texture to -1 and the non painting edge to -1 also Once the User Attributes have been set then, With the spline selected Select ---Scripts--- Terrain Paint the textures will then be painted according to the User Attribute settings A print out in the GE console log will detail these settings for reference Spline name: Texture Left: no, name Texture Centre: no, name Texture Right: no, name Centre Width :(m), Edge Width: (m), Texture Distance: (m) If the Set Edge Width Texture is set to zero (0) only the following will be shown in the log Spline Name, Texture Centre no, Centre Width Texture Distance Should you require only the Centre Texture then Set Edge Width Texture to zero (0) and adjust your Centre Width settings accordingly The image below shows the result with various texture settings using the above values, with a print out of the Texture No and Name showing in the console log on the right of the picture. In the image above all the examples are based on a 16m Overall width of 8m (Road bed) + Left and Right edges of 4m The following image shows how the Set Distance Between Textures setting can be used to create a pothole effect The first settings were Set Centre Width –16 Set Center Texture---83 (waterPuddle01) which painted the water puddle texture over the whole 16m width. Second settings were Set Centre Texture Width -- 16 Set Edge Texture Width -- 4 Set Edge Texture Left -- 91 Set Centre Texture -- 97 Set Edge Texture Right --100 Set Distanced Between Textures -- 1.5 which then painted the DIRT/GRAVEL/GRAVELGRASS texture over the water puddle texture but because the texture distance was set to 1.1 it left holes in the textures so allowing the water puddle texture to show through. Potholes.png ---------------------------------------------------------------------------------------------------------------------------------------------------------- Terrain Height This script is an enhancement of the normal terrain height script which uses a spline to guide the terrain deformation it also allows the setting of a distance value for Edge Width (value applies to both sides) and Height / Smoothness values to be entered in the TERRAIN HEIGHT attributes allowing independent control of the height and smoothing on either edges. Any Edge Width/Height/Smoothness (L/R) adjustment will have no effect on the Centre Width setting whose height setting is dependent on the actual spline height or Set Spline Height settings This also consists of two scripts Terrain Height Set Up Terrain Height To use Create the spline in Giants Editor and create/align the spline to whatever area you are intending to terraform. Then with the spline selected, Select –Scripts-- Terrain Height Set Up In the User Attributes panel of Giants Editor the necessary User Attributes for the Terrain Height script will be created,as shown below. Set Centre Width --- Width of centre deformation in metres. Set Spline Height -- Height of the start deformation from the spline, can be a negative figure, default is 0, ( actual spline position ) Edge Transformation -- When selected allows independent setting of edge height/ depth, deselected only Centre Width deformation Set Edge Width -- Width of edge deformation on both sides Set Edge Height Left ---Height/Depth of Left Hand deformation Set Edge Height Right –-Height/Depth of Right Hand deformation Set Edge Smooth Right -- Number is used to factor the amount of smoothing -- lower number less smoothing, Higher number greater smoothing (optimal 10) Set Edge Smooth Left -- As smoothing Left Set the relevant User Attributes to your proposed settings and then. With the Spline selected in GE, Select---Scripts---Terrain Height Once the script has been executed a print out will appear in the GE console log detailing these settings for reference Spline name Edge Transformation setting Spline Height Centre Width : Edge Width: Height Left : Height Right : Smoothing Left: Smoothing Right: If the Edge Transformation is deselected only the following will be printed Spline name Spline Height Centre Width Smoothing is carried out much the same way as using the terrain sculpt tool in that it smooths the area down in height so further adjustment of the edge height to match terrain may be required . Below is an image showing the terrain profiles with various settings (Spline Height set to 4m for clarity). Note: Once executed this terrain deformation cannot normally be undone, but provided you haven’t saved the map after executing the script the terrain can be reset back to previous levels by selecting the Reload i3d icon in the toolbar( under the Create tab) then re adjusting script values as required. If the map has been saved then the only way of redoing the terrain is to Copy/Paste your backup map_dem.png into the map data folder. Further Example; The above settings were used as a base for the road in the image below. To get the desired effect required 4 executions of the script as smoothing was carried out by simply reducing the edge width and heights by one each time the script was executed and finally on the last execution (where Edge Widths and Heights equalled 1, -1 for the right hand edge) by increasing the smoothing factor to 5 for both left and right edges. Spline Placement With this script objects can be placed at various fixed, preset distances, random distances and locations away from or along the spline depending on settings in the script. The objects will be placed at terrain height along the spline (using their individual point of origin location) from the 'S' cv to the ‘E’ cv and aligned to the to the spline along their "Z" axis (unless random location selected). e.g. if you have a hedge that is 4m long and 1m wide ensure the longest section (4m)is aligned to the 'Z' axis otherwise rotate it in GE until is aligned along the 'Z' axis and freeze transform rotation also ensure that the point of origin (where the gizmo shows when object is selected) is at the correct point For best results, open any objects you intend to place in GE and adjust axis and origin accordingly, when done , freeze transform all scale/rotation settings (DO NOT freeze transform translations unless point of origin is relocated) on all the relevant objects. This also applies to any transform groups containing objects that required to be placed using the transform group itself, select the transform group and Edit—Freeze Transformation—Transformation, Rotation and scale This script first requires the execution of the Spline Placement Transform script which will create the correct Transform Group (splineObjects) and the relevant sub groups (objectsTo Place and placedObjects),and also create the relevant User Attributes in the User Attributes panel in Giants Editor as shown below All that is then required is to add a spline (Create-Spline) CUT/pasted into the splinePlacement transform group and add required objects to the objectsToPlace transform group and insert the relevant Attribute values. Note. The splinePlacement transform group has to be selected when entering the User Attributes and also when the Spline Placement script is run. Script Parameters Explanation Refer to image above Set Object Distance -- - Sets a fixed distance between objects along the spline in metres. Use Distance Table ---When selected use the values in the Set Distance Table to set the object distance deselected uses distance value in Set Object Distance Set Distance Table Sets a fixed distance between the objects in the objectsToPlace transform when Use Distance Table selected, number of settings must match number of items in the objectsToPlace transform and be separated by a comma. The first object in the objectsToPlace transform will always be put at the start of the spline (distance ‘0’), the entries in the Set Distance Table refer to the distance to the next object from the preceding one. So in the following example; A total of 3 objects in the objectsToPlace transform 1,2 and 3 Set Distance Table = 4,8,20 -- value in metres object ‘1’ placed at ‘0’ by default so no reference in distanceTable object ‘2 ‘ placed 4m from object ‘1’ object ‘3’ placed 8m from object ‘2’ object ‘1’ placed 20m from object ‘3’ and so on until the end of the spline. A distance of ‘0’ will mean that two objects will be placed at the same location on the spline (e.g lamp post ,hedge ) Any incorrect entries in the Set Distance Table will result in a DISTANCE TABLE ERROR in the Console log. Stay Upright ---- When selected all item remains upright, specifically for trees, poles, lights etc deselected reverts to spline 'X'rotation and original object rotation at the placement point. Random Scale -- -When selected allows random object scale between the parameters set by Scale Low, Scale High values.If an item is already scaled then it has to be freeze transformed (Scale) for this to work correctly, deselected' retains original size. Set ScaleLow --- value of the minimum random scale parameter, the value set applies to all scale axis (x, y, z) at the same time Set Scale High --- value of the maximum random scale parameter, the value set applies to all scale axis (x, y, z) at the same time Random Y Rotation -- -When selected' objects randomly rotated on the 'Y'axis deselected' Y’ axis rotation as original object Random Order -- -When selected allows a random order of objects along the spline deselected retains the order set in the objectsToBePlaced transform group. Random Object Distance —When selected sets a random distance between objects along the spline deselected distance set by Object Distance or Distance Table Set Random Object Distance Seed -- percentage factor used to calculate randomObjectDistance, higher number greater variation in distance between objects Random Object Placement -- When selected places the object away from the spline by the Random Placement Distance deselected objects placed along the spline. Set Random Placement Distance -- maximum displacement distance from the spline, displacement varies between 0 and number chosen Set Fixed Distance -- When selected allows a set distance for objects to be placed either to the left or right of the spline depending on value set in Distance Fixed. If selected and Distance Fixed value set this is also the distance around which Random Placement will start. Set DistanceFixed -- Distance objects to be placed to the left or right of the spline in metres, positive number to the left negative to the right viewed from 'S' cv. Note: The spline is not moved so the set distance between the objects will increase depending on value set (like the spokes on a bicycle wheel from the hub to the rim). Objects will be placed at 90 degrees to the spline on the ‘Z’ axis at the relevant spline point. Whilst this next section is not strictly necessary it can help in creating splines and accurate placement when using the Spline Placement script Creating splines for use with this script. Whilst this step is optional (depending on your spline layout) if used will help in creating a spline aligned to the terrain with a large number of cv’s ensuring accurate placement of any object. As the script works by placing object(s) at their point of origin at set distances along or around the spline, aligned to the terrain height and spline rotation at that particular point, for accurate placement it means the spline must have a large number of cv’s (in this case suggest one every metre) to ensure correct alignment to the terrain. Obviously this would be very time consuming, a quick way is to roughly create the spline path as required without paying much attention to height settings (in fact it can go underground without affecting the final created spline). When satisfied with the spline layout in GE, Select ---Scripts- Spline CSV Creator Set Up, set User Attributes as follows, (b).Map Name – Insert your Full map (root folder) name (Note: Case sensitive) (c.).CSV Distance to ‘1’ With the spline selected Select -- Spline CSV Creator in the Scripts dropdown, the new spline will be created in the CSVdata folder (one will be created if not already there) in your map root folder. A Your Name spline_CSVdata.txt file will also be created in the same folder should you wish to use the spline data for creating a road/rail mesh. Import it into your map by File—Import and navigate to where the CSvdata folder is located (map root folder)and select the spline, the spline will have its original name with the suffix _CSV. It will then appear at the location of your original spline, aligned to the terrain at 1 metre intervals In the following image the Attributes have been set with the Farm Name, in this case Manor Farm and CSV Distance to 1 and the new spline01_CSV imported into GE. Console log also shows the relevant information regarding creation of the new items. It also shows the original spline01 (as just a straight line) and the new spline01_CSV with the cv’s aligned to the terrain at 1 metre intervals. Note: the new spline translations will have been reset to zero. Another method of setting objects away from the spline The following method will only work satisfactorily if the spline hasn’t been Freeze Transformed – Translate. Because the objects are placed on the ‘Z’ axis away from the spline, another way of placing objects at a set distance from the first spline and retaining the distance between the objects is to make a copy of the first spline and adjust the ‘Z’ transformation to the required -/+ distance, replacing the first spline in the splineTransform group with the new spline and executing the script, ideal for fences /hedges alongside roads etc. Occasionally alterations to the ‘X’ axis may be required as well on the new spline to get the perfect alignment. This trick can also be used for traffic/AI splines BUT the spline must be ‘freeze transformed Translate’ before use as a traffic /AI spline. Example. The images below shows examples of the various settings used in the Spline Placement attributes to achieve different results Should you need to delete the objects in the placedObjects transform (eg. Resetting settings or just adding objects) then with the splinePlacement transform selected execute the Spline Placement Delete script. NOTE: The Spline Placement Delete script will delete ALL objects in the placedObjects transform so if doing multiple runs of the Spline Placement script copy paste the placedObjects transform directly into the Scenegraph. Note. The splinePlacement transform group has to be selected when entering the User Attributes and also when the Spline Placement script is run otherwise warnings will appear in the Console log. Using a fence from the in game Farm Fence placeable. In the following image the script has been run twice, the first time to place the pole upright and the second to align the rotation of the panel to the terrain, setting used are highlighted in red. There is no need to delete the poles from the placedObjects transform before running the script for a second time the panels will be placed in the same transform. Note; object Distance is used to set the distance in this case Some of the fence panels will need a slight adjustment to align correctly, which can easily be done by selecting the relevant panel and adjusting as necessary. NOTE: When placing a Transform Group with objects inside it, first select the Transform Group and Freeze Transform --Translate/Scale/Rotation settings before adding it to the objectsToPlace transform. Examples of other settings using the road mesh and splines image from the Blender CSV Road/Rail tutorial Example Image splinePlace_Right To create this particular placement I have first moved the m4m hedge point of origin to the centre of the hedge to allow for better placement on bends, an example of the difference after placement can be seen in inset 2 above. To do this simply select the m4m hedge in the objectsToPlace transform group and set the ‘Z’ translation to -2 and Edit—Freeze Transform—Translation. Creating a 4m fence section Create new transform group copy/paste a pole ( pole02) and duplicate twice so you have three poles copy/paste a panel (panel01)and duplicate once Transform Group should look like this 4mFence pole02 panel01 panel01 pole02 pole02 select second panel01 and translate 'Z' -2 select second pole02 and translate 'Z' -2 select thirdpole02 and translate 'Z' 2 with the first pole02 selected (pole02 Transform group) Edit --Freeze Transformations --Translate now all items in that transform group are aligned at zero with reference to the centre pole to use copy/paste the pole02 transform group into the objectsToPlace transform The 4mFence_Section now has the same point of origin as the hedge. The poly count of this 4m fence section can also be reduced by deleting all the collisions for each item and replacing with a new collision made in the following way Create—Primitive –cube Cut/paste cube into the 4mFence_Section transform and scale to fit when done Freeze Transform –Translate and Scale. Set the Rigid body tab and in the shape tab select Cast Shadowmap, Receive Shadowmap, Non Renderable and Distance Blending. Whilst this only saves a poly count of 48 for each section it can make a large difference over a whole map for example a 400m fence will have a poly count of 80,800 with the new collision as opposed to the original poly count of 85,600 Now with the objectsToPlace transform set up as in the Example Image the Spline Placement script attributes can be set up as follows and executed by selecting Scripts—Spline Placement splinePlace_Left To get the desired effect shown in the Example Image using the splinePlace_Left spline, the script was executed four times with various settings in the script and replacing the items in the objectsTo Place transform with new ones. The image below shows the various objectsToPlace transform entry’s and Spline Placement attributes settings. The image below shows the various objectsToPlace transform entry’s and splinePlacement script settings for each execution/run of the script. The lightPoleLarge01 object on the first run had to be rotated on the ‘Y’ axis by 90 degrees and Edit -Freeze Transform --Rotate to get the correct alignment for placing along the spline and matching the road layout. On completion of the four runs of the script the placedObjects transform group will now have all the above items from the various executions in it, if you are happy with the result then this can then be cut pasted and renamed as another transform group. The Distance Fixed value of -15m in the fourth run of the script means that objects will be placed that far away from the spline and random placement will be based on that figure so in order for the trees to not spawn on the road the Random Placement Distance was set to the lower figure of 10. Note: If you execute the Spline Placement Delete script at any time with the splinePlacement transform selected it will delete ALL items in your placedObjects transform group.
    1 point
  10. I have updated these scripts to use the new pop up panel format currently in GE 9.0.4. The original scripts will still be available should you prefer to use them as sometimes the operation of these new versions may seem a little slower. Refer to the relevant tutorials on ways of using these new scripts Terrain Height,Paint Terrain and Spline Placement scripts (Tutorials) Create Field Dimensions and Farmlands Tutorial Spline Panels.zip available at the end of this topic Installation, copy paste the Spline Panel folder into the C:/Users/Your Computer Name/AppData/Local/GIANTS Editor 64bit 9.0.4/scripts Folder. Spline Paint Panel This is the updated version of the Spline Paint script and no longer needs a separate Set Up script to create User Attributes or a separate Terrain Layers script to print the terrain Layer no as a reference. The script itself works roughly the same way as the previous version so parts of the tutorial are still relevant regarding operation. Texture’s are now automatically read from the map.i3d and selected by using the relevant drop down arrows, any additional textures created and added to the map.i3d will also be automatically added to the drop down selections. The script only needs to be activated once further execution is done via the Paint Button. To activate the Paint Terrain by Spline pop up, in GE -- Scripts—Spline Paint Panel the following panel will it appear. Measurements can be inputted manually (recommended) or by using the sliders <> next to the relevant boxes. Example image showing texture drop down with DIRT Selected Once you have made your selections ensure the spline is selected (if no spline selected a warning will appear in the console log) and select the Paint button at the bottom. Other splines can be used simply by selecting them adding any new settings and selecting Paint. Random Paint is carried out the same as before, this time by selecting Selected in the drop down then add your settings and select the Paint Button. Individual sides of random paint(left or right) can also be selected by selecting -1 (at the bottom of the drop down list) in the non painting edge texture drop down. Spline Height Panel This updated script no longer requires a separate Set Up script or use User Attributes to work. Activate the Set Terrain Height by Spline pop up in GE by selecting Script—Spline Height Panel this only needs to be done once in each session as the Panel can be used with other splines without further activation, execution of any new settings being carried out by selecting the Set Height button The settings can be set either manually or by using the slider <>. A spline can be selected before or after filling in the various settings, if a spline is not selected a warning will appear in the console log prompting you to select a spline When happy with values and with a spline selected, select the Set Height button at the bottom of the panel to activate the script. There are some restrictions on minimum/maximum values, Set Centre Width – 0 to 255m Set Spline Height -- -50 to 255m (-50 to allow for spline transformations on higher terrain) Set Edge Width -- 0 to 50m Set Edge Height Left/right -- -20 to 20 Set Edge Smooth Left/Right – 1 to 20 Set Distance Between Points – 0.5 to 100 The existing tutorial on Spline Height can still be used for reference. An updated version of the Spline CSV Creator Panels script is available here https://farmerboysmodding.com/index.php?/topic/2471-spline-csv-creator-panel-updated/ This new version creates a spline.obj file from the newly created spline for direct import into Blender without the need to convert from a .csv file This spline.obj will still need converting to a curve in Blender to create roads etc. Spline CSV Creator Panel This updated script again no longer needs a Set Up script to initialise User Attributes to work. It now does not need a map name inputted as the script automatically puts the CSVdata folder created by the script and containing the new spline.i3d and splineCsvData.txt files in the same folder as the map.i3d Activate the CSV Creator pop up by selecting Scripts – Spline CSV Creator Panel in Select a spline, enter the distance required between CSV points and select the Create CSV button. Other splines can also be used by repeating the above ensuring that any new splines have a different name. Used in conjunction with the Blender Plugin for CSV Data Field Creation(Dimension) Scripts These are in a separate folder called Field Creation Scripts and consist of three separate scripts that are needed to perform a complete field creation. Create_FieldDimensions Panel The pop up Create Field Dimensions is activated in GE by selecting Scripts—Field Creation Scripts - Create Field Dimensions Panel No further activation is required as further script execution is now done by the Create Field Dimension button The FieldDimension_SetUp script is no longer required as the Create Field Dimensions Panel script when activated now automatically creates a new transform Group in the scenegraph 'Field_Creation_Transform' with all the required transform groups. Create_Field_Dimension pop up The Main Fields transform to create the fieldDimensions will be the fieldsNew –fields transform group and Markers transform newFieldMarkers – Markers. Field dimensions created for the Paint Farmland Field xml Panel will use the farmlandDimensions –fields transform group and the same Markers TG (once the markers have been reset to suit) Once the markers are created select the relevant fields transform enter the field no and select the Create Field Dimension button to execute the script. Any duplicate field numbers will activate a warning text in the console log. Paint Farmland Field xml Panel This panel is activated in GE by selecting Scripts—Field Creation Scripts – Paint Farmland Field xml Panels Panel. As is the case with the other scripts no further activation is required as all execution is done by the Create Farmlands button Set Path to XML – gives two choices farmlands.xml, if your farmlands.xml is in the same folder as your map.i3d or xml/farmlands.xml if you farmland.xml is in a separate xml folder in your map.i3d folder. These two paths are the most commonly used by map makers if you have the farmlands.xml elsewhere then I suggest moving it temporarily to the map.i3d folder. Set Total Fields – this is adjustable either by manual entry (recommended) or by the slider <> between 1 and 255 the 130 is an arbitrary figure farmlands.xml entries will still only show your actual field numbers. Set Land Price – is the multiplier applied to any land prices adjustable either by manual entry (recommended) or by the slider <> between 0 and 10 Set NPC Area – Allows choosing of an NPC area "ALPINE","US","FR" from the drop down selection can be different for each field if required. Number of Different NPC’s -- This is the number of different NPC’s available in the base scripts a number between 1 and 15 is randomly chosen by the script or can be selected manually for each field ownership created. Number can be increased if map maker has added extra NPC’s. Show on Farmlands Screen – If Yes then the field is shown on the games Farmlands screen, No the field will not be shown, used in cases where the farmland is bought with a placeable i.e. BGA Default Farm Property – Yes assigns that field to the ownership of the default (player) farm, No field is then buyable in the normal manner. Once all the relevant details have been entered select the farmlandDimensions –fields –field01 for example and select the Create Farmlands button. The infoLayer_farmlands.grle will have been painted (can be checked in GE by selecting the Terrain Info Layer Paint Mode together with the Info Layer –farmland and the Lands Farmlands number) and an entry for that field created in the farmlands.xml the field number being obtained from the field name i.e field01 will be Field01 in the farmlands.xml Warnings will appear in the log if a field number already exists in the farmlands.xml Subsequent fields can be created by selecting the next field number in the farmlandDimensions –fields transform and selecting Create Farmlands I have included the Paint Field Ground Foliage script (although not yet updated, WIP) together with its reference image, in this folder to keep all the scripts for Field Creation together. A little tip for speedily resetting the markers to create the new field dimensions for the Paint Farmland Farmlands xml script is to scale the X and Z axis by a factor of 0.1/2 depending on size required, (marker size has no effect on actual position) but bear in mind the scaling will be done with reference to the Markers TG (fieldmapIndicator position) so could appear distorted depending on position Spline Place and Spline Foliage scripts will also be updated to use the new pop up panel system in due course. Further information and guidance can be currently found in the Create Field Dimensions and Farmlands Tutorial, though this will also be updated in due course to reflect the changes. Spline Panels.zip
    1 point
  11. NOTE: An updated version of the Spline CSV Creator Panels script is available here https://farmerboysmodding.com/index.php?/topic/2471-spline-csv-creator-panel-updated/ This new version creates a spline.obj file from the newly created spline for direct import into Blender without the need to convert from a .csv file This spline.obj will still need converting to a curve in Blender to create roads etc. There are two parts to this tutorial, the first part deals with creating a 2D spline in Giants Editor and using the Spline CSV Creator scripts to create a new spline aligned to the terrain with more cv's at a chosen set distance along it. Also created is a CSV (Comma Separated Variable ) file for use in Blender 2.79 (Only) to create a road mesh .i3d aligned to the map terrain. The following scripts are also used in this tutorial. Spline CSV Creator Set Up Terrain Paint Set Up, Terrain Paint Terrain Height Set Up Terrain Height The second part, the Blender section deals with creating a new mesh from the CSV data and using it to create a road layout i3d aligned to the terrain of your map for import into Giants Editor. Note: There is now an add on that imports the csv file directly into Blender see https://farmerboysmodding.com/index.php?/topic/2438-blender-plugin-300-and-above-for-splinecsv-data/ Whilst at first the tutorial may seem a little complicated once run through a couple of times it will seem quite easy. All the scripts used in this tutorial, together with the installation instructions are available here. 24/05/23 --- Link to newer versions of the scripts -- these versions do not require the separate setUp scripts https://farmerboysmodding.com/index.php?/topic/2439-new-spline-paint-height-csv-field-creationdimension-panel-scripts/ Link to original updated scripts https://farmerboysmodding.com/index.php?/topic/2412-updated-spline-csv-height-paint-place-scripts/ GIANTS EDITOR Spline CSV Creator Set Up Creates in the Giants Editor User Attributes panel the required User Attributes for the Spline CSV Creator The script is executed simply by Selecting –Scripts -- Spline CSV Creator Set Up in GE --and must be initiated before executing the Spline CSV Creator script. Spline CSV Creator Creates a new Spline_CSV.i3d from an existing spline aligned to the terrain with the CSV distance set by the CSV Distance attribute in the User Attributes panel, also created is a Spline_ CSV data .txt both are placed in the new CSVdata folder created In the root folder of your map. The CSV data is automatically converted from the Giants Editor transform axis to the Blender format, X(Z) axis, Y(X) axis, Z(Y) axis, (Giants in brackets) to use with the csv Importer script in Blender 2.79 The script allows for the original spline to be created in 2D with less cv’s and away from the terrain, the new spline created can easily be used in any of the Spline Height/Paint/ Placement scripts. Create a spline and align it to the road/rail network you wish to model, naming it accordingly. The spline can be called any name as long as it has the word spline in it i.e. road01_spline, spline_2 etc, the name chosen will also be the name of the spline.i3d and spline_CSVdata.txt created in the CSVdata folder in your map root folder. In Giants Editor --Select Scripts—Spline CSV Creator Set Up which will then create the User Attributes required by the Spline CSV Creator script a ‘ ‘SplineName’ CSV Creator Attributes Created ‘ message will appear in the consol log, then, Insert your map name in the (b).Map Name attribute The full name of your map ( root folder name) must be entered (Case Sensitive) in the (b). Map Name attribute in order for the CSVdata folder to be place in the correct position (map Root Folder) Insert the required value to the (c).CSV Distance attribute. The lower the number the more cv’s and greater accuracy in alignment in Blender or when used with the Spline Placement script In the example image below its set to 5, generally a value of 5 for roads and 10 or more for train tracks (gives a smoother incline) should be sufficient, but bear in mind that this distance will be the size of your individual road/rail sections in Blender. With the spline selected Select –Scripts --Spline CSV Creator A new Spline.i3d with your chosen Spline name will be placed in a newly created CSVdata folder in the map root folder along with a Spline_CSVdata.txt file. The message ‘New Spline: road01_spline_CSV.i3d and road01_CSVdata.txt created in Manor Farm / CSVdata Folder’ will also appear in the consol log, in this example the spline has been named road01_spline and map name is ‘Manor Farm. The new road01_spline.i3d can be imported directly into the map in GE by selecting File-Import and navigating to the map CSVdata folder in the map root folder and selecting the road01_spline_CSV.i3d which will then appear at the correct location in your map. The road01_CSVdata .txt is for use with the csv_importer script in Blender 2.79(only at the moment) and can be referenced in Blender directly from the CSVdata folder. The following image shows the Attributes and log messages created when selecting -- Spline CSV Creator Set Up Spline CSV Creator finally showing the imported road01_spline_CSV, note that the imported road01_spline_CSV translation is now set at 0,0,0 not at the road01_spline settings Setting Up the map Navigate to the CSVdata folder (in your map Root folder) and import the new --your name spline_CSV.i3d The next step is to paint the terrain along the road01_spline_CSV spline. Whilst this is not strictly necessary there are two reasons to do it, the first is to paint the terrain under any road mesh with a high AI value texture such as Asphalt or Gravel, although this probably won’t be seen, it means that an AI spline need not be created along any road mesh route not covered by the main traffic or AI splines, the second is purely for indication of road and edge size when setting the terrain height along this spline (settings should roughly reference to final Blender road width). It can also gives a performance advantage by allowing a lower clip distance on the road mesh without any visual loss when viewed from a distance. First Select—Scripts -- Terrain Paint Set Up this will create the User Attributes necessary for the Terrain Paint script and also print out the terrain layers textures in the Console log. In this example the Attributes have been sets as Set Centre Texture Width 5m Set Edge Texture Width 3m (both edges) Set Edge Texture Left 102 --see print out in Console Log for GRASS Set TextureCentre 98 --see print out in Console Log for ASPHALT Set Edge Texture Right 102 --see print out in Console Log for GRASS Set Distance Between Textures 0.5 --textures painted every 0.5m Select—Scripts-- Terrain Paint and the terrain will be painted with the chosen textures the following entry is printed out in the Console log detailing the settings. Spline Name : road01_spline _CSV Texture Left :- 93 -- GRASS Texture Centre :- 89 -- ASPHALT Texture Right :- 93 -- GRASS Centre Width : 5.0 m : Edge Width : 3.0 m : Texture Distance: 0.5 Result shown in following image. To ensure any new road mesh created using this CSV spline as a base fits the terrain it is necessary to provisionally adjust the terrain height along the length of the spline using the Terrain Height scripts. Terrain height may need to be adjusted when road mesh finally completed due to relaxing/smoothing of csv mesh. Before executing the Terrain Height script ensure that you save the map and make a backup copy of your map_dem.png in case of any problems. Select Scripts - Terrain Height Set Up This will create the necessary User Attributes used by the Terrain Height script. In the image above, the inset shows the original terrain profile with a sharp drop on the right hand side and raised terrain on the left hand side so the settings below have taken this into account this allows easier blending of either edge with GE terrain tools once the Terrain Height script has been executed. Also note that the Terrain Paint User Attributes are also shown the User Attributes window this is because the map was saved before the Terrain Height Set Up script was executed so the Terrain Paint User attributes were saved in the normal way and can still be used to adjust terrain textures using this road01_spline _CSV spline. User Attribute values, Set CentreWidth 6 (m) -- size dependant on final mesh size in Blender in this case a 6m roadbed with 2m Edges giving a 1m adjustment for final blending in GE after placement. Set SplineHeight 0 (m) --spline aligned to terrain Edge Transformation ‘selected’ --allows independent height and smoothing to either edge Set EdgeWidth 3 (m) 3m edge width either side of the CentreWidth Set Edge Height Left 4 (m) raises the left hand edge by 4m to match left hand terrain. Set Edge Height Right -4 (m) lowers right hand edge by-4m to match right hand terrain Set Edge Smooth Left 10 factors the amount of smoothing on the left hand edge Set Edge Smooth Right 10 factors the amount of smoothing on the right hand edge Select Scripts—Terrain Height The effects of these values are shown in the main window of the image above also printed in the Console log is a reference detailing the settings used together with the name of the spline, in this case Spline Name : road01_spline _CSV Offset:'True' Spline Height: 0.0 Centre Width: 7.0 m :Edge Width: 4.0 m : Height Left: 4 :Height Right: -4 : Smoothing Left: 8 Smoothing Right:8 Shown bottom right in the above image Further smoothing of the edge area can be made by reducing the EdgeWidth , HeightLeft and HeightRight by 1 and re executing the script until the EdgeWidth is ‘0’ (CentreWidth value not changed during this operation) Also note that the Terrain Paint User Attributes are also shown the User Attributes window this is because the map was saved before the Terrain Height Set Up script was executed . Note: Once executed this terrain deformation cannot normally be undone, but provided you haven’t saved the map after executing the script the terrain can be reset back to previous levels by selecting the Reload i3d in the toolbar( under the Create tab) then re adjusting script values as required. If the map has been saved then the only way of redoing the terrain is to Copy/Paste your backup map_dem.png into the map data folder. Once happy with the results save the map. NOTE: Before continuing see note at the beginning of the tutorial regarding update Spline CSV Panel script which now creates a spline.obj for direct import into BLender BLENDER 3.0.0 and above I have created a new plugin for Blender 3.0.0 and above which allows the SplineCSV data created in the Spline CSV Creator script to be directly imported into Blender instead of having to use an earlier version of Blender and exporting/importing as an obj which was previously necessary. Installation Download the spline_csv_importer.zip file available at the bottom of this topic. Open Blender (3.0.0 and above) Select –Edit—Preferences –Install and in the file browser navigate to where you saved the spline_csv_importer.zip file, Select and Install the Add-on. Once installed Activate it by selecting the check box (a single Left click usually brings up the Activation and Information panel) The Add-on can also be found in the Blender Preferences panel under Import-Export: Spline CSV Importer. Spline_CSV Importer Open Blender, Select File –Import – Import_Spline Data (*txt) a File Browser Panel will pop up. ( an undocumented operator panel appear but this can be ignored it just means I haven’t documented it with Blender) Navigate to where the CSVdata folder is (your map root folder), double click to open the folder and select the relevant spline_CSVdata.txt file, once selected, select the IMPORT CSV tab in the file browser. A new Collection in the Scene Collection Panel , SplineCSV will have been created and into that the new spline_CSVdata mesh (keeping your original name) will have been placed and the new spline_CSVdata mesh will also have been created in the same position in Blender as it was in your map ready for you to work with, the image below is for reference. All subsequent imports of Spline CSV data will be appended to the SplineCSV Collection retaining their original names Note: This Add-on will only create an single edge mesh (no other type of mesh) from a txt file created in the same format as the spline_CSVdata.txt file (i.e. no header), coordinates in the spline_CSVdata.tx have already been converted to the Blender format in the CSV Creator script and can be exported as an i3d or Nurbs curves directly back into Giants Editor. Blender 3.2 and above (other versions may differ in Menu’s and settings) Do NOT change the location of your mesh, if it is changed then problems will occur in placement when exporting final road mesh. (Quick way of getting the mesh in view is with the mesh selected, in the Collections panel, select decimal point on the Keypad) In Edit Mode ,with the mesh selected open the Tools Panel ‘N’ and select Edit – Loop Tools – Relax (arrow to left of word Relax) In the dropdown Interpolation –LinearInput Iterations ‘ 1 ‘ Note: High values will result in straightening out of curves Regular –Selected And select Relax This will relax the mesh giving a smoother line along the whole mesh. Change to Object Mode, with the mesh selected –Select , Object—Convert—Curve , this converts the mesh to a curve ready for use with the Curve Tools. Select the Curve Icon in the Scene panel (green semi circle) to open the Curve Tools Panel With the curve still selected change to Edit Mode The new curve first needs to be aligned along the correct axis for the road, to do this you can either select Control Points—Tilt and type 90 or simply (Ctrl ) -- T -- 90 In the Shape panel of the Curve Tools, select 3D, Fill Mode 'Half', Curve Deform 'Radius Selected', all other settings can be left as is. Open the Geometry and Bevel Tabs Geometry Tab Extrude ‘ 3 ‘ ---this equates to a road bed width of 6 metres , half the desired width Offset ‘ 0 ‘ ---value can be left at 0 as this just raises or lowers the mesh by +-1m Bevel Tab Select -- Profile Depth ‘ 2 ’ -- this figure is the width of the road edges in metres, in this case 2 for 2m Resoloution – ‘ 0 ’ --This figure sets the number of subdivisions in the edge mesh should you wish to create your own custom or preset profile. You will note that after entering the figure in the Depth box the curve point of origin is now aligned to the bottom of the edges, this change will need to be catered for when the mesh is finally imported into GE. The following image shows the result of these transformations. Once you are happy with the basic shape, the curve deformations can now be turned into an editable mesh. With the curve selected Object Mode – Object –Convert --- Mesh The mesh can now be edited in the normal way for example adjusting the bends in the road to be smoother and adding white lines (see Enhancements at the end of the tutorial). Texture Add the texture you are going to use in the normal way One quick method I use is in the example below, Edit mode –with all the road bed faces selected UV –Reset -- adjust the UV map to fit the road bed texture (inset 1 shows full road texture ) Do the same for each of the road edges then, Edit Mode—Edge Select – and select both outside road edges and raise to a shallower angle (inset 2) Finally Export as an i3d either using the .blend filename or creating your own in File Location Open your map in GE and import the road mesh i3d (in this case it is road01_splineCSV) Rotate the ‘Y’ axis by -90 and adjust the ‘Y’ Translation of the road mesh to match the flattened terrain. Further adjustments (texturing/terrain height) of the road area can now be carried out. The image below shows the road imported and adjusted, the inset shows a magnified image of the road placement at the indicated location. Note: To enable the AI to work better with the new road mesh, the Collision Mask (Hex) should be set up as follows, Where 0: "DEFAULT: The default bit", 1: "STATIC_WORLD: Collision with terrain, terrainHeight and static objects", 2: "STATIC_WORLD_WITHOUT_DELTA: Deprecated in FS22: Do not use it anymore!", 3: "STATIC_OBJECTS: Collision with static objects", 4: "STATIC_OBJECT: A static object", Deselected is 5: "AI_BLOCKING: Blocks the AI", 6: "TRACTOR: Deprecated in FS22: Do not use it anymore!", 7: "COMBINE: Deprecated in FS22: Do not use it anymore!", 18: "AI_DRIVABLE: AI can drive over this node", The above settings are taken from the base game road mesh , although numbers 2,6, and 7 state that they are no longer used it would be prudent to include them anyway as the collision masks may have changed in later game patches. ENHANCEMENTS Adjusting and smoothing blocky curves/bends Example; Navigate to a curve section you want to adjust in the viewport Edit Mode Select the outer edges of the road sections in the bend (3 in this case) and subdivide, number of subdivisions will be dependent on smoothness required. Open the Tools Panel ‘N’ and select Edit – Loop Tools – Relax (arrow to left of word Relax) In the dropdown Interpolation –Linear- Projects vertices on straight line, Cubic uses a natural cubic spline to project the vertices Input – Parallel (all) --This will also modify any parallel vertices at the same time, if in doubt select, Section, only selected modified. Iterations ‘ 1 ‘ – No of times tool is run, higher number gives smoother results but straightens out the curve Regular –Selected –When selected vertices spread evenly along the loop Select the vertices along the edge of the curve Section, and select Relax Further smoothing can be carried out by repeating the above process on the relevant section Finally select all the vertices along one edge of the whole road mesh and then select Relax This will smooth out the whole road mesh Image below shows the various stages and images 1 and 3 show the before and after result. Adding Custom road markings. Select all the road bed faces (Shift-Alt held - select face) of your finished road mesh, change to Edge select, again with Shift-Alt held deselect left and right hand edges and Subdivide ' 1 '. Select the new centre edge (Shift-Alt held - select edge) and Shift-D to copy ' P ' Selection to separate from main road mesh, with the new edge mesh selected Object mode – Object--Convert--Curve Curve Tools panel --Shape-- Geometry and set Extrude to ‘ 0.2 ‘ (Extrude value dependent on the width of the road marking texture used) Edit mode Ctrl 'T ' -90 to correct the axis. Object mode -- Object--Convert--Mesh Add texture as normal not forgetting alpha channel settings in Blender Edit mode -Face select --select all UV—Reset -- adjust UV mesh to fit texture Texture may need to be adjust on the bends but that is easily done in the UV editing window Finally when satisfied export as i3d. To do the edge markings (if required), select the left hand or right hand edge and Shift-D to copy ' P ' Selection to separate from main road mesh and continue as above, doing the same for the other edge. Example below The previous tutorial showed two ways of creating the road mesh from the CSV mesh but I think the above method is the quickest and easiest way to get the best results. As it is possible to create a spline in Blender 3.2 and export it as an i3d you can create a set of splines aligned to the road mesh to use in the Spline Placement script and also for traffic/railway splines Using the finished road mesh as an example For Spline Placement In Edit mode, Edge Select Shift-Alt select the left or right hand road edge so all the edges are selected. Shift ‘ D ‘ to copy With the edge still selected ‘ P ‘ Selection to separate Object Mode With the edge selected -- Object –Convert—Curve Edit Mode Curve –Set Spline Type – NURBS Object mode Open i3d exporter Export Tab and ensure that Nurbs Curves and Shapes are selected Set up filename and File Location in the Output tab Export the i3d Import into map set ‘ Y ‘ rotation to -90 and Edit-- Freeze Transformation –Rotate Only (leave preserve instances selected) height settings do not matter as objects will be placed on the terrain at their point of origin. Replace any splines in the splinePlacement transform with this new spline and set up the script parameters accordingly. Example before selecting Object mode and exporting For traffic/railway splines Select all the road bed faces (Shift-Alt held - select face) of your finished road mesh, change to Edge select, again with Shift-Alt held deselect left and right hand edges and Subdivide '3 '. If creating a railroad spline then Subdivide ' 1 ' Subdivide ‘ 3’ is necessary to get the correct location for the traffic splines (midway between centre and edge). The centre edge line can be used, if required, as a new roadSpline01_CSV to adjust any terrain height after smoothing of road mesh (slight straightening of bends etc). Shift-Alt select edge to the left of the centre of the road mesh so all the edges are selected and continue as above for the splineUtilsPlace adding a further step after the ‘With the edge still selected ‘ P ‘ Selection to separate’ of renaming the mesh to traffic01_left for clarity and continue the method above. Repeat the procedure for the right hand edge. Image showing both sets of splines. Once the traffic splines are imported the Translation/Rotation needs to be set up as follows Translate ‘ X ‘ and ‘ Z ‘ to‘ 0 ‘ Translate ‘Y ‘ to a suitable value to align it just above the road mesh, in this case -1.9 Rotate ‘ X ‘ and ‘ Z ‘ to ‘ 0 ‘ Rotate ‘Y ‘ to -90 Once done freeze (Edit-Freeze Transformation) the Transformation/Rotation settings. As both traffic splines, after importing are in the same direction, traffic direction can be set by selecting the relevant spline and pressing the ‘ R ‘ key on your keyboard. All the splines once imported into the map can be edited/ expanded in the normal way. Note: Regardless of the filename you have given the spline in Blender the name in the scenegraph of GE will be the name in the Collections Panel of Blender with the suffix.001 in this case road01_splineCSV.001 Below is an example showing the road mesh, markings, together with the various splines and also objects that have been placed using the Spline Placement script (see Terrain Height, Paint Terrain and Spline Placement scripts (Updated) for details of placement). spline_csv_importer.zip
    1 point
  12. I figured it out, the TerrainShader path was not correct in my map.i3d
    1 point
  13. Paint Foliage by Spline Panel This script is slightly different to the previous version in that it only paints in one area whereas the previous script painted in two independent area’s, this has been done to increase the stability of the script and also improve the Random Foliage Paint option. The script now automatically reads the map.i3d to list in the UI drop downs, all the Foliage Type’s associated with your map so there is no longer any need to add any extra foliage/crop to the script. However the Foliage State for each Foliage Type still requires a number value (position in the Layer State dropdown in GE) To assist with this the script now reads all the Foliage States of each Foliage Type directly from the maps foliage folder xml’s and prints result to the console log and to a foliage_States.txt file in the same folder as the map.i3d for easy reference, the image below shows the extracts from console log print out and the foliage_States.txt file . The foliage states listed here are from a test map based on the US map so yours may differ depending on your map set up. The script allows for a max no of Foliage/Crop Types = 100 and max no of individual Foliage States = 20 To undo any of the Foliage Layers, Set Foliage State to '0' and ensure Random Foliage Paint is deselected then Select Paint Foliage The script ignores any entry in the Set Foliage State if Random Foliage Paint is selected Unzip the Paint Foliage by Spline.zip (found at the end of the tutorial) and place the script in:- C:/Users/Your Computer Name/AppData/Local/GIANTS Editor 64bit 9.0.6/scripts The script requires the Farming Simulator 2022 installation path , it is set at a default of “C:/Program Files (x86)/Farming Simulator 2022” If your installation path is different then, Open Giants Editor, Select -- Window --Script Editor and navigate to where you have placed the new script and select it. Once opened, in the editor go to line 30 local gInst = “C:/Program Files (x86)/Farming Simulator 2022” and replace the entry (after the 😃 with your installation path including quotes Once done save the script, the Script Editor window can now be closed as the script is now ready to be used. Paint Foliage Open the script in GE Select -Scripts –Paint Foliage by Spline Panel a popup panel will appear on the screen Set Overall Width Width of area to be painted Set Offset Paint Distance Distance either side and away from the spline to be painted e.g A setting of 10 will paint foliage 10m to the left of the spline at the width set Set Foliage Type Select Foliage Type from the dropdown Set Foliage State This number when entered refers to the Foliage State 0,1,2 etc of the selected Foliage, refer to the Foliage State print out in the console log or to the foliage_States.txt file in the map.i3d folder for the associated numbers and foliage state types. Set Second Foliage State This number refers to the second Foliage State value used by the Variable Foliage State option and is only relevant if Variable Foliage State and Random Foliage Paint options are selected Variable Foliage State When selected along with Random Foliage Paint option allows only parts of the Foliage Types States to be randomly painted, see further description below Random Foliage Paint When selected allows random painting of all the foliage States for the selected Foliage along and around the spline To delete foliage after using, Random Foliage Paint must be deselected and ‘0’ entered in the Set Foliage State box Random Foliage Distance When selected paints the selected foliage at a random distance along the Spline, width of paint is controlled by the Overall Width setting Set Distance Between Foliage Paints the foliage at the distance set along the spline, width of paint is controlled by the Overall Width setting. Variable Foliage State Option This option allows the choice of which section of the Foliage Type States are to be randomly painted along/around the spline. It is only used in conjunction with the Random Foliage Paint. For example with Variable Foliage State and Random Foliage Paint selected and the other inputs set as follows Set Overall Width - 10 Set Foliage Type – groundFoliage, Set Foliage State – 7, Set Second Foliage State – 14 It will only randomly paint foliage states 7 (cover foliage) to 14 (stinging nettles) in a path 10m long along/around the spline. To delete foliage, Random Foliage Paint must be deselected and ‘0’ entered in Set Foliage State panel. If any of the random options have been used then there will be some bits of foliage left (due to the random paint). This can easily be deleted by selecting the relevant foliage layer in the Foliage Layer Painting panel in GE and using the subtract brush. When painting foliage using the same densityMap.gdm any existing foliage it will be erased by the new foliage. Normally the ground foliage ,stone and weed use separate density maps all other foliage use the densityMap_fruits.gdm. The following images show the script in basic operations Note: The over painting at either end of the spline is due to the Random Foliage Paint which will paint the selected foliage, foliage states at random along and around the spline This can easily be deleted by selecting the relevant foliage layer in the Foliage Layer Painting panel in GE and using the subtract brush. Bear in mind the wider and longer the painting the longer the script will take to work, the Paint Foliage button will turn blue when activated, when it turns white the script has finished. As always play around with the script on a blank map to see what effects you can obtain before using on a WIP map. The next image shows a short road/lane section created using the Spline Paint Panel and the Paint Foliage by Spline Panel scripts. Paint Foliage by Spline Panel.zip
    1 point
  14. With the advent of FS22 and its new texture regime I thought I would post this as a way of creating all the necessary image textures from a diffuse image (Height, Normal, Metallic, Smoothness, Edge, AO and Specular) that will (maybe) be required. For this I am using a FREE texture programme called Materialize available here http://boundingboxsoftware.com/materialize/ The programm allows the creation of PBR (Physically Based Rendering) POM (Paralax Occlusion Map) and Seamless texture's from a suitable image and has many editing functions so many in fact that I have put a couple of youtube links at the end should you wish to learn more about the programme, there are several other good video's available on youtube as well. Unfortunately it does not open/save dds fies but only accepts/saves in the following formats BMP, JPG, PNG, TGA, TIFF and as GE accepts the PNG format it is best to set that as default by opening the Settings tab in the bottom right of the interface also while there set the Normal Map Style to Maya Style. The base image is one I took of some shingle on a little seaside trip recently and converted to seamless texture Below is an example, using the base image, of what can be achieved using the various types of image maps to create PBR/ POM textures and might help to understand the process and result In creating the following examples. This first image is of the base image on a cube with no enhancements Second is just with Height map created and applied (Show Full Material applied) Third is with a Normal Map created and both Height and Normal maps applied (Show Full Material applied) Fourth is with the Height Map removed and just the Normal map applied to give an indication of the difference a height map can make -- which is the case for most textures currently in FS19, also the FS19 terrain textures seem to use the height map in the alpha layer of the normal map to creat a PBR/POM image, downside of this method is the image needs to be saved as a DTX5 so is twice the bit size of a normal DXT1 image for the same image size (ie 512 512 DXT5 -5k--- 512 512 DXT1- 2.5k) so using more texture memory. For FS22 diffuse and normal maps, the size is 1024 x 1024 and consist of four diferrent textures for each main texture area i.e CONCRETE comprisies of concrete01,concrete02,concrete03,conctere04 each one slightly different to alleviate any problems with repeat patterns hence they also require four different normal maps Diffuse textures are basically the same as for FS19 but first have to be saved as a png with separate alpha layer before converting to the Custom BC7 format using the GIANTS Texture Tool v9.0.0 (Farming Simulator 22 (log in required for downloads) Normal maps also have to be first saved as a png file with a separate alpha layer and then converted to the custom BC7 format using the Texture Tool. Basic settings for the normal map channels in FS22 are, Red channel--Black (adjust the brightness if water/puddle effect required), Green Channel -- Height map (brightness/contrast increased by 50%), Blue Channel-- White, Alpha Channel --Height map, see the note at the end of the tutorial for a simple method. Fifth is with all maps created and applied Height,Diffuse,Metallic,Smoothness, Edge and AO (Show Full Material applied) The following image illustrates what happens if Paralax Displacement is overdone in this case increased from 0.5 to 2 Finally this is the material in GE using the created Normal Map and a Specular map created using Smoothness,AO, Edge and Height maps in the relevant Specular Map channels---- Diffuse/Normal saved as DXT5 Specular as DXT1 with height map added to normal alpha channel As this programme has many editing functions for each image and also for final set up Post Proces (Bloom/Depth of field etc) getting the best results will require some experimentation with all the settings at first, so viewing the video's linked at the bottom along with the tutorial video's on the Materialize site is a must to understand all of the programmes capabilities. A quick intro to some of the operations P -- paste from Clipboard C -- copy to clipboard O -- open file S -- Save file Show Full Material when selected show the combined effect of all the currently created images The Property Map options in the Savings Options in the top right of the screens allow you to select which maps you want to select to create your specular map A Height map must be created first and each image is dependant on the previous one so if for example after creating all the images you redo the Metallic map you will have to recreate the maps following that one to get the correct result. https://www.youtube.com/watch?v=2DhLnl_-4RY https://www.youtube.com/watch?v=hHlZ1_9-TDE Note: Normal Maps for terrain textures in FS19/22 Here is one method that can be used to create the Normal Maps for the terrain images Images for FS19 must be 512 x 512 images for FS22 1024 x1024 Save the Height Map you created in Materialize and open it in Photoshop (or any image editor that allows display/editing of Colour/Alpha Channels) Open an exsisting terrain normal map in Photoshop, concrete01_normal is a good one to use as it already has the red channel black and blue channel white plus the Alpha Channel Copy paste the Height Map image into the Alpha andGreen Channels of the concrete01_normal image With only the Green Channel selected increase Brightness and contrast by 50% Ensure the Alpha Channel is deselected and image is selected as RGB and rename and save as DXT5 (FS19) Should you wish a reflection either increase the brightness of the Red Channel which will give you reflection over all your texture or copy paste your Alpha Channel image to the Red Channel and adjust brightness to suit, this wil give a more targeted reflection You can of course create the normal map in the normal way and adjust the channel brightness/texture colour accordingly, sometimes greater definition can be achieved by adjusting the contrast of the blue channel but red always has to be black unless requiring a reflection For FS22 normal images the image has to be first saved as a png with a separate alpha layer then converted to BC7 using the Giants Texture tool GIANTS Texture Tool v9.0.0 (Farming Simulator 22 (log in required for downloads) You can also create a simulated height map by changing your custom terrain image mode to greyscale, reduce contrast by 50% and add a Gaussian blur with a radius of 1 and use that instead of the Height Map in the above method. Finally I know there are programmes out there that will probably do all this automatically but not everyone can get the Student freebie version or afford the exhorbitant subscriptions so for me FREE is best and yes even the photoshop version I use is a free legacy version (CS2) (available here https://www.techspot.com/downloads/3689-adobe-photoshop-cs2.html) which together with the free Nvidia dds plugins and the Stand alone Nvidia Texture tool is quite adequate for what I need regarding image creation/editing for Farming Simulator.
    1 point
  15. I think I've got what you are refering to with checkaboard, The image shown in paint.net is the texture with the alpha layer making parts of it transparent. Open the image in Gimp and go to the Channels tab (top Right and deselect the Alpha layer your texture should now be normal. If you now reselect the alpha layer and deselect the red/blue/channels you should then see a black and white image, the white parts are the transparent area of the image (which allows you to see the checkaboard) the black parts show the image. When creating a normal map for the ground textures the rgba channel set up are different to a normal (say building) texture see the tutorial for reference. Diffuse and height are not the same diffuse is colur height is black and white, white is the high point. To create a basic ground texture in Materialize simply import your diffuse and use the default settings for height and normal metallic should be adjusted to near enough black smoothness/edge/AO can be set using default values.
    1 point
  16. The simplest way to get 5 sections with your particular request is (using the Paint Terrain By Spline Panel script) to first set the Centre WIdth to the overall width you want the outside Grass layer to cover for example 12m Set the Centre Texture to the required texture and select Paint You then set the Centre width to the width of your Centre grass texture( i.e 4 m )and the Edge WIdth (i.e.2m) to the distance required for your gravel texture with the required textures set select paint This will give you | -------------------------12m ---------------------------| | 2m Grass | 2m Gravel | 4m Grass | 2m Gravel | 2m Grass| When painting multiple textures you should always work from the outside in Another variation with different Edge Textures Starting with 1. | 2m GrassGravel | 8m Grass | 2m Concrete | working with only the centre 6m section 2. |2m Gravel | 4m Asphalt | 2m GrassMoss| Giving you | --------------------------------12m--------------------------------------| | 2m GrassGravel | 2m Gravel | 4m Asphalt | 2m GrassMoss | 2m Concrete | Edit: This method also works if you are using the Paint Foliage by Spline script.
    1 point
  17. No, new snow meshes can only be created in Blender/Maya. However you may be able to use exsiting snow roof mesh i3ds if they fit the roof/building you have made in Blender/Maya
    1 point
  18. Just as aside I personally don't use Spline Street Constructer as I prefer the Blender method as it is much more flexible and allows creation of custom junctions. I believe Bauer Brown has recently done a 30min video using this method Further tutorial available here https://farmerboysmodding.com/index.php?/topic/2413-export-a-spline-from-giants-editor-into-blender-to-create-roadsrailways-updated/
    1 point
  19. SNOW MASK This is just a follow on from a previous post regarding the Scripts -Generate Mask script that automatically creates an indoor snow mask (infoLayer_indoorMask.grle) by mapping the collision footprint of objects in the map roads, buildings etc (placeables should have their own mask already created in the i3d). The Generate Mask script originally worked by using the water plane height (inputted manually into the script)as a base for calculations as this was normally the lowest point on the map, however this is sometimes no longer the case. The problem highlighted by Dickieboy in his post (https://farmerboysmodding.com/index.php?/topic/2446-indoor-mask/) was that the script had a preset height of 47.5m which when executed without any change caused unwanted blocks to appear in the finished grle image. I have now edited the original script and renamed it (to avoid confusion with the original) so that it now allows the mask height to be set. The updated script is available at the end of this post, to install download the Create Snow Mask.zip and unzip, copy/paste the Create Snow Mask folder into C:\Users\Your Computer Name\AppData\Local\GIANTS Editor 64bit 9.0.4\scripts To use In Giants Editor Select Scripts – Snow Mask – Create Snow Mask the following pop up panel will appear Height Setting The height needs to set at the terrains lowest point, if you are unsure of the lowest point then a simple method to find this out is to Create -_Primitives – Plane and adjust the X and Z scales so the plane fits the size of your map (2048 for a normal size map) and just lower the plane until it is no longer visible in the map. Once happy with your height settings enter the figure into the Set Mask Height panel and select Generate Snow Mask the button will turn blue to show the script is working. WARNING – The script can take a couple of minutes to work (depending on how many collisions are in the map) during this time DO NOT try and do anything else in Giants Editor as it will freeze/crash. When the script has finished the Generate Snow Mask button will turn white and the following information will be printed in the console log, in this case, Saving mask map to C:/Users/Your Computer Name/Documents/My FS 22 Mods/Mod_Map_Alpine/maps/mapAlpine/map.i3d.indoorMask.grle Snow Height Set to: 5.0 You can of course leave the height setting at 0 (zero) but, although this will work it will take a bit longer for the script to finish. The new map.i3d.indoorMask.grle will probably need to be edited as items like rocks/boulders meshes will be clear of snow. This can be done in an image editor or in Giants Editor, I prefer doing any editing in Giants Editor as I then have a reference for adjusting the edit (such as lanes and by roads which if created with a mesh will not have any snow cover) and will not have to reconvert from png to grle. To edit in GE first you will need to rename/delete the original infoLayer_indoorMask.grle in the data folder and rename the map.i3d.indoorMask.grle to infoLayer_indoorMask.grle and copy/paste into the data folder . Open your map in GE and Select the Terrain info layer paint mode then in the Terrain Editing panel –Info Layer Painting –info layer dropdown select indoorMask the State Panel will change to Outdoor and the map area will turn white (snow) with pink areas (no snow). Select Info Channel 0 map will then change to white (no snow) and partially transparent black (snow) Right click paints a no snow area Left click deletes a no snow area When finished editing save the map the new snow mask will be saved in the infoLayer_indoorMask.grle Below are some examples of the new snow masks compared with existing in game versions ALPINE Map - height set at 5 -- original in game image on the right USA Map - height set at 65 -- original ingame image on the right Another thing to note is if you have both a infoLayer_indoorMask.grle and infoLayer_indoorMask.png in your data folder at the same time Giants Editor may crash on loading. Create Snow Mask.zip
    1 point
  20. The past Year I have been teaching myself Houdini, which I thought would be the ultimate "do it all" tool for maps. 🙂 With the toolkit I've made I can create roads which will adapt to and adjust the heightmap (including AI and traffic splines) create railway tracks which will adapt to and adjust the heightmap, and create the required spline for the train system create road barriers create cascading rivers with flowmaps create field dimensions which at the same time will smooth the rough terrain beneath, and export helper objects to create all the field dimensions in one click in GE texture the map using different selectors such as slope and height, road and railroad mask scatter rocks and cliffs based on different rules scatter trees based on different rules I Have more ideas for tools in the future! Below is a sample of most of the tools combined and how one tool can dictate where the next is allowed to work. For instance a road will create a mask, which tells the tree scatter tool that it cannot spawn trees there.
    1 point
  21. From the tutorial - - https://farmerboysmodding.com/index.php?/topic/2414-terrain-height-paint-terrain-and-spline-placement-scripts-tutorials/ With this script objects can be placed at various fixed, preset distances, random distances and locations away from or along the spline depending on settings in the script. The objects will be placed at terrain height along the spline (using their individual point of origin location) from the 'S' cv to the ‘E’ cv and aligned to the to the spline along their "Z" axis (unless random location selected). e.g. if you have a hedge that is 4m long and 1m wide ensure the longest section (4m)is aligned to the 'Z' axis otherwise rotate it in GE until is aligned along the 'Z' axis and freeze transform rotation also ensure that the point of origin (where the gizmo shows when object is selected) is at the correct point For best results, open any objects you intend to place in GE and adjust axis and origin accordingly, when done , freeze transform all scale/rotation settings (DO NOT freeze transform translations unless point of origin is relocated) on all the relevant objects. This also applies to any transform groups containing objects that required to be placed using the transform group itself, select the transform group and Edit—Freeze Transformation—Transformation, Rotation and scale
    1 point
  22. In this video I show how you can have a material selection and then change colors individually. Normally you would have a chrome selection as a color then separate colors, with this setup choose your material then choose whatever color you want. Again huge thank you to dogface for helping me figure this out. YouTube video link
    1 point
  23. After testing all the scripts it seems that they all still work with the new editor. However there is a new GUI set up for scripts in Giants Editor (user attributes no longer used for variables) so I will be updating all the scripts to use this new system along with some slight coding changes for better perfomance, You can check out the new GUI system by selecting Scripts --Terrain --Painy Terrain By Spline also the Giants Editor version of the Set Terrain Height by Spline now has a smoothing option. The new editor itself seems to be a lot better regarding terrain/ foliage painting with more masking options and less jagged edges. IMPORTANT: Make sure you update the game to 1.9.1 before using otherwise there will e some strange effects in Giants editor on all maps. Regarding the new spline adjustments in GE it appears that when you press Insert to create a new cv and then ctrl B to place it the previous cv is moved, at the moment to overcome this press Insert then down Arrow before ctrl B to place. There is possibly another method detailed but I can't seem to find it at the moment.
    1 point
  24. There is another problem with the 9.0.4 version of Giants Editor that occurs when exporting terrain as an obj file. Previously when exporting you could limit what section of terrain you wanted to export by just using the viewport window a sort of what you see is what you get. Unfortunately wth this current version when you export the terrain you export the WHOLE terrain regardless of the viewport settings./position which can lead to problems with low spec computers.
    1 point
  25. Further info regarding splines. It would appear that selecting the 'E' end of the spline (which I thought denoted the End of the spline) and selecting INSERT on the keyboard the new cv is inserted BUT the gizmo does not move to the new cv setting but remains on the previous one requiring the down arrow to be selected before Ctrl B placing of the new cv If the down arrow is not selected before inserting anothe cv (on the 'E' endof the spline) the subsequent cv's will be placed back along the spline towards the 'S' cv However selecting the 'S' cv and selecting INSERT on the keyboard the new cv is inserted and the gizmo moves to the new cv location so not requiring the down arrow to be selected before Ctrl B placing I find it hard to see how this set up is an 'improvement'
    1 point