Automatic Greebler & True Normal Mapping
Re: Automatic Greebler & True Normal Mapping
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
I thought textures were bitmaps and not jpegs?
although I see your point, I was thinking about 8bit point filtered (pixelated).
also 255 greeble types is probably excessive, so maybe 25 and range clamp to 10. also for anything other than 0, there should only be 1 greeble in the center of the texel(s) where a difference of 10 occurs.
as for height maps, that sounds like a nice idea too, was your idea to take the underlying triangle and subdivid it by some ratio based on how close the player is and then apply the heights from normal map?
Trev
although I see your point, I was thinking about 8bit point filtered (pixelated).
also 255 greeble types is probably excessive, so maybe 25 and range clamp to 10. also for anything other than 0, there should only be 1 greeble in the center of the texel(s) where a difference of 10 occurs.
as for height maps, that sounds like a nice idea too, was your idea to take the underlying triangle and subdivid it by some ratio based on how close the player is and then apply the heights from normal map?
Trev
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Well, yes. Once loaded into VRAM, it's all bitmaps. However, JPEG is a lossy format, so that'll add some noise which in this case would cause problems. The other things is that in a shader, texel colors are in the range 0..1, but I guess there should be a way to read it as an integer in the range 0..255. Either way, that was a good idea, I can probably do that at some point.
Exactly, either using the Geometry Shader or the Tessellator. But yes, that's exactly what I had in mind.as for height maps, that sounds like a nice idea too, was your idea to take the underlying triangle and subdivid it by some ratio based on how close the player is and then apply the heights from normal map?
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Just looked at some of the textures in you effects folders and they are png - which is lossless, so apart from the 0-1 thing and filtering, the actuall textures should be ok to use as placement maps.blue_max wrote: ↑Fri Oct 01, 2021 8:09 pmWell, yes. Once loaded into VRAM, it's all bitmaps. However, JPEG is a lossy format, so that'll add some noise which in this case would cause problems. The other things is that in a shader, texel colors are in the range 0..1, but I guess there should be a way to read it as an integer in the range 0..255. Either way, that was a good idea, I can probably do that at some point.
Still, a random greebler would be pretty cool for asteroids
Trev
- Master Qui-Gon
- Posts: 1445
- Joined: Tue Oct 23, 2001 11:01 pm
Question...more so to do with Normal Mapping.
I have green channel normal maps with a greyscale alpha channel. Can I put these all in a single dat file and the game use these as true normal maps? I want to use these on the Slave 1.
I have green channel normal maps with a greyscale alpha channel. Can I put these all in a single dat file and the game use these as true normal maps? I want to use these on the Slave 1.
Your focus determines your reality.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
I haven't yet enabled regular Normal Mapping (it only works for greebles right now), but at this point it would be relatively easy to do. The alpha channel in the normal map is used to mask where the effect is applied -- but I can change this.Master Qui-Gon wrote: ↑Thu Oct 14, 2021 2:59 pmI have green channel normal maps with a greyscale alpha channel. Can I put these all in a single dat file and the game use these as true normal maps? I want to use these on the Slave 1.
Could you provide more details about what each channel does in your normal maps? I'd expect the RGB or maybe the RG channels to be the XYZ/XY components of the map, but what does the alpha channel do in your case?
- Master Qui-Gon
- Posts: 1445
- Joined: Tue Oct 23, 2001 11:01 pm
Well my originals are set in DXT5 so the RB channels are empty, the G channel is relative to Y coordinates and the alpha channel is applied to X. In this example Y obviously being the up and down (depth) direction and X determines the tangent basis. I forgot to ask did you write the shader for world space or tangent space?
Your focus determines your reality.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
So... the G channel is Y and the alpha channel is X (and I assume Z is computed from X,Y assuming that the vectors are normalized). That's quite strange to me, but OK. The normal data is expected to be in Tangent space (I assume this is the common case). You know what, it's probably better if you send me the OPT and the textures you're using. If I can take a look, maybe things will make more sense. Feel free to shoot me a PM with the details.Master Qui-Gon wrote: ↑Thu Oct 14, 2021 8:12 pmWell my originals are set in DXT5 so the RB channels are empty, the G channel is relative to Y coordinates and the alpha channel is applied to X. In this example Y obviously being the up and down (depth) direction and X determines the tangent basis. I forgot to ask did you write the shader for world space or tangent space?
Your focus determines your reality.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Impressive capability. The asteroids look great! But for the SSD, would it be possible to make those normal-mapped panel lines sharper? In the videos, with the lines as soft as they are, it looks to me like a plastic model that was hit with a heat gun.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
LOL. Yes, the lines can be sharper. You'd need a normal map with higher resolution and less filtering -- I just took whatever I had lying around to make a quick testkeiranhalcyon7 wrote: ↑Fri Nov 26, 2021 8:50 pmImpressive capability. The asteroids look great! But for the SSD, would it be possible to make those normal-mapped panel lines sharper? In the videos, with the lines as soft as they are, it looks to me like a plastic model that was hit with a heat gun.