Tutorial How to make 3DS Games with Unity

  • Thread starter Thread starter Keksfresser
  • Start date Start date
  • Views Views 221,974
  • Replies Replies 508
  • Likes Likes 30

Should I add some Demo Projects?


  • Total voters
    54
  • Poll closed .
Hello Hello! long time no post! Holy smokes you guys have made a mountain of progress!

Quick tip about Realtime shadows on anemic hardware.

When I worked on the PS-Vita we created very low resolution meshes ( which had similar silhouettes )
they were basically 1 sided geo cards to represent on screen Realtime shadows. Some object of course would not be cards but full 3d privative models just depends on what it is you were casting a shadows on. A tree, a car can be very expensive poly wise to raycast but you can make a very low-rez cage that can maintain the rough shape.

This cage would be invisible to the player but visible to the dynamic light.
So rather than having a 2k + mesh being raycast we would make a 100 poly mesh substitute with a good approximation of the shape for real time calculations. that was the secret we we used to keep performance up when dynamic lights were used.
since we are talking about small screens you can barely tell the shadow being cast was of a more privative shape.

of course this was overlaid with as much static lightmap shadows that could muster. always bake everything down if you can!
the less dynamic stuff you have to calculate the more performance. We also tried to pick very specific points when to apply dynamic shadows. a corridor of light between 2 tall builds / mountains just patches of dynamic light.

for environments this only works if its a light that doesn't move much like a static sun / moon - basically not a dynamic day and night cycle with a moving dynamic light.

This video pretty much explains what i am talking about regarding low rez shadow casting meshes. It has a lot of good performance general tips with Realtime lighting - not everything can be applied to the 3ds but it may give some ideas as to how to think of things. ( understand this is to get an idea of what to do not a 1:1 tutorial - you would have to research these topics further )

Video is here:
jump to 10:40 for the low rez shadow caster for cars.
strongly recommended watching the whole thing to get context it is a very good talk!
 
Last edited by Th3Travler,
  • Like
Reactions: CooingMaxito
Hello Hello! long time no post! Holy smokes you guys have made a mountain of progress!

Quick tip about Realtime shadows on anemic hardware.

When I worked on the PS-Vita we created very low resolution meshes ( which had similar silhouettes )
they were basically 1 sided geo cards to represent on screen Realtime shadows. Some object of course would not be cards but full 3d privative models just depends on what it is you were casting a shadows on. A tree, a car can be very expensive poly wise to raycast but you can make a very low-rez cage that can maintain the rough shape.

This cage would be invisible to the player but visible to the dynamic light.
So rather than having a 2k + mesh being raycast we would make a 100 poly mesh substitute with a good approximation of the shape for real time calculations. that was the secret we we used to keep performance up when dynamic lights were used.
since we are talking about small screens you can barely tell the shadow being cast was of a more privative shape.

of course this was overlaid with as much static lightmap shadows that could muster. always bake everything down if you can!
the less dynamic stuff you have to calculate the more performance. We also tried to pick very specific points when to apply dynamic shadows. a corridor of light between 2 tall builds / mountains just patches of dynamic light.

for environments this only works if its a light that doesn't move much like a static sun / moon - basically not a dynamic day and night cycle with a moving dynamic light.

This video pretty much explains what i am talking about regarding low rez shadow casting meshes. It has a lot of good performance general tips with Realtime lighting - not everything can be applied to the 3ds but it may give some ideas as to how to think of things. ( understand this is to get an idea of what to do not a 1:1 tutorial - you would have to research these topics further )

Video is here:
jump to 10:40 for the low rez shadow caster for cars.
strongly recommended watching the whole thing to get context it is a very good talk!

Hello again! Long time no see

I probably won't dive much into 3d game dev (for now at least), but this is still very insightful! Always love to see tips and tricks for these things
 
  • Like
Reactions: Th3Travler
Hello Hello! long time no post! Holy smokes you guys have made a mountain of progress!

Quick tip about Realtime shadows on anemic hardware.

When I worked on the PS-Vita we created very low resolution meshes ( which had similar silhouettes )
they were basically 1 sided geo cards to represent on screen Realtime shadows. Some object of course would not be cards but full 3d privative models just depends on what it is you were casting a shadows on. A tree, a car can be very expensive poly wise to raycast but you can make a very low-rez cage that can maintain the rough shape.

