Hardware [Question] d Can the 3DS do normal mapping?

PlayerSlayer69

Member
Newcomer
Joined
May 7, 2023
Messages
19
Reaction score
5
Trophies
0
Age
29
XP
239
Country
Canada
Because searching up it’s GPU. You’re able to find a list of Maestro functions that it could do and Bump mapping is one of them but what about normal mapping? I’ve seen people who know a decent amount about technology that said the 3DS does have normal mapping and bump mapping at the same time. Although the Wikipedia page does say the 3DS does support Dot3 Bump Mapping/Normal Mapping so to an extent it does but likely a much older and less modern technique of it. I have seen games like Jett Rocket 2 and Ironfall invasion that seem to have some sort of Normal mapping trick that probably can’t be done with bump mapping or Dot3. But hey let me know or not
 
Because searching up it’s GPU. You’re able to find a list of Maestro functions that it could do and Bump mapping is one of them but what about normal mapping? I’ve seen people who know a decent amount about technology that said the 3DS does have normal mapping and bump mapping at the same time. Although the Wikipedia page does say the 3DS does support Dot3 Bump Mapping/Normal Mapping so to an extent it does but likely a much older and less modern technique of it. I have seen games like Jett Rocket 2 and Ironfall invasion that seem to have some sort of Normal mapping trick that probably can’t be done with bump mapping or Dot3. But hey let me know or not
is something like this https://gbatemp.net/threads/wip-rehid-button-remapping-for-3ds.585387/ what you are after?
 
Yes, both are very much achievable on hardware as you've already seen in some games.

