• 15
• 15
• 11
• 9
• 10
• ### Similar Content

• Hello all!
I'm currently designing a 2D, Puzzle/Action RPG, in a similar vein to Legend of Zelda: Link to The Past, in Unity and require a Programmer partner in which to work with me.
The project, yet to be titled, will feature:
A semi-open world, represented through pixel art, in which the player traverses to enter dungeons and advance the story. A handful of side-quests that require memorizing details and using puzzle-mechanics. A fast-paced, melee combat system that will include dodging, blocking and utilizing four different attack types that can be switched on the fly. A simple inventory of "Key Items" to be used in order to advance the story. Day & Night system and Weather Effects, with weather effecting combat.  A very simple Dialogue System to convey information via colored text. Saving/Loading via exporting and importing a physical save file. Majority of the project is already planned out, with plans to release commercially and splitting the profits equally among the two of us.
I would request that the applicant is able to work semi-independently, following an outline, and that they have experience in both C# programming  *and* putting those scripts to use inside Unity, whilst I will be creating the Art, Music/SFX and doing Level Design (Though if you are also comfortable in assisting me with these, I wouldn't be opposed.).

Work will be shared in either Github or Unity Collab (Applicants preference), with communication done via Discord.

• By AndyCo
Im looking for some project to boost up my portfolio, Im not a pro but I`m not bad at all.
Feel free to contact me.
• By Just4lol
Hello,
I'm looking for my dream teammate(s) to help me work on my Unity game. I still dont know where Im going with that project but I want to make a good final product that I would be able to sell or publish it for free on Steam.  Here a video of the prototype (The only thing I dint made is the skybox) https://www.youtube.com/watch?v=y2Otmt9jRkc
My discord : Just4lol#46982
I want somone at least as competent as me :
- I want somone with at least one year of experience in Unity (already worked with scriptable object and know oop).
- Already worked with shaders or can do editors tools is a plus.
- Can do 3d models in Blender or can do 2d art for the ui or particles effects.
- Can make soundtracks or sound effects a bonus.
Im a french Canadian so mind my english I will do my best to edit any errors I see.

• I want to calculate the position of the camera, but I always get a vector of zeros.

D3DXMATRIX viewMat; pDev->GetTransform(D3DTS_VIEW, &viewMat); D3DXMatrixInverse(&viewMat, NULL, &viewMat); D3DXVECTOR3 camPos(viewMat._41, viewMat._42, viewMat._43); log->Write( L"Camera Position: %f %f %f\n", camPos.x, camPos.y, camPos.z);

Could anyone please shed some lights on this?
thanks
Jack

• I am looking for talents to form a team of making a strategy base action game. Talents I am currently looking for are : -
(I) Unity programmer (mobile)
(II) Game designer
(III) 3d Artist
(IV) SFX Artist
The attachment is some game concept for the game. All the concept will be turn into 3d or card form. The game will be strategy game where the players can form their own team and control the units in the battle field real time to fight against each others.  If you are interested to know more details please pm me or send an email to damnwing0405@gmail.com

# "3D Decals" for roads on terrain.

## Recommended Posts

Hello! I'm not sure if this is the right place since i'm new to the forums.
I'm creating a simple "City creator" right now, and, obviously, i need to create a Road tool for it. I was planning on doing raytracing to make the road snap to the terrain geometry, but it would clip through the terrain in places with mountains or different heights.

I don't want to make a simple 2D decal because it would not look good without shape(The sidewalk is of course going to be taller and have a different geometry than the road itself) and i want to make it "bendable". I'm not the best at maths and geometry manipulation so i don't know where to start...
I'm using Unity by the way, and sorry for my bad English!

Edited by LazyDuke

##### Share on other sites

Moving to For Beginners.

##### Share on other sites

I can't be really of help since I have no idea how to make such a tool, but maybe I can point the right direction, since what you describe makes me remember this -> https://docs.unrealengine.com/latest/INT/Engine/Landscape/Editing/Splines/

So I would say you need to look into spline curves.

I didn't read it, but maybe you find some tips on how they solved those problems

Also here all their diary entries -> http://www.skylineswiki.com/Developer_diaries  you should check the 6 Mass Traffic entries, probably

Edit: nope, forget it, I read it out of curiosity and it say nothing, I was under the wrong impression that a Dev diary would always go into technical details, since I follow Factorio dev posts every week, but apparently is not the case

Edited by MarcusAseth

##### Share on other sites
18 hours ago, LazyDuke said:

the best at maths and geometry manipulation so i don't know where to start...
I'm using Unity

Like so many things Unity is missing it has no scene spline or curve tools. So you will make your own or use some made by others and allow Unity to profit from the micro transaction.

If you are willing to fall for Unity's micro transactions here is a good one: https://www.assetstore.unity3d.com/en/#!/content/61926

If not here is a old tutorial that you will need to adapt: http://catlikecoding.com/unity/tutorials/curves-and-splines/

I know this isn't much help but I am done with Unity, after spending days trying to make my own font tools I just cave and bought a set, then I bought a set of 3D model editing tools and terrain tools and brush tools.

The funny part is I don't plan on selling the game I am making with Unity and already it cost over $250 to make. All I can do now is lie to my self, convincing my self that the$250 went to artist who needed it.

##### Share on other sites
35 minutes ago, MarcusAseth said:

I can't be really of help since I have no idea how to make such a tool, but maybe I can point the right direction, since what you describe makes me remember this -> https://docs.unrealengine.com/latest/INT/Engine/Landscape/Editing/Splines/

So I would say you need to look into spline curves.

I didn't read it, but maybe you find some tips on how they solved those problems

Also here all their diary entries -> http://www.skylineswiki.com/Developer_diaries  you should check the 6 Mass Traffic entries, probably

Edit: nope, forget it, I read it out of curiosity and it say nothing, I was under the wrong impression that a Dev diary would always go into technical details, since I follow Factorio dev posts every week, but apparently is not the case

Thanks! The Splines are actually a step forward, and it's exactly what i was looking for, BUT, i still need a way to modify the geometry of the curved mesh to match the underlying terrain without clipping through it.

This is what i mean(Sorry for the 5 years old kid drawing lol):

Image 1 would be the geometry of the curved road, and the second image is the terrain wireframe. As you can see in the third image, the road doesn't have enough gemoetry to snap correctly to the terrain so it will clip through it. That's what i need help with right now.

33 minutes ago, Scouting Ninja said:

Like so many things Unity is missing it has no scene spline or curve tools. So you will make your own or use some made by others and allow Unity to profit from the micro transaction.

If you are willing to fall for Unity's micro transactions here is a good one: https://www.assetstore.unity3d.com/en/#!/content/61926

If not here is a old tutorial that you will need to adapt: http://catlikecoding.com/unity/tutorials/curves-and-splines/

I know this isn't much help but I am done with Unity, after spending days trying to make my own font tools I just cave and bought a set, then I bought a set of 3D model editing tools and terrain tools and brush tools.

The funny part is I don't plan on selling the game I am making with Unity and already it cost over $250 to make. All I can do now is lie to my self, convincing my self that the$250 went to artist who needed it.

I agree that Unity is missing a lot of very important tools that other game engines like Unreal already have, and it's a shame. I was planning on buying an asset that does what i want, but i prefer scripting it myself so i can fully understand it and make it do exactly what i want(And for free!)

##### Share on other sites

OK, so I've implemented the exact problem you are facing into, and I used splines also.  There are 2 problem spaces, you have identified both.

2 - Decals in geometry.

My solutions.

1. For spines on roads, you are on the right path.  I did something slightly different with splines.  Using a spline SPINE, I generate my geometry.  So the spine is only a guide, I create parallel splines based upon the perpendicular vectors.  I actually end up with 4 guide lines and I create 3 rows of triangles.  This gives you a decent resolution on most terrain, you can up this more if you have more detailed terrain.   That only solves part of the problem, gives you a decent approximation.  NOW...for the more interesting part, blending to your varying terrain.  The extra "rails" also allow for alpha blending per point to smooth off edges also.

2.  I actually render my spline roads to a separate back buffer texture, there is reason for this.  This is to deal with mapping to the terrain in a close approximate way.    When rendering my terrain, I sample from this buffer (as a texture) and apply to it per pixel.

This works well for forward rendering, but the limitation is that because the terrain depth hasn't been rendered before generating so z depth wont be tested.  Deferred works better as you will have access to the z depth.

I know you are using unity, so I cant offer a solution in that space, only the technique I used for decals.

My game is on the page below, its downloadable.   You will find spline decals on the waters edges, roads, decals used also burn marks.  Decals are also used for boat wakes on water as well.

Gl with this!

##### Share on other sites
32 minutes ago, ErnieDingo said:

OK, so I've implemented the exact problem you are facing into, and I used splines also.  There are 2 problem spaces, you have identified both.

2 - Decals in geometry.

My solutions.

1. For spines on roads, you are on the right path.  I did something slightly different with splines.  Using a spline SPINE, I generate my geometry.  So the spine is only a guide, I create parallel splines based upon the perpendicular vectors.  I actually end up with 4 guide lines and I create 3 rows of triangles.  This gives you a decent resolution on most terrain, you can up this more if you have more detailed terrain.   That only solves part of the problem, gives you a decent approximation.  NOW...for the more interesting part, blending to your varying terrain.  The extra "rails" also allow for alpha blending per point to smooth off edges also.

2.  I actually render my spline roads to a separate back buffer texture, there is reason for this.  This is to deal with mapping to the terrain in a close approximate way.    When rendering my terrain, I sample from this buffer (as a texture) and apply to it per pixel.

This works well for forward rendering, but the limitation is that because the terrain depth hasn't been rendered before generating so z depth wont be tested.  Deferred works better as you will have access to the z depth.

I know you are using unity, so I cant offer a solution in that space, only the technique I used for decals.

My game is on the page below, its downloadable.   You will find spline decals on the waters edges, roads, decals used also burn marks.  Decals are also used for boat wakes on water as well.

Gl with this!

It looks like just what i want to achieve!(By the way, i also love how the ocean changes quality the farther you get from it).

I'm just getting started with shaders, so i don't know how all that back buffer texture and sampling works, so i'm a little confused there. But the way i understood it, you're drawing the roads "flattened" into the terrain texture/pixel shader instead of a road model over the terrain, right? I could probably do that with the roads and just raytrace the sidewalk, i guess clipping won't be noticeable on the sidewalk since it's meant to be taller than the road. I think Planet Coaster does something similar to this.

Will i be able to use a separate shader for the roads this way? I want to do some normal mapping on them.

Edited by LazyDuke

##### Share on other sites

Yeah correct, so the roads just use RGBA back buffer which I render to.   The clipping issue will be there if you don't use deferred rendering, its the only issue with the technique I have used.  I'm not sure how Unity does its rendering if it is deferred or not, I assume it is.

For the water I use a separate texture for this also, I use render slightly different.  I use the RGB values for a normal map, so my water texture is actually a full screen normal map.  I use the Alpha value to impact "whiteness" on the water.

I actually also don't ray trace the decals, I'm using a uniform grid of height data to ascertain the height of the vertices at each point.  I interpolate between each point on the grid to ensure the height of the vertices are semi accurate.

##### Share on other sites
55 minutes ago, ErnieDingo said:

Yeah correct, so the roads just use RGBA back buffer which I render to.   The clipping issue will be there if you don't use deferred rendering, its the only issue with the technique I have used.  I'm not sure how Unity does its rendering if it is deferred or not, I assume it is.

For the water I use a separate texture for this also, I use render slightly different.  I use the RGB values for a normal map, so my water texture is actually a full screen normal map.  I use the Alpha value to impact "whiteness" on the water.

I actually also don't ray trace the decals, I'm using a uniform grid of height data to ascertain the height of the vertices at each point.  I interpolate between each point on the grid to ensure the height of the vertices are semi accurate.

Yes, Unity lets you choose between forward and deferred, and i'm using deferred for my project. I'll try to get something working, thanks! I'll ask for more help if i can't get it to work.

##### Share on other sites
2 hours ago, ErnieDingo said:

Yeah correct, so the roads just use RGBA back buffer which I render to.   The clipping issue will be there if you don't use deferred rendering, its the only issue with the technique I have used.  I'm not sure how Unity does its rendering if it is deferred or not, I assume it is.

For the water I use a separate texture for this also, I use render slightly different.  I use the RGB values for a normal map, so my water texture is actually a full screen normal map.  I use the Alpha value to impact "whiteness" on the water.

I actually also don't ray trace the decals, I'm using a uniform grid of height data to ascertain the height of the vertices at each point.  I interpolate between each point on the grid to ensure the height of the vertices are semi accurate.

Okay, so i ran into a problem...

My project is a small "city builder", and the player will modify the terrain(I got the terrain tools already covered). If i simply let the player draw the road with the spline system, if they set the start and end of the road to have a mountain in between, the road will go through the mountain.

With the back buffer technique the road will still be drawn over the terrain, but it will look weird, right? Or did i completely misunderstand it?