Jump to content

[1.3 - 1.8.1] Decoupler Shroud


navot

Recommended Posts

20 hours ago, navot said:

I think the problem is probably the normal maps. Mine are red, and yours are pink... Did you generate them with the unity tools or get them from somewhere?

I just took the textures as they were from other mods (like PP/PF textures etc.) for my personal use, so the normals are just as they have been shipped.

I guess "pink is nomal".

Link to comment
Share on other sites

  • 2 weeks later...
On 4/8/2018 at 1:21 PM, navot said:

You don't even need MM for that. You can add your own textures by simply creating your own text file somewhere in the gamedata folder (so it doesn't get changed by updates) with a ShroudTexture node inside (this for example):


ShroudTexture {
	name = ExampleTexture
	texture = CustomTextures/Example
	normals = CustomTextures/Example_Normals
}

Also, if you have some good textures and want to share them, let me know.

I'm working up a series of textures/Normals for Procedural parts. I'm going to look at adding a ShroudTexture option to them so the shrouds can match the Proc Parts. The samples are below and I'm going to add a few more too.

If I use the code you shared above can I have multiple textures and choose when I'm building the craft or does DecouplerShroud only support one loaded texture?

vPtjAwt.jpg

Link to comment
Share on other sites

2 hours ago, Tyko said:

If I use the code you shared above can I have multiple textures and choose when I'm building the craft or does DecouplerShroud only support one loaded texture?

Every ShroudTexture node in the config files is used as an option in the texture switching field when building a craft, so you can switch between as many as you want in the game. Also, nice textures!

 

Quick note if you are using the latest github version, and not the one on Spacedock, I changed the way the textures are loaded (all the faces have their own textures), and the node now looks like this:

ShroudTexture {
	name = MyTexture
	outside {
		texture = MyTextures/Outside
		normals = MyTextures/OutsideNormals
	}
	top {
		texture = MyTextures/Top
		normals = MyTextures/TopNormals
	}
	inside {
		texture = MyTextures/Inside
		normals = MyTextures/InsideNormals
	}
}

You can also optionally modify the shininess and specularColor of each of the textures

Link to comment
Share on other sites

I've completed a first pass at adding support for Decoupler Shroud to my Basic Procedural Textures mod. This is a work in progress and I'd appreciate any feedback / advice / suggestions.

Note that some textures work better for smaller surface areas while others work better for larger. Try them out and let me know what you think :) 

https://github.com/TykoTek/Basic-Procedural-Textures/releases

HQFn4zV.png

Edited by Tyko
Link to comment
Share on other sites

Nice work! I think the corrugated normals are a bit too strong, but that is just my opinion. How did you generate the normal maps? Yours are more pink, and the ones I generated with the Unity tool are red.

When I changed the way the textures are handled I also wanted to add texture scaling similar to how procedural parts does it, but didn't get around to implementing it yet. I might work on that this weekend.

Link to comment
Share on other sites

I guess so, but where do those pink normal maps come from? I guess that is a DXT5nm formatted normal map after some quick googling, which does make some sense, but then why does the unity tool not generate pink normal maps when I run it?

Link to comment
Share on other sites

48 minutes ago, navot said:

Nice work! I think the corrugated normals are a bit too strong, but that is just my opinion. How did you generate the normal maps? Yours are more pink, and the ones I generated with the Unity tool are red.

When I changed the way the textures are handled I also wanted to add texture scaling similar to how procedural parts does it, but didn't get around to implementing it yet. I might work on that this weekend.

ummmm...I'm just figuring out how to make normals and I'm almost assuredly doing it wrong. I've gotten good at writing configs, so thought I'd take a shot at learning the rest. For the corrugated and the tank normals (top and bottom shown) were  appropriated from an out of date mod who's author has left the community. The middle one I hacked together from the lower half of your original striped normal  :/

I've been trying to build them in Paint.net using alpha channels...I'm sure I could get better quality if I knew what I was doing. If someone else wants to provide normals I'm happy to write up the config and overlay with the colors I've created.

I was hoping you'd add scaling controls like PP. That would likely help to solve some of the "herringbone" issue that's happening with the corrugated tank.

Edited by Tyko
Link to comment
Share on other sites

The way I created the normals was to create a heightmap which I converted into a typical (blue-ish) normal map with an online converter, and then used the KSP Unity tools, which gave me the red normal map.

If by the herringbone issue you are talking about the vertical lines not looking completely straight, that is not a problem with scaling, but a result of how the mesh is made up of triangles, on a shape that is more cone than cylinder. This gets better when you have more vertices, but then the shrouds don't fit the parts as nice (most parts only have 24 vertices on a circle)

Link to comment
Share on other sites

13 minutes ago, navot said:

The way I created the normals was to create a heightmap which I converted into a typical (blue-ish) normal map with an online converter, and then used the KSP Unity tools, which gave me the red normal map.

