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 » Thu Dec 14, 2017 12:27 am

How to add road edge (sidewalk, curb) and railing (bridge) to prefab?
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Thu Dec 14, 2017 9:57 am

The visual part of prefab can contain a model of sidewalk and curb if I'm not mistaken. The railing is created in game map editor, I doubt these are part of prefab model.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Thu Dec 14, 2017 10:55 am

I know that visual part of prefab can contain curb and sidewalk, I saw them on SCS prefabs. But I don't know how to add them.

This is probably the hardest question and my last big obstacle.
I learned how to make completely funcional streets and prefabs (they are tested), but I am still struggling with textures. I do all what you said, know how to assign textures, but still don't have what I need.
I want to my prefabs and streets have compatible look with FLDs (prefab maker, not for SCS, I am learning from him and you) and SCS roads and prefabs. We use same materials and textures and I don't understand why I get different results.
Let focus only on FLDs work. I imported his prefab:
http://sharemods.com/ymijj9u55tv3/example_FLD.z3d.html
Firstly, in that file, I deleted FLDs content and made new prefab. I think that when I assign materials, I should has same look as FLDs, but it isn't case. Whole time, it looks like this:
Image
Note: I UV mapped only 6 lanes, don't look at other polygons.
Later he sent me few pictures with settings, his base file with textures:
http://www.mediafire.com/file/ate3ac37i ... t_long.z3d
and upper picture didn't change.

If you will solve that, I will be able to finish streets and prefabs, leave Blender (although it is free) and accept Zmodeler for making streets and prefabs.



This is same road, only different ofset. How to properly connect them?
Image
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 15, 2017 8:08 am

first of all, you should explore associated material settings to see what texture detail layers depends on. DETAIL and DETAIL2 are generally the only slots of your interest, but they could have quite a lot of settings that can make material look different on different objects. First of all, check "Use UV Mapping:" entry. if any of slots contain "Manual UV#2", your geometry object should have correct UV#2 generated (quite unlikely for prefabs and terrain). Second, inspect a group of settings "Transition" and a group of "Layer Output". Both might define specific behavior/dependency of texture layer.

For example, dual-texture material might have DETAIL to depend on Vertices Color -> Alpha, and DETAIL2 texture layer output depend on Vertices Color -> Inverted alpha (1-A). In such a setup, texture DETAIL will fade to DETAIL2 texture with respect to per-vertex alpha value. take a look at this video:
https://www.youtube.com/watch?v=9WFzWvqrgnU

Finally, geometry per-vertex color in SCS models is used for ambient occlusion pre-shading wth RGB 192,192,192 being ordinary ambient zero (values above are over-bright in game, values lower it will be darker like in shadow). Most of newly-created geometry or imported geometry in ZModeler has 255,255,255 per-vertex color, so your prefab model might look different even while utilizing the same material as original game model.

you can toggle off "Textures" in prespective viewport options to compare geometry vertices color.

Edit: also, it is worth to inspect UV-mapping layout of original prefab lanes across road textures, so you know how to map them properly, as your screenshots looks like have a completely wrong uv-mapping for a given road texture.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 15, 2017 9:06 am

I was changing colors in color parameters without result.
Last paragraph: How to insect that?

I don't see material on UV mapper view.

And in last posts are 2 less important questions:
I know that visual part of prefab can contain curb and sidewalk, I saw them on SCS prefabs. But I don't know how to add them.
This is same road, only different ofset. How to properly connect them? (with picture)
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 15, 2017 9:18 am

brainiac wrote:I was changing colors in color parameters without result.

if per-vertex color paint does not give any effect, object's "Mesh -> vertices -> Format" property might be missing "Primary color" option. In all other cases changing per-vertex color should take effect both in game and in ZModeler. for a test paint to black, red and blue colors randomly (paint on vertices level).

brainiac wrote:Last paragraph: How to insect that?

I meant just take a look at original mapping. Surface->Edit UV -> "Keep Old mapping" does this.

brainiac wrote:I don't see material on UV mapper view.

material in uv mapper view is shown only after an action of "Edit UV" tool, when some edit-uv patches/fragment are generated. UV mapper will let you choose a material/texture to display (among materials used on these edit-uv patches). until you use Edit UV, uv mapper will not show any material or texture.

