I've enabled a fog in the render settings on my scene. It works perfectly while testing it on the Unity editor, but after opening the game after building, the fog disappears. I'm not sure but according to some sources on the web, I found out that Unity3d has issues when running with Windows 8.1. Is there any way I can fix this?
I have just had this issue, it's incredibly annoying. What worked for me was going to the Graphics settings and changing the "Shader Stripping" fog modes to manual. I hope this helps someone else in the future.
To extend sraney's answer. Unity 2018 now look like this, if you change from "Automatic" to "Custom" it lets you select which shader to KEEP. In screenshot, I use only Linear mode so I only check that one.
Cause
This problem came from no scene in build list ever use fog setting (via Window -> Rendering -> Light Settings menu). Which happen to me because my game turn fog on/off via script.
>> Link to Unity official article
Works for me. Edit, Project Settings, Graphics, Shader stripping, Fog modes:Manual. I confirmed this works fine on Ubuntu with Unity 5.4.1f1
The problem only happens during a build. It works fine without otherwise.
Code snippet for fog:
void Start ()
{
RenderSettings.fogColor = Camera.main.backgroundColor;
RenderSettings.fogDensity = 0.03f;
RenderSettings.fog = true;
}
Worth mentioning to try and create a new camera if it still does not work after modifying the RenderSettings.
No matter what changes I made, it would not update until I replaced the camera with a new one.
Related
I'm trying to use an ARView in a macOS-only project. I can load a scene (tested with a Reality file from Reality Composer), and it renders fine.
But how do I control the camera with the mouse?
An example of this is Reality Composer, Reality Converter, and previewing a Reality file in Xcode where you can drag anywhere on the view and the camera pans, rotates, etc. In SceneKit the equivalent is allowsCameraControl
There's no cameraMode on the macOS ARView, probably because it only supports nonAR anyway.
I tried adding a PerspectiveCamera hoping it would unlock interactivity, but no luck.
I guess I could just implement all the gestures myself, but that's a lot of work, and Apple seems to be using a standard way to interact with the scene with a mouse - and also a standard grid, which I'd love to use, too.
I'm using macOS 12 beta 1, but it shouldn't make a big difference since ARView requires macOS 10.15
Neither in macOS nor in iOS, RealityKit has a property similar to SceneKit's .allowsCameraControl. However, using this code as a starting point, you can create your own camera control in RealityKit.
This post can also be helpful for you.
I want to build a 3D design program, just like tinkercad. However in this program user can create keyframes and play animation through a timeline in UI.
This is nothing new, many desktop applications can do this (e.g Blender, 3DSMax, AfterFX...). However, I couldn't find an example project or anything that comes handy in documentations. Is it possible to make it happen in three.js?
Have a look at GreenSock's GSAP, it is a general purpose HTML5 animation library, which can easily be applied to a three.js project. This is a tutorial about creating Timelines using GSAP
You might also want to check out the Under Neon Lights editor which uses Frame.js
I'm making a game with swift and I went into the project editor to rename the project. Now when I try to run it it just gives me a gray screen. My app is called Scene Transition, and under the projects folder the Scene Transition.app and Scene Transition Tests.xctest are both red. Not sure if this has something to do with it.
I would suggest following the instructions in this youtube video. In general, renaming things in Xcode without considering the configuration changes is a bad idea (this actually holds for just about every programming language and environment I can think of).
I've been working on a new game, and I just put in my first animation, an explosion.
The problem is this. The explosions spritesheet is 1200x100, made up of 12 100x100 frames.
The explosion animates fine EXCEPT the origin is behaving strange. I want the explosion to be centered, so I specify 50, 50 as I've done on previous games in the past. This centers in the Y direction but in the X direction its only moved slightly.
After some fiddling I noticed that if I put the origin as 600, 50 (half the spritesheets width) it centers correctly. This makes no sense. I've used this animation code before and never had this problem. I've ensured the values are all being passed correctly, and the destination and source rectangles look to be correct... I am STUMPED!!
I tested Monogame and there is something going on between XNA vs monogame.
I've made this sample for anyone whos interested to download and inspect for themselves.
As you'll see, in the XNA version the black dot is in the middle as it should be, but on the monogame version its way off center.
Not sure whats causing this. Rectangle or spritebatch.draw differences? or perhaps its the way the textures are processed using the monogame content project. Any help is greatly appreciated!!!
To run this you'll need xna 4.0 installed as well as monogame 3.0
http://www.filedropper.com/testanimation
http://monogame.codeplex.com/releases/view/102870
Well I've figured it out!
Seems it was a problem with the content builder in the 3.0 monogame release.
Today the 3.0.1 release came out, so I uninstalled 3.0 and installed 3.0.1.
I then ran the project, the problem still remained. So i opened my content project, rebuilt all my content, copied over the files and tries again, problem solved!!! :D
TY Dr. Asik for spurring me into the right direction! :)
So, I'm working on a mac app, and I'm trying to add a shadow via core animation to a button. I used the effects pane in Interface Builder and set the shadow and color, and made sure to check the "Want's Core Animation Layer" checkbox. But when simulating the interface or building the app, there is no shadow. I would appreciate it if someone knows what's wrong.
Thanks!
Edit: I've tried several things, including cleaning the project and turning on and off core animation. Nothing fixes it.
I fixed it. I ended up going through every interface element in the tab view and turned off core animation on each one (I had some strange transparency stuff going on). Then I went back to add the shadow, and it worked fine.