To achieve dot3 bump mapping, you need to configure a texture combiner stage to use dot3rgb(a), setting the texture and primary color as the source operands, then pass an object-space (rainbow-colored) normal map to the relevant texture slot and a directional light vector to the primary color (you'll calculate and pass these in the vertex shader). It's a very old technique, and won't look nearly as nice as true normal mapping, but I imagine it also has decent performance over the latter since the operation is done per-texel and not per-pixel.

True normal mapping with a per-pixel light is a little more difficult, but devkitpro provides an example of how to do this. The PICA200 only has a fixed-function pixel pipeline, but provides necessary fragment lighting extensions that are enough to achieve the effect. I'm still a bit sketchy on the details, so I'd advise taking a look though the sample code I linked to get an idea of how it's configured, but it seems very similar to configuring the texture environment, but for per-pixel lighting instead (and this time, you would pass the more well-known blue/pink tangent-space normal map to the texture slot)
 
Last edited by Voxel,
Yes, both are very much achievable on hardware as you've already seen in some games.

To achieve dot3 bump mapping, you need to configure a texture combiner stage to use dot3rgb(a), setting the texture and primary color as the source operands, then pass an object-space (rainbow-colored) normal map to the relevant texture slot and a directional light vector to the primary color (you'll calculate and pass these in the vertex shader). It's a very old technique, and won't look nearly as nice as true normal mapping, but I imagine it also has decent performance over the latter since the operation is done per-texel and not per-pixel.

True normal mapping with a per-pixel light is a little more difficult, but devkitpro provides an example of how to do this. The PICA200 only has a fixed-function pixel pipeline, but provides necessary fragment lighting extensions that are enough to achieve the effect. I'm still a bit sketchy on the details, so I'd advise taking a look though the sample code I linked to get an idea of how it's configured, but it seems very similar to configuring the texture environment, but for per-pixel lighting instead (and this time, you would pass the more well-known blue/pink tangent-space normal map to the texture slot)
That is the specific one I was talking about. I am planning on making a game for the New 3DS once the shipping is successful and it ends up in my doorstep. Normal Mapping is quite a god send for an outdated GPU the New 3DS has.

Now I’m wondering what are some modern GPU techniques that isn’t possible or costly to implement in the New 3DS hardware. Like I’m wondering if New 3DS is capable of doing some form or Ambient Occlusion, Global Illumination or Displacement Mapping like its 8th Gen Home console counterparts. Asking since I already made a few games in Unity and wonder if this all possible or worth the implementation. All I know is the 3DS has a strong set of Maestro Functions with GPU techniques that are still used in Modern games and are pretty much the norm
 
That is the specific one I was talking about. I am planning on making a game for the New 3DS once the shipping is successful and it ends up in my doorstep. Normal Mapping is quite a god send for an outdated GPU the New 3DS has.

Now I’m wondering what are some modern GPU techniques that isn’t possible or costly to implement in the New 3DS hardware. Like I’m wondering if New 3DS is capable of doing some form or Ambient Occlusion, Global Illumination or Displacement Mapping like its 8th Gen Home console counterparts. Asking since I already made a few games in Unity and wonder if this all possible or worth the implementation. All I know is the 3DS has a strong set of Maestro Functions with GPU techniques that are still used in Modern games and are pretty much the norm
I'm not a graphics guy so I don't really know any techniques but something you should definitely look into is the pica200's procedural generation function, afaik no software actually used it but it can be used to make resolutionless textures and do a bunch of other neat stuff (and in DMP's demo, it looks pretty good)
 
That is the specific one I was talking about. I am planning on making a game for the New 3DS once the shipping is successful and it ends up in my doorstep. Normal Mapping is quite a god send for an outdated GPU the New 3DS has.

Now I’m wondering what are some modern GPU techniques that isn’t possible or costly to implement in the New 3DS hardware. Like I’m wondering if New 3DS is capable of doing some form or Ambient Occlusion, Global Illumination or Displacement Mapping like its 8th Gen Home console counterparts. Asking since I already made a few games in Unity and wonder if this all possible or worth the implementation. All I know is the 3DS has a strong set of Maestro Functions with GPU techniques that are still used in Modern games and are pretty much the norm
This is the Pica 200 GPU demo. This is the 3DS GPU at work


Lambert, phong, specular, reflective, normals, Alpha, Environment and Cube Mapping. Baked and Dynamic lights are what I see in the demo; of course the sample environment is tiny so you can display all the goodies in 1 shot. You will be scaling things for larger environments.

To answer your question Occlusion, Global Illum *real time I assume?* and Displacement...or do you mean parallax? I haven't seen Parallax in hardware though I think it would be way to expensive to process per frame. I am doing some tests to see if it is possible...

Displacement like an animated sinewave effect ( vertex animated ) is possible. As for a 255 greyscale map ( bump map ) distorting geo "Displacement" The 3ds does have a tessellation shader. If you use the Pica 200 shader language I know it can be accessed. No idea if it works with bump maps, never messed with it. I know it would be a bit limited but the tech is in there.

For Unity 3DS sadly no to all..except maybe the parallax shader... I'll update this when I know more...
***update**
Yeah no Texgen so for Unity def no :P

Remember though that the 3DS renders the top screen twice at an offset to generate that 3d effect. That would means twice the Occ, Illum and Disp calculations per frame.

Some suggestions:
To get the effects you describe you can Bake occlusion into textures, Bake Global Illum - it will be static :sleep:. I'm old so I remember a world before global Illum existed which is why I say it can be setup and baked. Also remember that you have 3 active MB of Vram for the top and another 3 for the bottom screen. you will have to squeeze those textures alot. Most of the wishlist requires extra textures per shader + Mips. The rule with the 3DS is bake everything down and try to avoid per frame visual effects. I equate the 3ds to a PS2.5, it can do some limited console era equivalent effects but you going to optimize! Its going to make you boys strong!

Custom Engine and Normal Maps:
As for normals if you are using a proprietary engine, Normal maps are possible using The Pica shader language to make the effect. Mario Kart on the 3DS uses normals. Look at the games Banner "main menu 3d icon" and pay attention to the tires. Those are normals on the tires.

Unity and Normal Maps:
If you are using Unity the answer is ...sorta...You will have normal maps but they wont process in tangent space but rather in object space.

Voxel is right, dot3 bump mapping can be done via the texture combiner. but its not normal mapping the way the youth know it :lol: . dot 3 does not interact with dynamic lighting since that is a per pixel calculation; not possible thanks to unity removing support for some fixed function shader functionality. Ie Tex Gen. Which from what I understand could be used to make a new matrix in the combiner shader.

https://docs.unity3d.com/560/Documentation/Manual/UpgradeGuide5-Shaders.html#:~:text=Unity 5.0 removed support for this fixed function shader functionality: UV&text=(dot3, dot3rgba). Any of the above will do nothing now, and shader

This ironically hamstrung Unity when it came to 3DS shader conversion and tangent space normal maps. :glare:.

This ancient text talks about what Voxel mentioned using the Dot 3 Bump - if you can translate it to ShaderLab it works ;)

