Automatic Greebler & True Normal Mapping

In here you can discuss what is going on in the project, offer help, praise or critique!

Re: Automatic Greebler & True Normal Mapping

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Fri Oct 01, 2021 12:30 am

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

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Oct 01, 2021 8:09 pm

Trevor wrote:
Fri Oct 01, 2021 12:30 am
I thought textures were bitmaps and not jpegs?
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.
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?
Exactly, either using the Geometry Shader or the Tessellator. But yes, that's exactly what I had in mind.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Fri Oct 01, 2021 11:58 pm

blue_max wrote:
Fri Oct 01, 2021 8:09 pm
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.
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.

Still, a random greebler would be pretty cool for asteroids :P

Trev

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Thu Oct 14, 2021 2:59 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.
Your focus determines your reality.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Oct 14, 2021 4:21 pm

Master Qui-Gon wrote:
Thu Oct 14, 2021 2:59 pm
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 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.

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?

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Thu Oct 14, 2021 8:12 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.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Oct 15, 2021 7:08 pm

Master Qui-Gon wrote:
Thu Oct 14, 2021 8:12 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?
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.

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Sat Oct 16, 2021 12:38 am

Ok will do, tomorrow morning....
Your focus determines your reality.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Fri Nov 26, 2021 8:50 pm

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.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Nov 27, 2021 1:17 am

keiranhalcyon7 wrote:
Fri Nov 26, 2021 8:50 pm
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.
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 test ;)

Post Reply