brainiac wrote:And in last posts are 2 less important questions:
I know that visual part of prefab can contain curb and sidewalk, I saw them on SCS prefabs. But I don't know how to add them.
This is same road, only different offset. How to properly connect them? (with picture)

I don't know how the game builds the road geometry. is it associated with some geometry (pmd/pmg/ppd) file?
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 15, 2017 9:24 am

Roads: Only pmg and pmd. When you import some road, there are only polygons.
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 15, 2017 9:45 am

does this road model work fine after being import/exported? e,g, delete some vertices, export, pack into a mod and see whether actual changes take place in game.

also, does the game pick different road model file when you change offset in game editor? i guess it has different models with build-in different offsets. I doubt game changes offset dynamically on the same geometry model. At least I'm sure the game can not do this on prefabs like forks and crosses, so you have to create different 3d models.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 15, 2017 10:00 am

I didn't change existing roads, only made new and they work fine.
Each road with each offset is defined in def file. Here is content of my:
Code: Select all
road_look : road.2o_brainiac {
   name:          "street 2 oneway"
   template_right:      "/road_template/street/st_2_ow.pmd"
   
   lanes_right[]:   traffic_lane.road.divided
   lanes_right[]:   traffic_lane.road.divided
   
   lane_offsets_right[]:   (0.5, 0)
   lane_offsets_right[]:   (-0.5, 0)
}

road_look : road.220_brainiac {
   name:          "street 2+2 0m"
   template_right:      "/road_template/street/st_2.pmd"
   template_left:      "/road_template/street/st_2.pmd"
   
   road_offset: 2.0
   lanes_left[]:   traffic_lane.road.divided
   lanes_left[]:   traffic_lane.road.divided
   lanes_right[]:   traffic_lane.road.divided
   lanes_right[]:   traffic_lane.road.divided
   
   lane_offsets_left[]:   (-0.5, 0)
   lane_offsets_left[]:   (-1.5, 0)
   lane_offsets_right[]:   (-0.5, 0)
   lane_offsets_right[]:   (-1.5, 0)
}

In previous picture, I have 2 roads, All code is same except 'road_offset'.
SCS roads with different offsets can connect fine , but they make roads in Maya. Left 2 pieces are 4m offset, right 2 pieces 11m offset:
Image
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 15, 2017 10:18 am

they appear to use the same model for left direction and right direction road fragments, just move fragment to a different offset from road center. I think it should work fine after editing in zmod, have you tested it? at least I doubt there is anything specific in such a model file so the game can build road with different offset using the same road template model file.

what exactly does not work when you make a road? have you used original .sii files in first place, as it seems they are quite likely to be the cause of problems (assuming the game is able to build road from your template).

Edit: may be I'm just not getting the point of the problem? what exactly is wrong with newly-created or edited roads?
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 15, 2017 10:53 am

Oleg wrote:
brainiac wrote:Last paragraph: How to insect that?

I meant just take a look at original mapping. Surface->Edit UV -> "Keep Old mapping" does this.

I finnaly see difference between FLD and me. I will probably solve problem.
I was watching to his prefabs and roads in game. How he always have same UV mapping? If I don't look to prefab elements, I can't see edge of prefab.
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 15, 2017 11:10 am

I'm not quite sure he does prefabs with ZModeler, if I'm not mistaken he creates ppd files with ZModeler, not the 3D model itself. However, I assume you can make prefabs of scs quality with zmodeler using proper materials setup, uv mapping and painting.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 15, 2017 11:19 am

We are in contact. He do completely opposite: Create model and set materials with Zmodeler and use PPD edit for rest of job.
I make models in SketchUp (I uset it many years ago and it is very easy) and want to do rest in Zmodeler.

After last post, I did more different things, but texture is still much brighter than it shlould be. I think if I solve that, I will be able to map in any way and it will looks good.
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 15, 2017 12:02 pm

send me the .z3d file with the model (that has bright appearance in game). and quote here a zmodeler-generated .mat file for associated material.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 15, 2017 12:56 pm

