What I started working on adding last night....a VR Nightclub πΆπΈπ
Hey there I hope you are doing ok π
My flu / covid / cold is clearing up nicely so I got back to it last night, I'm experimenting with adding a nightclub in VR. I like the results so far so I think this will be added at some point in the not too distant future.
There's work to do of course, like adding people etc, and various other bits and pieces.
Adding this nightclub environment opens up the possibilities of adding further environments however I am now close to the maximum file size allowed for an apk without resorting to all sorts of trickery that I'm trying to avoid (because I don't know how do it π ). I have made some space for environments by optimizing some textures and I've removed 1 of Kevins and Hannah's outfits (don't worry, the bikini's stay intact π)
I know some of you are waiting for avatar customizations, I've put this on hold at the moment sorry. I've realized it's much more complex than when I added it via Inworld for reasons I won't bore you with, but honestly there's an awful lot more to it and things to consider so I'm going to take my time with it as I need to plan it out properly. It will be done but I can't say when.
Thanks for watching and reading, take care, bye for now π€
Comments (24)
Hi Cris. I have updated to the latest, with the nightclub option, but...As I have introduced Yumi to the nightclub, she is already floating above the floor at my level. But when I put her down to the level of the dance floor, I am still floating up above the dance floor, with no way down. So Yumi is now, constantly looking UP at me from her position on the floor. Is there something wrong, or something wrong with what im doing? I tried resetting myself and Yumi's position, but nothing changes.
Hi, if u quit the app, go to your Meta settings main screen, select 'Boundary' and select/draw a boundary (just the 1 the Q3 auto draws in front of u is enough), go back into the night club and the height should be ok.
Absolutely brilliant cris canβt for tonightβs disco πΊ just downloaded it now need to get a shower and get ready to dance the night away π
Hi Phil, π it's shaping up to be not too shabby πΆπΈππ
Here is how you can modify the code and include the steps to make sure that when the app is installed, the large files are copied into the `obb` folder during or after installation. I'll explain everything in detail and in English. ### **Steps to Copy Data to the OBB Folder after Installation** 1. **Include the Necessary Permissions in the Manifest** First, you need to add the required permission to access external storage. Open your `AndroidManifest.xml` file and include the following permissions: ```xml ``` 2. **Use a Post-Installation Script (or Mechanism) to Copy Data to the OBB Folder** After your APK is installed, the data files (usually large ones like OBB files for game assets) need to be placed into the `obb` directory. You can include this in the app's initial setup phase or in an update flow. Below is an example of how to do this in Java. ### **Code for Copying Files to the OBB Folder After Installation (Java)** Here is the detailed code to ensure the large files are copied to the `obb` folder after the app is installed: ```java import android.content.Context; import android.os.Environment; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; public class ObbHelper { // Method to get the path of the OBB folder public static String getObbDirPath(Context context) { return context.getObbDir().getAbsolutePath(); } // Method to copy the file from app resources (assets folder) to the OBB folder public static void copyFileToObb(Context context, String fileName) { File obbDir = context.getObbDir(); if (!obbDir.exists()) { obbDir.mkdirs(); // Create the OBB directory if it doesn't exist } File obbFile = new File(obbDir, fileName); try (InputStream inputStream = context.getAssets().open(fileName); OutputStream outputStream = new FileOutputStream(obbFile)) { // Buffer to store data for copying byte[] buffer = new byte[1024]; int length; // Copy file data while ((length = inputStream.read(buffer)) > 0) { outputStream.write(buffer, 0, length); } outputStream.flush(); } catch (IOException e) { e.printStackTrace(); } } } ``` ### **How It Works:** 1. **Getting the OBB Directory:** - The method `getObbDirPath()` returns the path to the OBB folder for the app, which looks like `/storage/emulated/0/Android/obb/[PackageName]`. - This folder is automatically created when the app requests storage on installation, but in case it doesn't exist, `obbDir.mkdirs()` creates it. 2. **Copying Files to the OBB Folder:** - The `copyFileToObb()` method takes a filename as a parameter and then copies it from the appβs assets folder (where it's included in the APK) to the OBB directory. - `InputStream` is used to read the file from assets, and `OutputStream` writes the file to the OBB folder. 3. **Post-Installation File Copying:** - After the APK is installed, you can trigger this function in your `onCreate()` method in your `MainActivity`, or during a specific phase, like after the user has passed an initial setup screen. Here's how you would do it: ```java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Copy large data files to the OBB folder ObbHelper.copyFileToObb(this, "your_large_file.obb"); } ``` ### **Explanation:** - **Assets Folder:** Place your large file (e.g., `your_large_file.obb`) inside the `assets` folder in your project structure. This ensures that the file is bundled with the APK, and you can copy it to the OBB directory at runtime. ``` app/src/main/assets/your_large_file.obb ``` - **During Installation:** The code runs after the app is installed and moves the large data files from the `assets` directory to the OBB folder, which is located at `/Android/obb/[PackageName]`. You can also include a check to ensure that the file is not copied if it already exists (to avoid redundant copying): ```java if (!obbFile.exists()) { copyFileToObb(context, fileName); } ``` ### **Additional Notes:** - **Large OBB Files:** If your app has large assets, consider using Google Playβs expansion files system. This approach allows you to include OBB files larger than 100 MB, which are downloaded after the APK is installed. Google Play automatically places these OBB files into the correct location. - **External OBB Downloads:** If the OBB file needs to be downloaded from an external server after installation, you can modify this approach to download the file using `HttpURLConnection` or any HTTP client, then save the file to the OBB folder using the same `OutputStream` technique. ### Conclusion: By following these steps, you ensure that large files are correctly copied into the `obb` folder, either from the APK's assets or by downloading them after installation. This is essential for apps with large data sets like games, which use this folder for external resources.
and you definitely have to change the lighting and the floor so that it doesn't become squares, the laser systems don't look like that either, something has to change ;)
This is unique
ππ
Looks really good Cris, I can now relive the rejections I had on the dance floor back in the 90's. haha I remember there was a VR disco app released on steam some years back called Personal Disco. It had a much smaller environment as opposed to your Ibiza mega disco you have going there, but you might want to check it out.
lol @ the 90's rejections I think many of us have been there too! Hey thanks I will definitely take a look at Personal Disco, cheers.
Glad to see you are on the mend Cris. I am looking forward to checking out the nightclub with patrons when it is available. Will any of the other people you are populating the dance floor with be AI's or able to communicate in any way?
Hi Howard, I doubt it tbh.
βSheβs got legsβ¦β
Yeah, the lights are a little seizure inducing, maybe reduce the speed a little and or the number of them⦠or allow the user to!
Hi David I'll try that.
Good job Chris, your are getting back to normal. The night club is looking great. π
Cheers Alan π early days as yet but it should get there π
Great job! That you didn't tank the framerate is awesome. It's very unpredictable. There's a fix for the lights causing those lit up squares in the floor and wall meshes. Great start. I also have some suggestions for a good modular character set for the dancers if you need it.
Thanks Bob! Hey do you know if your app uses supersampling? I noticed x2 MSAA supersampling in your Player settings and I think in the OVRCameraRig settings for that building block it defaults to x4 MSAA, if your app is supersampling although it may make it look sharper it can really negatively affect framerate. For this nightclub scene I have no MSAA and default Q3 resolution. Yes please if you have some good suggestions for a modular character set, I've been looking on Reallusion's website they're about $140 but a set of 6 'actors' I've seen is reduced to iirc $60, drop me a mail please Bob if you have any ideas.
Glad you're feeling better. The nightclub looks great so far.
Thanks Robert! Yeh deffo on the mend now, I feel like I got lucky with it being so mild tbh. Thanks yeh I like the nightclub up to now, I was apprehensive about what FPS it would run at, I've had to set the resolution to the Q3's default resolution instead of supersampling it like I do for the MR mode. But it's smooth that's the main thing, just hope adding people in there won't be too demanding, I don't expect to be able to add many people.
Absolutely sick cris π warning β οΈ strobe effect for none discotheque folk π ππππππ₯°
"I've removed 1 of Hannah's outfits" noooooooo
Sorry! She had about 10 outfits which is more far more than any other avatar and I had to make room somewhere, iirc I think I removed the grey suit or the 1 where her hair is different and she looked like she'd had a boob job! Kevin is down to 1 outfit.