https://www.oreilly.com/library/view/iphone-3d-programming/9781449388133/ch08.html

Lastly know I'm no expert. All this is my experience. I'm sure I have information gaps. I'm still learning but I'm happy to share some of these rabbit holes I've looked down :teach:
 
Last edited by Th3Travler,
  • Like
Reactions: PlayerSlayer69
This is the Pica 200 GPU demo. This is the 3DS GPU at work


Lambert, phong, specular, reflective, normals, Alpha, Environment and Cube Mapping. Baked and Dynamic lights are what I see in the demo; of course the sample environment is tiny so you can display all the goodies in 1 shot. You will be scaling things for larger environments.

To answer your question Occlusion, Global Illum *real time I assume?* and Displacement...or do you mean parallax? I haven't seen Parallax in hardware though I think it would be way to expensive to process per frame. I am doing some tests to see if it is possible...

Displacement like an animated sinewave effect ( vertex animated ) is possible. As for a 255 greyscale map ( bump map ) distorting geo "Displacement" The 3ds does have a tessellation shader. If you use the Pica 200 shader language I know it can be accessed. No idea if it works with bump maps, never messed with it. I know it would be a bit limited but the tech is in there.

For Unity 3DS sadly no to all..except maybe the parallax shader... I'll update this when I know more...
***update**
Yeah no Texgen so for Unity def no :P

Remember though that the 3DS renders the top screen twice at an offset to generate that 3d effect. That would means twice the Occ, Illum and Disp calculations per frame.

Some suggestions:
To get the effects you describe you can Bake occlusion into textures, Bake Global Illum - it will be static :sleep:. I'm old so I remember a world before global Illum existed which is why I say it can be setup and baked. Also remember that you have 3 active MB of Vram for the top and another 3 for the bottom screen. you will have to squeeze those textures alot. Most of the wishlist requires extra textures per shader + Mips. The rule with the 3DS is bake everything down and try to avoid per frame visual effects. I equate the 3ds to a PS2.5, it can do some limited console era equivalent effects but you going to optimize! Its going to make you boys strong!

Custom Engine and Normal Maps:
As for normals if you are using a proprietary engine, Normal maps are possible using The Pica shader language to make the effect. Mario Kart on the 3DS uses normals. Look at the games Banner "main menu 3d icon" and pay attention to the tires. Those are normals on the tires.

Unity and Normal Maps:
If you are using Unity the answer is ...sorta...You will have normal maps but they wont process in tangent space but rather in object space.

Voxel is right, dot3 bump mapping can be done via the texture combiner. but its not normal mapping the way the youth know it :lol: . dot 3 does not interact with dynamic lighting since that is a per pixel calculation; not possible thanks to unity removing support for some fixed function shader functionality. Ie Tex Gen. Which from what I understand could be used to make a new matrix in the combiner shader.

https://docs.unity3d.com/560/Documentation/Manual/UpgradeGuide5-Shaders.html#:~:text=Unity 5.0 removed support for this fixed function shader functionality: UV&text=(dot3, dot3rgba). Any of the above will do nothing now, and shader

This ironically hamstrung Unity when it came to 3DS shader conversion and tangent space normal maps. :glare:.

This ancient text talks about what Voxel mentioned using the Dot 3 Bump - if you can translate it to ShaderLab it works ;)

https://www.oreilly.com/library/view/iphone-3d-programming/9781449388133/ch08.html

