I need help with editing prefabs

SCS Software ATS and ETS2 editing using ZModeler3 filter. Models, Materials, Animation.

Moderators: Oleg, _RicH_

Re: I need help with editing prefabs

Postby brainiac » Tue Dec 05, 2017 3:48 am

This isn't fair!!! I tried to check and uncheck "Affect children" and in both case new AI lane is curved.
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Tue Dec 05, 2017 9:20 am

may be you do something in a wrong manner?

rotate_splines.gif
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Tue Dec 05, 2017 9:53 am

I will try to solve it later.
Now I am making new prefab and how to create connector node?
I see that border splines are green and bold in hierarchy. How to make it?
Is copying existing node and border from another prefab safe?
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Tue Dec 05, 2017 10:59 am

in most of cases copying prefab elements from original prefab is safe. you just have to follow prefab editing rules when apply changes. E.g. all AI lanes have to be connected via shared point on junctions/split points, as well as connected to border prefab with shared points.

border spline is a mixture of AI in/out connection spline and a terrain border splines. This object is created as Compound component with default state (no state buttons pressed) associated with AI in/out spline; other states specify splines for terrain connection (possible different variations depending on sidewalk availability and its width). AI in/out spline should start with shared points of outgoing (out from prefab) AI lanes, followed by shared points of incoming (onto prefab) AI lanes.

You can use "Dismiss" button on any border spline to see what components is it made of. then undo changes and switch state buttons to see how this works.

Check the video for compound objects to get used how to create them.

P.S. in your example .z3d file, border spline have two "Default" variants in it. I think it is wrong. The only "default" variant on a border spline is the one that has no state buttons associated with it ("Default" button on Structure panel should not be toggled/used for border spline). Your border splines have correct in/out connection for correct default state, and the secondary "Default" state seems wrong to me.

However, if this is a native game border configuration, I assume it should work properly this way too. At least this is not an error, just something that feels like it is wrong.
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Tue Dec 05, 2017 12:14 pm

And that solution is finally correct. Thank you.

As copying is almost surely safe, I will stick to it. In lot of things I improvise.
Do you really know to create prefab from scratch or you just use knowledge of program?
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Tue Dec 05, 2017 1:01 pm

I don't mod games or create any game content. I explore original game content (and in some rare cases apply some modifications to find out how this works in game).
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Wed Dec 06, 2017 8:46 am

I think that I won't be able to copy elements, so:
How to make connector nodes?
How to make navigation paths?
How to make collision from certain surface?
How to make prefab visible on game world map (gray roads on black background)?
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Wed Dec 06, 2017 10:13 am

consider utilizing original prefab as it is way more simpler to do than the stuff you ask above. may be create some test mods with original prefabs by adding some AI lanes, messing around with navigation, border and connectors. creating prefab from scratch is only possible when you know the subject and settings quite well.

connector nodes and locators are dummy nodes, created with "Dummy Helper" button in primitives toolbar.
AI lanes, navigation paths and border are splines, created with spline tools.
collision surface is generally a simplified geometry object created by removing redundant polygons and vertices.
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Wed Dec 06, 2017 11:05 am

How to separate some triangles from surface to new object?
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Wed Dec 06, 2017 11:18 am

select, modify\submesh\detach [options: to new object = on]
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Wed Dec 06, 2017 11:38 am

Why navigation paths are purple in SCS' prefabs?

Oleg wrote:when you know the subject and settings quite well.

That is what I want.

Tonight I achieve 1. great success! Vehicles are going through my prefab! Thank you for the biggest help on forum.
But work isn't over...

I made borders as compounds like I saw in imported prefabs, but terrain isn't generated as expetced. Instead of normal on spline, it has obtuse angle.
Next, first 3 lanes are curved, but fixed. When I first made them, they was straight. Then I make terrain splines and compound borders and after that I created again those lanes (1,2 and 3), even I made all border splines again, but I can't return them straight.
http://sharemods.com/vmqthw41wi7e/6x3_o ... g.z3d.html

After I solve that, I want to deal with materials. But if you have quick solution, every help is appreciated.
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Thu Dec 07, 2017 12:41 am

color of splines is insignificant. you can change it in spline's properties window.
border splines should have local axes at 0,0,0 point, you should use "Display\Local axes\reset to world" tool. Not sure whether this is the cause. border splines should have points in regular basis, approximately 4-6 meters, so border will have more terrain polygons and terrain texture will not stretch alongside of prefab.

concerning the curvature of AI lanes, all AI lanes have to be created as Bezier curves, even when they are straight lines (control vectors should be in each AI spline point). The curvature drawn in viewport depends on spline (control point) properties. In particular, select all control points of spline, and disable "Auto detail" in properties; then set Detail in properties to something like 8 or 12.
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Thu Dec 07, 2017 3:09 am

If I rename polygins Tran 2 and Tran c to Tran_2 and Tran_c, game crashes when I try to add prefab. Game.log says some index out of boundaries.

I solved problem of curved first 3 lanes during rotating prefab. When I make splines, I must click and drag while creating start and end point. Remember this.
Now, my question is, how I can set ceratin rotation of pointand length of dragging?