Here is one of (all my) z3d file with bright textures:
http://sharemods.com/d71vatncpzjj/6x3_o ... r.z3d.html
Here isn't only one material, but whole mod, with all my prefabs, streets, materials and def .sii files:
http://sharemods.com/kp1grufa096u/Road_ ... r.scs.html
There are 16 road looks, so that is better.
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 15, 2017 2:51 pm

Oleg wrote:they appear to use the same model for left direction and right direction road fragments, just move fragment to a different offset from road center. I think it should work fine after editing in zmod, have you tested it? at least I doubt there is anything specific in such a model file so the game can build road with different offset using the same road template model file.

what exactly does not work when you make a road? have you used original .sii files in first place, as it seems they are quite likely to be the cause of problems (assuming the game is able to build road from your template).

Edit: may be I'm just not getting the point of the problem? what exactly is wrong with newly-created or edited roads?


My sii file has all elements which has original sii file.
I think that weird models by SCS are responsible for good connection between 2 different offsets. I must play with it to see what is happening. I thought that you know answer. I will mostly use one way streets when there is space between driveways. You know how often streets change number of lanes. Making fork prefabs with two-way streets is pointless.

I have problem with navigation on prefabs. I did same as I saw on existing prefabs, but game can't calculate routes through my prefabs. Even, when I export and import my prefab, navi splines become 1 polygon.
Also, when you look at mini-map, my prefabs look ugly. I think that the reason is same.
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Sat Dec 16, 2017 10:36 am

doh.. i've been messing for several hours with your file as it has failed to load to me indicating some (texture storage) errors inside in a couple with fragments compression problems. and finally I've found out it's just a messed download. redownloaded your file again and was able to open it fine. will inspect your scene shortly.


Edit: yes, your geometry has 255,255,255 RGB on vertices. this geometry will be significantly brighter than original SCS models.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Sun Dec 17, 2017 1:08 am

That is great, but how to change that and see in game?
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Sun Dec 17, 2017 1:36 am

switch object to vertices level, pick surface->paint->color, expand options and press "Pick from vertex" and click on any vertex. you will see a white color will be read from vertex; change it to 192,192,192; select all vertices and press "Fill selected" button.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Sun Dec 17, 2017 3:51 am

That is solution for my biggest problem. Thank you very much!
Now:
I have problem with navigation on prefabs. I did same as I saw on existing prefabs, but game can't calculate routes through my prefabs. Even, when I export and import my prefab, navi splines become 1 polygon.
Also, when you look at mini-map, my prefabs look ugly. I think that the reason is same.
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

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

have you checked the prefab editing guide? there were no changes in navigation if I'm not mistaken. The very latest game version has some navigation improvements for multi-lane prefabs, but this should not be the main cause of the problem (as game converts old prefabs to new style during loading a model).

the guide is here:
viewtopic.php?f=23&t=6487&p=36390&hilit=prefab#p36390

Some info there is obsolete, but navigation section is generally correct to the moment.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Tue Dec 19, 2017 6:16 pm

I did all what I read except polygons (added width, link and route) and navigation still doesn't work for rigth turn:
http://sharemods.com/zer5evjog9zk/5x4_o ... 2.z3d.html
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Tue Dec 19, 2017 10:35 pm

I don't know much about navigation and GPS stuff in game, but according to original prefabs (e.g. form_templ/hw2_one_way_joint_tmpl, the road split should have navi lanes of Y shape instead of V shape. The Y shape with each point marked with route and link to respective road end (node) index, and the middle point marked with route 0,1,2.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

Re: I need help with editing prefabs

Postby brainiac » Fri Dec 22, 2017 10:41 am

1. GPS can find only straight route, not right turn.
2. When I export and import, the shortest path (of 3) have different direction and its 2 nodes don't have width option.
http://sharemods.com/8aygs60kakl5/6x3_o ... g.z3d.html
brainiac
 
Posts: 69
Joined: Tue Jan 31, 2017 2:18 am

Re: I need help with editing prefabs

Postby Oleg » Fri Dec 22, 2017 11:59 am

i can't download your file. keep redownloading and get a corrupt file on each attempt.
User avatar
Oleg
Site Admin
 
Posts: 8058
Joined: Fri Feb 06, 2004 3:54 am

PreviousNext

Return to ATS and ETS2 by SCS Software

Who is online

Users browsing this forum: No registered users and 2 guests