Lastly know I'm no expert. All this is my experience. I'm sure I have information gaps. I'm still learning but I'm happy to share some of these rabbit holes I've looked down :teach:

Going a bit off topic but still in the realm of graphics but I wonder how the 3DS’s ARM11 SIMD Capabilities can be taken advantage of:

(From Rodrigo Copetti)

“the ARMv6 ISA innovates with a new set of vector instructions and multi-core support [5]. The new vector set is made of SIMD instructions that operate groups of four 8-bit values or two 16-bit values at a time (using the existing 32-bit registers) [6]. These instructions can only operate integers (no floating point), however.“

And this is a bit concerning correct me if I’m wrong but most games used Floating Point nowadays rather than Integer or Fixed Point math so to have SIMD instructions on a gaming handheld only for it to not support Floats seems like a waste. That is unless it can be used utilized for graphics/animation and game logic (AI, Physics, etc) work and integer math still has it’s place in programming video games despite the wide adoption of floating point numbers

I’m asking this because GPUs excel at parallel operations and graphics is a very parallizable process. GPUs follow the concept of what SIMD does and is specialized in that category, which leaves us to the main question. Where does ARMv6 SIMD has it’s place in programming video games for the 3DS and what areas will benefit of it’s use (3D Graphics, Game Logic, Audio, etc)
 
Going a bit off topic but still in the realm of graphics but I wonder how the 3DS’s ARM11 SIMD Capabilities can be taken advantage of:

(From Rodrigo Copetti)

“the ARMv6 ISA innovates with a new set of vector instructions and multi-core support [5]. The new vector set is made of SIMD instructions that operate groups of four 8-bit values or two 16-bit values at a time (using the existing 32-bit registers) [6]. These instructions can only operate integers (no floating point), however.“

And this is a bit concerning correct me if I’m wrong but most games used Floating Point nowadays rather than Integer or Fixed Point math so to have SIMD instructions on a gaming handheld only for it to not support Floats seems like a waste. That is unless it can be used utilized for graphics/animation and game logic (AI, Physics, etc) work and integer math still has it’s place in programming video games despite the wide adoption of floating point numbers

I’m asking this because GPUs excel at parallel operations and graphics is a very parallizable process. GPUs follow the concept of what SIMD does and is specialized in that category, which leaves us to the main question. Where does ARMv6 SIMD has it’s place in programming video games for the 3DS and what areas will benefit of it’s use (3D Graphics, Game Logic, Audio, etc)
Well I can tell you that for sure the 3DS does uses float point math for graphics and code. Otherwise the games would have the famous PS1 vertex snapping effect that ironically retro projects are trying to emulate now :lol: For those that don't know the PlayStation One had 3ds graphics that would randomly "glitch or snap" - mostly noticeable when a camera was rotating or an object was moving; aka all the time lol.

The effect was caused because The PS1 GPU used integer based math rather than float point math. which made vertex and texture buffer values not smoothly interpolate from one point or value to the next value. Integers could be processed faster but you lost position accuracy.

As for SIMD my guess is it probably helps a lot with none graphics tasks, maybe arrays? Also not everything in graphics requires float point
  • Texture Manipulation: Many textures are represented as integer color values (e.g., RGBA values)
  • Image processing: Applying the same filter to multiple pixels at once.
  • frame animations can be float but i tend to find its mostly integer.
Even for my stuff i try to push away from float and as close to integer as i can. I try to reduce or eliminate float variables as much as possible on my 3DS shaders. I use Half for most values..byte humm lol i don't recall but I may have used it for vertex colors. I can't with any certainty say its a massive boost since I don't have working hardware to export out elfs and do performance testing but I do know that when it comes to the 3DS everything helps. For my project I am aiming for 3D + 60fps
I can tell you that rigged characters don't help with that goal but that's a side tangent :rolleyes:


In anycase id love to have a 3DS graphics or system engineer weigh in on your question.
 
Last edited by Th3Travler,
  • Like
Reactions: PlayerSlayer69

Site & Scene News

Popular threads in this forum