Oleg wrote:border splines should have local axes at 0,0,0 point, you should use "Display\Local axes\reset to world" tool. Not sure whether this is the cause. border splines should have points in regular basis, approximately 4-6 meters, so border will have more terrain polygons and terrain texture will not stretch alongside of prefab.

I can't explain how, but now terrain is perfect now.

I imported exsisting prefab and materials was ok on it. Then made my prefab, but when I assign materials from imported prefab, all are grey.
Last edited by brainiac on Fri Dec 08, 2017 4:14 pm, edited 2 times in total.
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby brainiac » Thu Dec 07, 2017 11:03 am

Please, delete this post.
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 08, 2017 9:20 pm

brainiac wrote:If I rename polygins Tran 2 and Tran c to Tran_2 and Tran_c, game crashes when I try to add prefab. Game.log says some index out of boundaries.

in most of cases, the crash problem should be isolated to some object by removing objects from scene and keep exporting until you reach a working model in game. locating a problematic object (or may be a problematic material) is half of the job to get crash fixed. Also, an entire row of game log text being quoted will give more info than arbitrary "index out of boundaries".

Now, my question is, how I can set ceratin rotation of point and length of dragging?

not sure what you mean by certain rotation of point and length of dragging? you can adjust curve on manipulators level by dragging control vector. when point is created with click-and-drag method, it will have a control vector that you can use later to adjust the curve shape.

Oleg wrote:I imported exsisting prefab and materials was ok on it. Then made my prefab, but when I assign materials from imported prefab, all are grey.

where are they grey, in ZModeler? or in game? have you checked the exported materials in export folder (.mat are text files, you can view and edit them with nodepad)? are all objects got messed or just few of them (all materials wrong or just few?) you can move geometry objects away to avoid overlaps and detect the problematic one. the only grey material being used is "shadowonly" and it should not appear on screen while rendering, as it is used for rendering dynamic shadow volumes only. Have you copied original (imported) materials or used them as is (assigned original materials) ? try assigning materials one by one onto all geometry objects, just select all objects and assign one material onto them, export and test, then another material and so on. At each step you can verify .mat file to ensure it is correct (e.g. compare to original .mat file).
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 08, 2017 11:24 pm

If I not give such names to polygons, game doesn't crash. I will send later full row from game.log.

Polygons are grey in Zmodeler.
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 08, 2017 11:32 pm

you should inspect properties of these polygons to find out what material is assigned onto them. in most of cases the cause in a material being used.
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 08, 2017 11:59 pm

I imported existing prefab with properly assigned material. I saw it in perspective view.
I assigned materals from that prefab to my prefab and I saw in perspective view only different grey colors. I will send you saved file when I come home if you need.
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Sat Dec 09, 2017 12:47 am

post a screenshot here. your .z3d file might be with no textures, so I might not spot the problem.
perfectly, a .z3d with a set of textures should be sent. there are different possible reasons for textures not being shown on a model even with a properly configured material. a missing or invalid UV mapping on a geometry is the most common issue.
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Sat Dec 09, 2017 10:55 am

I think that I found what I must to do to make terrain ok. Nodes must be in clockwise order. Remember that.
So, only materials and I am prefab maker.

I started to use UV mapping. I want to make 3 curved AI lanes straight in UV mapping view and then assign them textures.
http://sharemods.com/545eiri6b5t2/6x3_o ... r.z3d.html
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Sat Dec 09, 2017 11:26 pm

yes, nodes have to be in CCW order. as well as border spline should go in CCW order when viewed from top.

the asphalt lane in your file is not accurate. at least you will have a very bad time trying to uv-map it. avoid very long and tiny triangles, they can stretch texture across in an unintended way. First, you should fix the polygons layout using Modify\Flip tool on edges level. it might be hard for the first time, but once you know what this tool does, you will do it quite well. then you can uv-map this lane from top view ("Generate new + Viewport XY"). then edit in uv-mapper using: select vertices on left side and use "Align vertically", then select right-side vertices and "align vertically" them too.

asphalt_lane.jpg
Attachments
asphalt_lane.rar
(1.03 KiB) Downloaded 1 time
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Sun Dec 10, 2017 1:40 am

Why sometimes when I UV map some polygon, I don't see texture?
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Sun Dec 10, 2017 5:17 am

polygon should be assigned to a material with associated texture. mesh object should have at least 1 uv channel. texture in material should use "Manual UV Mapping #1" (assuming you are editing UV#1). options of viewport should have "Textures" toggled on (by default they are always toggled).
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Tue Dec 12, 2017 3:26 pm

How can I see exact rotation of point on spline or whole spline without using trigonometry?
brainiac
 
Posts: 46
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Tue Dec 12, 2017 10:36 pm

not sure what do you mean by rotation of point on spline.. at least none of infos/helpers come to my mind when I read your question, I guess there are no such. You can create a set of helper locators/dummy nodes or other objects before you create a curve, so the curve will represent correct turn angle or whatever you need it to be.
User avatar
Oleg
Site Admin
 
Posts: 7828
Joined: Fri Feb 06, 2004 3:54 am

Previous

Return to ATS and ETS2 by SCS Software

Who is online

Users browsing this forum: No registered users and 1 guest