This cage would be invisible to the player but visible to the dynamic light.
So rather than having a 2k + mesh being raycast we would make a 100 poly mesh substitute with a good approximation of the shape for real time calculations. that was the secret we we used to keep performance up when dynamic lights were used.
since we are talking about small screens you can barely tell the shadow being cast was of a more privative shape.

of course this was overlaid with as much static lightmap shadows that could muster. always bake everything down if you can!
the less dynamic stuff you have to calculate the more performance. We also tried to pick very specific points when to apply dynamic shadows. a corridor of light between 2 tall builds / mountains just patches of dynamic light.

for environments this only works if its a light that doesn't move much like a static sun / moon - basically not a dynamic day and night cycle with a moving dynamic light.

This video pretty much explains what i am talking about regarding low rez shadow casting meshes. It has a lot of good performance general tips with Realtime lighting - not everything can be applied to the 3ds but it may give some ideas as to how to think of things. ( understand this is to get an idea of what to do not a 1:1 tutorial - you would have to research these topics further )

Video is here:
jump to 10:40 for the low rez shadow caster for cars.
strongly recommended watching the whole thing to get context it is a very good talk!

Yeah, with low poly version I could get about 50-60 on new, 25-30fps on old 3ds. However, it's clear this is for specific situations as the cpu gets overlaod with nothing. What I need to test is making a lightmap blender to fake real time illumination.
 
  • Like
Reactions: Th3Travler
I don't know what I'm doing wrong, but the content in the upper screeen also shows in the screen below (happens in real hardware too.) Also how can I set the banner and the sound when you select the app.
Screenshot 2026-02-19 143303.png
 
I don't know what I'm doing wrong, but the content in the upper screeen also shows in the screen below (happens in real hardware too.) Also how can I set the banner and the sound when you select the app.
View attachment 557766
That only happens if you don't have a specific camera for the bottom screen (with the rendering target display as Bottom Screen). In addition, if you are using a 3d text instead of canvas, set it to a layer only the top camera can render from. Regarding the banner: Yes, you can use a 2D image or a 3d model. For the 2D image, import the banner example (right click > import packages) and modify the ctex and wav from there. In order to achieve the ctex thing, I would recommend you to use NW4C_TextureConverter from the CTR SDK to convert a 256x128 png to ctex. For the 3d model you need to use NintendoWare Creative Studio for Banner program from the SDK (check this video):

 
That only happens if you don't have a specific camera for the bottom screen (with the rendering target display as Bottom Screen). In addition, if you are using a 3d text instead of canvas, set it to a layer only the top camera can render from. Regarding the banner: Yes, you can use a 2D image or a 3d model. For the 2D image, import the banner example (right click > import packages) and modify the ctex and wav from there. In order to achieve the ctex thing, I would recommend you to use NW4C_TextureConverter from the CTR SDK to convert a 256x128 png to ctex. For the 3d model you need to use NintendoWare Creative Studio for Banner program from the SDK (check this video):


1771536046543.png
1771536067456.png

1771536078995.png
1771536091955.png
1771536100901.png


this is how i have it set up. I'm pretty sure it's okay. Also the text in unity is black
 
View attachment 557827View attachment 557828
View attachment 557829View attachment 557830View attachment 557831

this is how i have it set up. I'm pretty sure it's okay. Also the text in unity is black
As I mentioned, both cameras are rendering UI layer so both screens are gonna render a worldspace canvas that uses that layer. If you want specific screen space, set the camera as screen space overlay or change the UI layer of the canvas/ the rendering layers in the non-needed camera.
 
As I mentioned, both cameras are rendering UI layer so both screens are gonna render a worldspace canvas that uses that layer. If you want specific screen space, set the camera as screen space overlay or change the UI layer of the canvas/ the rendering layers in the non-needed camera.
I created layer UI_Upper and UI_Lower. Put UpperCanvas UI_Upper and on LowerCanvas UI_Lower. Also put in Lower Camera culling mask UI_Lower only, and on Upper Camera UI_Upper only, Still doesn't work. Also I don't know if this is worth mentioning but in Unity the text is black when in 3DS is white, the preview in Unity looks okay, and no matter in Lower Canvas / Upper Canvas what render mode I pick, all do the same.
 