If by the herringbone issue you are talking about the vertical lines not looking completely straight, that is not a problem with scaling, but a result of how the mesh is made up of triangles, on a shape that is more cone than cylinder. This gets better when you have more vertices, but then the shrouds don't fit the parts as nice (most parts only have 24 vertices on a circle)

Thanks...what's the converter you're using?

Yes, I noted that the herringbone issue is less noticeable on larger shrouds where each triangle has more space to play with. I like the look on larger shrouds though, so may leave it in there an let users decide when to employ it. Conversely the Tank normal gets really repetitive on larger shrouds - I was able to tweak it for PP using the scaling controls and expect I'll be able to do the same with DS if you implement scaling controls

Link to comment
Share on other sites

57 minutes ago, Gordon Dry said:

@Tyko I tried the Basic Procedural Textures but only the two stock variants worked, the others all have been solid grey.

There was a typo in the Decoupler Shroud / inside / normals but could that be the reason? I didn't reboot KSP since I edited out the typo so I was not able to check again ...

Thanks for catching that!! It's been updated. https://github.com/TykoTek/Basic-Procedural-Textures/releases/tag/V0.9.1

 

Link to comment
Share on other sites

@Tyko I implemented some scaling and auto scaling features that should be similar to the way Procedural Parts does it.

On 4/20/2018 at 6:32 PM, Gordon Dry said:

"Pink is normal" - I said it... :D

I've done some more digging on this, and if I understand it correctly, pink is the color a normal map should be if it is saved as a DDS file, while PNG normal maps are red. So I guess the reason Tyko's normal maps worked and yours looked weird is because his normal maps were DDS files, and yours were in PNG format (haven't tested it out though)

Link to comment
Share on other sites

@navot Hmm, when my normals were PNG but pink, that they should've been DDS at the beginning - and I can assure I never would convert DDS to PNG, the other way around is definetely the way I would proceed.
That means they have always been like that (and I took them from texture packs for PP, PF etc.).

Link to comment
Share on other sites

I noted something interesting...using the same normal maps on Procedural Parts doesn't have the problem with 24 vertices and that "herringbone" issue. There's something different about the way @Starwaster coded his procedural cones.

Might be worth looking into...

Loving this mod, by the way. It's one of my go to necessities now. :)

Link to comment
Share on other sites

@Tyko I had a look at it and managed to reduce the problem without having more than 24 verts per circle, by just having more circles vertically. Procedural Parts also does this to some extent, but it also has more than 24 verts per circle, since it doesn't have to match a decoupler that typically has 24 verts.

sCcys0L.jpg

It still doesn't look perfect, and still has some squiggly lines, but PP also has that a bit if you look closely. At the moment I divide the main cylinder 20 times, but if you want to, you can raise this value in the config, to reduce the effects further.

Link to comment
Share on other sites

21 minutes ago, navot said:

@Tyko I had a look at it and managed to reduce the problem without having more than 24 verts per circle, by just having more circles vertically. Procedural Parts also does this to some extent, but it also has more than 24 verts per circle, since it doesn't have to match a decoupler that typically has 24 verts.

sCcys0L.jpg

It still doesn't look perfect, and still has some squiggly lines, but PP also has that a bit if you look closely. At the moment I divide the main cylinder 20 times, but if you want to, you can raise this value in the config, to reduce the effects further.

wow...looks great! I'll give it a deeper look later today. Nice work :D 

Link to comment
Share on other sites

@navot all your great work on the new textures gave me some ideas...I've completely retextured the procedural textures I've been working on. I got rid of a lot of the glossiness and did some actual shadowing - still learning how to do this, but I bootstrapped myself into the basic Photoshop skills this afternoon.

Please take a look when you have time:

https://github.com/TykoTek/Basic-Procedural-Textures/releases/tag/v1.0

btuFFu8.png

Edited by Tyko
Link to comment
Share on other sites

I think my understanding of how KSP deals with normal maps goes down over time... Did you make the Striped_NRM.png normal map yourself, if so how?

I'd also recommend copying the autoscale options for the top node, since your with your textures the top is just stretched around one time

Link to comment
Share on other sites

As this mod isn't really that complex, KSP updates don't tend to break it, so the mod will probably run just fine on KSP 1.4.3. If you encounter any issues with the newest version please let me know.

Link to comment
Share on other sites

7 hours ago, navot said:

I think my understanding of how KSP deals with normal maps goes down over time... Did you make the Striped_NRM.png normal map yourself, if so how?

I'd also recommend copying the autoscale options for the top node, since your with your textures the top is just stretched around one time

I have yet to make a successful Normal Map. They're totally baffling me right now. Striped_NRM.png is derived from your original, deprecated Striped_Normals_png. I lopped the top half off and stretched it back into a square  :)

Thanks for the advice about the top node. I'll add that to the next update

Edited by Tyko
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...