I created layer UI_Upper and UI_Lower. Put UpperCanvas UI_Upper and on LowerCanvas UI_Lower. Also put in Lower Camera culling mask UI_Lower only, and on Upper Camera UI_Upper only, Still doesn't work. Also I don't know if this is worth mentioning but in Unity the text is black when in 3DS is white, the preview in Unity looks okay, and no matter in Lower Canvas / Upper Canvas what render mode I pick, all do the same.
Not only the canvas but the text itself. That should work 100% as that is how unity display works. As the event system works with the built-in UI layer, I'd keep the top view with a custom layer and the bottom screen one with the UI one (as you can interact with it by tapping on the screen).

Here you have an example (check if you followed it properly):

1771583419579.png
1771583445941.png
1771583476213.png
1771583509297.png


Result in-editor + citra/retai:

1771583574391.png
1771583614860.png
 
Last edited by Manurocker95,
Not only the canvas but the text itself. That should work 100% as that is how unity display works. As the event system works with the built-in UI layer, I'd keep the top view with a custom layer and the bottom screen one with the UI one (as you can interact with it by tapping on the screen).

Here you have an example (check if you followed it properly):

View attachment 557953View attachment 557954View attachment 557955View attachment 557956

Result in-editor + citra/retai:

View attachment 557958View attachment 557959
I made so it match exactly yours, and it's still the same and now it looks zoomed. I'll share my project.
 

Attachments

I made so it match exactly yours, and it's still the same and now it looks zoomed. I'll share my project.
Just saw where the bug is. When rendering the Skybox with the bottom camera, if you are not using a shader like the provided by 3ds examples, Unity bugs and renders other stuff in the stencil and color buffer. Set both cameras to "Solid Color" as background and you are good to go! Btw, I'd also recommend you to use power of 2 images (e.g: 256x256).

1771664186905.png
 
  • Like
Reactions: I pwned U!
Just saw where the bug is. When rendering the Skybox with the bottom camera, if you are not using a shader like the provided by 3ds examples, Unity bugs and renders other stuff in the stencil and color buffer. Set both cameras to "Solid Color" as background and you are good to go! Btw, I'd also recommend you to use power of 2 images (e.g: 256x256).

View attachment 558127
Thank you so much! :)
Post automatically merged:

Just saw where the bug is. When rendering the Skybox with the bottom camera, if you are not using a shader like the provided by 3ds examples, Unity bugs and renders other stuff in the stencil and color buffer. Set both cameras to "Solid Color" as background and you are good to go! Btw, I'd also recommend you to use power of 2 images (e.g: 256x256).

View attachment 558127
One last thing, are unity (UI) buttons supposed to work with the 3ds?
 
Last edited by FryDaDog,
  • Like
Reactions: Manurocker95
Thank you so much! :)
Post automatically merged:


One last thing, are unity (UI) buttons supposed to work with the 3ds?
Yep, you need them to be in the UI layer, the canvas having a Graphics Raycaster + Event System in the scene, and not being blocked by other UI element. They work for me in your project just fine.

clicker.gif

Post automatically merged:

machoke.gif
geodude1.gif


Btw, I started the microgames for my Wario Ware like fangame :D
 
Last edited by Manurocker95,
  • Like
Reactions: CooingMaxito
Yep, you need them to be in the UI layer, the canvas having a Graphics Raycaster + Event System in the scene, and not being blocked by other UI element. They work for me in your project just fine.

View attachment 558153
Post automatically merged:

View attachment 558160View attachment 558178

Btw, I started the microgames for my Wario Ware like fangame :D
It isn't working for me. Would you mind sharing the modified project (if you still have it)?
 
It isn't working for me. Would you mind sharing the modified project (if you still have it)?
I didn't change almost anything (deleted the banner to have less to compile tho):
 

Attachments

I imported your project without changing anything, and it's still not working. I'm seeing you are using a higher version of unity. Can it be that?
That should not matter... but I would never use 5.6.5 instead of 5.6.6f2, so you should upgrade anyway.
 

Site & Scene News

Popular threads in this forum