Daily Archives

Articles indexed Wednesday July 3 2013

Page 12/14 | < Previous Page | 8 9 10 11 12 13 14  | Next Page >

  • defunct dbus-daemon zombie freezes login for 30 seconds

    - by oldenburgb
    I'm running Ubuntu 12.04.2 LTS (Precise Pangolin) and noticed a 30 second delay whenever i log into my server via ssh or perform any kind of login via sudo on that machine. I can provoke immediate execution by killing the defunct dbus-daemon showing up during the delay: output of ps fax |grep dbus 19222 ? Ss 0:00 dbus-daemon --system --fork --activation=upstart 19752 ? Z 0:00 \_ [dbus-daemon] <defunct> taping into the dbus using dbus-monitor --system i'm getting: signal sender=org.freedesktop.DBus -> dest=(null destination) serial=7 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged string ":1.4" string "" string ":1.4" each login. Stopping the dbus service eliminates this problem but probably causes many other... I'm not running xorg on the machine but the packages are present for X11 forwarding capabilities. I've ruled out the common motd script delay and ssh "UseDNS no" fixes one finds when looking up login delay issues. Many thanks in advance for any help with this, it's been driving me crazy ;-)

    Read the article

  • Persistent "held broken packages" error

    - by stoplan
    sudo apt-get update && sudo apt-get install netflix-desktop gives the error The following packages have unmet dependencies: netflix-desktop : Depends: wine-browser-installer but it is not going to be installed E: Unable to correct problems, you have held broken packages. but dpkg --get-selections | grep hold shows nothing. I'm running 12.04 64-bit. I've followed the directions in How do I resolve unmet dependencies?: Confirmed that main, universe, restricted and multiverse software sources are enabled sudo apt-get clean sudo apt-get -f install (returning '0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.') sudo dpkg --configure -a sudo apt-get -f install (again '0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.) sudo apt-get -u dist-upgrade (0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.) used Y PPA Manager to check for duplicate ppas (none found) [Edit] I have had the same error with other packages. Here's the output requested by Alaa: sudo apt-get install wine-browser-installer Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: wine-browser-installer : Depends: wine-compholio (= 1.5.19~precise1) E: Unable to correct problems, you have held broken packages.

    Read the article

  • Step by step guide to partition an external HDD in two file formats

    - by Mysterio
    I just purchased an external HDD (1TB) which I want to partition with two different file formats - NTFS and FAT32 (this partition is for my PS3 backups). At the moment it's a giant 943mb NTFS partition and at the end of the operation I want it to be like: 643 MB NTFS partition (as my main partition) 300 MB FAT32 partition (to house my PS3 backups) Please can someone help me out? Thanks in advance.

    Read the article

  • Unable to download anything from the Ubuntu software center

    - by Skittles
    I am trying to download softwares from ubuntu software center but every time i click on "USE THIS SOURCE" i end up getting "Failed to download repository information" error! I don't understand what to do I even tried changing and adding Repository. Even tried choosing a different server. Even the "Choose best server" option doesn't choose anything. I really need help. I am new to Ubuntu and i would really appreciate some help. after trying lsb_release -a; i got pooja@Invincible:~$ lsb_release -a; No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise After trying "sudo apt-get update && sudo apt-get upgrade" i got this- W: Failed to fetch http://mirror.cse.iitk.ac.in/ubuntu/dists/precise-proposed/universe/i18n/Translation-en Something wicked happened resolving 'mirror.cse.iitk.ac.in:http' (-5 - No address associated with hostname) E: Some index files failed to download. They have been ignored, or old ones used instead.

    Read the article

  • Can't single boot Ubuntu 13.04 64 bit

    - by stanleyhunk
    I'm new to Ubuntu, I bought an Asus A45VS laptop recently pre-installed with Windows 8, but I have already uninstalled it and wipef the whole HDD. I plan to install Ubuntu 13.04 64 bit on it. I have tried several times to install and uninstall Ubuntu again and again with boot-able USB, but it still fail to boot. All the installation process go fine, after rebooting my laptop, it just stick to the purple screen. Then I boot it with USB again, tried boot-repair, tried make an EFI partition, still the same. I have searched on the web, and all of them was about dual booting with windows 7 or windows 8, I don't wish to do dual booting as I wish to have single OS which is Ubuntu on this laptop. please help, thanks in advance.

    Read the article

  • no disk space, cant use internet

    - by James
    after trying to install drivers using sudo apt-get update && sudo apt-get upgrade, im faced with a message saying no space left on device, i ran disk usage analyzer as root and there was three folders namely, main volume, home folder, and my 116gb hard drive (which is practically empty) yet both other folders are full, which is stopping me installing drivers because of space, how do i get ubuntu to use this space on my hard drive? its causing problems because i cant gain access to the internet as i cant download drivers when i havnt got enough space, this happens every time i try it sudo fdisk -l Disk /dev/sda: 120.0GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0003eeed Device Boot Start End Blocks Id System /dev/sda1 * 2048 231315455 115656704 83 Linux /dev/sda2 231317502 234440703 1561601 5 Extended /dev/sda5 231317504 234440703 1561600 82 Linux swap / solaris Output of df -h df: '/media/ubuntu/FB18-ED76': No such file or directory Filesysytem Size Used Avail Use% Mounted on /cow 751M 751M 0 100% / udev 740M 12K 740M 1% /dev tmpfs 151M 792K 150M 1% /run /dev/sr0 794M 794M 0 100% /cdrom /dev/loop0 758M 758M 0 100% /rofs none 4.0K 0 4.0K 0% /sys/fs/cgroup tmpfs 751M 1.4M 749M 1% /tmp none 5.0M 4.0K 5.0M 1% /run/lock none 751M 276K 751M 1% /run/shm none 100M 40K 100M 1% /run/user

    Read the article

  • Intel I217LM ethernet controller not detected by Ubuntu 12.04LTS

    - by Alexandr Kurilin
    My last installation of Ubuntu 12.04 on a machine using an ASUS Q87M-E motherboard with an Intel I217LM Ethernet controller has failed to detect the ethernet card. The only thing displayed by ifconfig -a is the loopback. I double-checked in the BIOS, and the controller should be online. $ rfkill list all 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no $ lspci 00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06) 00:01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 06) 00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06) 00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06) 00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 04) 00:16.0 Communication controller: Intel Corporation Lynx Point MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation Lynx Point KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation Device 153a (rev 04) 00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Lynx Point HD Audio Controller (rev 04) 00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation Lynx Point 6-Port SATA AHCI Controller (rev 04) 00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 04) $ lsmod Module Size Used by vesafb 13844 1 snd_hda_codec_realtek 224173 1 arc4 12529 2 joydev 17693 0 usbhid 47238 0 hid 99636 1 usbhid rfcomm 47604 0 rt73usb 31735 0 crc_itu_t 12707 1 rt73usb rt2x00usb 20808 1 rt73usb rt2x00lib 55326 2 rt73usb,rt2x00usb mac80211 506862 2 rt2x00usb,rt2x00lib cfg80211 205774 2 rt2x00lib,mac80211 eeepc_wmi 13109 0 bnep 18281 2 asus_wmi 24456 1 eeepc_wmi sparse_keymap 13890 1 asus_wmi psmouse 97485 0 bluetooth 180153 10 rfcomm,bnep ppdev 17113 0 snd_hda_intel 33719 6 snd_hda_codec 127706 2 snd_hda_codec_realtek,snd_hda_intel snd_seq_midi 13324 0 snd_hwdep 17764 1 snd_hda_codec snd_rawmidi 30748 1 snd_seq_midi serio_raw 13211 0 snd_pcm 97275 2 snd_hda_intel,snd_hda_codec snd_seq_midi_event 14899 1 snd_seq_midi snd_seq 61929 2 snd_seq_midi,snd_seq_midi_event snd_timer 29990 2 snd_pcm,snd_seq snd_seq_device 14540 3 snd_seq_midi,snd_rawmidi,snd_seq parport_pc 32866 1 snd 79041 21 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_rawmidi,snd_pcm,snd_seq,snd_timer,snd_seq_device video 19651 0 soundcore 15091 1 snd wmi 19256 1 asus_wmi snd_page_alloc 18529 2 snd_hda_intel,snd_pcm mac_hid 13253 0 lp 17799 0 parport 46562 3 ppdev,parport_pc,lp $ ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1091 errors:0 dropped:0 overruns:0 frame:0 TX packets:1091 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:80048 (80.0 KB) TX bytes:80048 (80.0 KB) wlan0 Link encap:Ethernet HWaddr 00:fd:07:91:a8:b9 inet addr:172.16.42.4 Bcast:172.16.42.255 Mask:255.255.255.0 inet6 addr: fe80::2fd:7ff:fe91:a8b9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:56644 errors:0 dropped:0 overruns:0 frame:0 TX packets:36417 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:85270918 (85.2 MB) TX bytes:3413849 (3.4 MB) additionally, running sudo lshw -C network returns: *-network UNCLAIMED description: Ethernet Controller [...] I'm pretty stumped at this point. This doesn't sound like a very uncommon ethernet controller and I figured it would be picked up by the system. Does anybody have advice for how to deal with this? Anything specific I should look into to figure out what could be causing this? Edit: It seems that following the guide on the Intel e1000e drivers page allowed the card to start working. Is this a real fix or is there a better way?

    Read the article

  • Installing Ubuntu on an Asus Vivotab Smart Windows 8 32-bit processor tablet

    - by Ikenna
    Good day, I just got an Asus Vivotab Smart with Windows 8 but the processor is actually a 32-bit type. I am kinda confused with the Ubuntu version to install (32-bit or 64-bit). I have read all the tips and guidelines on installing Ubuntu on a Windows 8 machine. I have disabled fast boot, quiet boot, secure boot, and still cannot boot from the usb. I tried this with Ubuntu 12.04.2, 12.10, and 13.04 (the 64-bit versions only). I am yet to try a 32-bit version but I'm reluctant since Canonical says only the 64-bit version was developed to handle the Windows 8 UEFI issues. Also, I have a boot-override field in my UEFI options which I think force-boots from the boot option one selects. I selected to force-boot from my pendrive containing Ubuntu, but the screen just blinks momentarily and nothing happens. Please help me to figure out how to load ubuntu on my machine. I don't really want the Windows 8......just Ubuntu on my tablet. Thank you.

    Read the article

  • Can't load some domain

    - by Grzegorz
    I can't load some domain on my ubuntu 13.04: youtube.com translate.google.com drive.google.com vk.com When I ping them they are responding: PING youtube.com (217.119.79.59) 56(84) bytes of data. 64 bytes from non-registered.plix.pl (217.119.79.59): icmp_req=1 ttl=59 time=21.9 ms 64 bytes from non-registered.plix.pl (217.119.79.59): icmp_req=2 ttl=59 time=20.5 ms 64 bytes from non-registered.plix.pl (217.119.79.59): icmp_req=3 ttl=59 time=21.3 ms --- youtube.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 20.544/21.255/21.914/0.560 ms But they don't load in any browser like firefox, chrome, lynx. They load in my media centre on XBMCbuntu.

    Read the article

  • How do I remove Nvidia drivers and revert to nouveau (12.04)?

    - by Zark
    I'd like to give the new nouveau drivers a try. When I try a Ubuntu live distro, they work pretty flawlessly, but I don't seem to be able to use them correctly on my installed system. What I do is remove Nvidia drivers from the Additional drivers utility and reboot, but what I get is no 3D acceleration and low resolution on my monitor. What am I doing wrong? I wonder if I might have broken something when I messed up with grub trying to fix the infamous plymouth splash screen... Thanks for your support

    Read the article

  • I can't shut down nor reboot without console

    - by jgomo3
    After update from 11.04 to 11.10 an wired conduct appears in my machine: Shutdown GUI methods (including reboot) cause only a log off, and in the login screen, shutdown nor reboot options do anything (if you wonder, reboot appears in the shutdown dialog). The only way i can reboot or shutdown is trough console sudo shutdown -h now or sudo reboot. This is OK for me, but not for the rest of the users. How to fix this? Update The syslog output when select shutdown from my desktop is: AptDaemon: INFO: Quitting due to inactivity AptDaemon: INFO: Quitting was requested CRON[5095]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete) CRON[5094]: (root) MAIL (mailed 1 byte of output; but got status 0x00ff, #012) kernel: [17027.614974] psmouse.c: TouchPad at isa0060/serio4/input0 lost sync at byte 1 kernel: [17027.616510] psmouse.c: TouchPad at isa0060/serio4/input0 lost sync at byte 1 kernel: [17027.618037] psmouse.c: TouchPad at isa0060/serio4/input0 lost sync at byte 1 kernel: [17027.619557] psmouse.c: TouchPad at isa0060/serio4/input0 lost sync at byte 1 kernel: [17027.621046] psmouse.c: TouchPad at isa0060/serio4/input0 lost sync at byte 1 kernel: [17027.621051] psmouse.c: issuing reconnect request acpid: client 1032[0:0] has disconnected acpid: client connected from 1032[0:0] acpid: 1 client rule loaded gnome-session[1836]: WARNING: Unable to stop system: Authorization is required acpid: client 1032[0:0] has disconnected acpid: client connected from 6055[0:0] acpid: 1 client rule loaded rtkit-daemon[1313]: Successfully made thread 6134 of process 6134 (n/a) owned by '119' high priority at nice level -11. rtkit-daemon[1313]: Supervising 4 threads of 2 processes of 2 users. rtkit-daemon[1313]: Successfully made thread 6139 of process 6134 (n/a) owned by '119' RT at priority 5. rtkit-daemon[1313]: Supervising 5 threads of 2 processes of 2 users. rtkit-daemon[1313]: Successfully made thread 6140 of process 6134 (n/a) owned by '119' RT at priority 5. rtkit-daemon[1313]: Supervising 6 threads of 2 processes of 2 users. I suspect that the line gnome-session[1836]: WARNING: Unable to stop system: Authorization is required is related to the issue. When selecting shutdown from the login screen, the output is the same from the line pointed. This is the output: gnome-session[1836]: WARNING: Unable to stop system: Authorization is required acpid: client 1032[0:0] has disconnected acpid: client connected from 6055[0:0] acpid: 1 client rule loaded rtkit-daemon[1313]: Successfully made thread 6134 of process 6134 (n/a) owned by '119' high priority at nice level -11. rtkit-daemon[1313]: Supervising 4 threads of 2 processes of 2 users. rtkit-daemon[1313]: Successfully made thread 6139 of process 6134 (n/a) owned by '119' RT at priority 5. rtkit-daemon[1313]: Supervising 5 threads of 2 processes of 2 users. rtkit-daemon[1313]: Successfully made thread 6140 of process 6134 (n/a) owned by '119' RT at priority 5. rtkit-daemon[1313]: Supervising 6 threads of 2 processes of 2 users. acpid: client 6055[0:0] has disconnected acpid: client connected from 6055[0:0] acpid: 1 client rule loaded

    Read the article

  • Using PHP Redirect Script together with Custom Fields (WordPress)? [on hold]

    - by Alex Scherer
    I am currently trying to make yoast's link cloaking script ( Yoast.com script manual // Github Script files ) work together with the Wordpress plugin Advanced Custom Fields. The script fetches 2 values (redirect id, redirect url) via GET and then redirects to this particular URL which is defined in a .txt file called redirects.txt I would like to change the script, so that I can define both the id and redirection URL via custom fields on each post in my WP dashboard.. I would be really happy if someone could help me to code something that does the same as the script above but without using a redirects.txt file to save the values but furthermore gets those values from custom fields. Best regards ! Alex

    Read the article

  • How should one refer to their social network profiles in prints?

    - by Omne
    In case a person has many different social network profiles, what is the proper way of referring to those profiles in a work that is meant to be printed or may be viewed as an image? For example one owns the username "CoolCompany" on Facebook, Twitter, Google+ and other websites. Should they provide a URL for each profile? for example: Facebook.com/CoolCompany Twitter.com/CoolCompany ... I often notice that in videos or on TV people may only use the logos but I believe it is not very useful, specially in case that the audience are unfamiliar with a social network... Is it acceptable to provide the logos or names of the networks and mention the username only once like this: Facebook & Twitter: @CoolCompany Or Facebook & Twitter: /CoolCompany

    Read the article

  • Meta description not displaying in custom site search results page

    - by Stephen Connolly
    We have Google Custom Site Search implemented on our company website. When I'm looking at the results page, I noticed that the Meta Description is not being displayed. It just seems to be reading the links titles from our drop down menu and using this as a description. When I search for the same page via google.com, the meta description is pulled in correctly. Any thoughts why this might be happening. I can't see anything in the Custom Site Search settings.

    Read the article

  • How to track events or e-commerce sales that occur later using Google Analytics?

    - by Anton
    Here's my problem: I have a static site with Google Analytics tracking code. To buy one of my services, users call me, and when their order is ready (many days later), I send them an e-mail link to a special page (download.php) where I have GA tracking code that is executed the first time they visit, so I track a "sale". The issue is, GA thinks that "sale" was a separate visit, and erroneously shows that only direct visits to my site result in sales. I don't understand how I can view stats (Pages / Visit, Avg. Time on Site, etc.) about users who eventually bought something. I've tried events and e-commerce tracking with no luck. Please help!

    Read the article

  • Box Collider isn't rotating with Game Object

    - by pek
    I have a method that creates a room by instantiating a prefab, places it in a grid and the re-sizes the collider based on a room definition (location in grid, rotation, width and height). Here is the method: public void CreateRoom(RoomAction action) { GameObject roomGameObject = Instantiate(this.roomPrefab, Vector3.zero, action.RoomPrefab.transform.rotation) as GameObject; roomGameObject.transform.parent = this.transform; roomGameObject.transform.localPosition = new Vector3(action.MansionOffsetX, 0, -action.MansionOffsetY) * this.blockSize; roomGameObject.transform.localPosition += new Vector3((action.Room.Width * this.blockSize) / 2, 0, -((action.Room.Height * this.blockSize) / 2)); BoxCollider roomCollider = roomGameObject.GetComponent<BoxCollider>(); roomCollider.isTrigger = true; roomCollider.center = new Vector3(0, this.height / 2, 0); roomCollider.size = new Vector3(action.Room.Width * this.blockSize, this.height, action.Room.Height * this.blockSize); roomGameObject.transform.RotateAroundLocal(roomGameObject.transform.up, Mathf.Deg2Rad * -90 * action.Rotation); } The problem I'm having is that, while the room rotates correctly, but for some reason, the collider isn't rotating with the game object. Here is a screenshot: Any idea on what am I doing wrong?

    Read the article

  • pygame double buffering

    - by BaldDude
    I am trying to use double buffering in pygame. What I'm trying to do is display a red then green screen, and switch from one to the other. Unfortunately, all I have is a black screen. I looked through many sites, but have been unable to find a solution. Any help would be appreciated. import pygame, sys from pygame.locals import * RED = (255, 0, 0) GREEN = ( 0, 255, 0) bob = 1 pygame.init() #DISPLAYSURF = pygame.display.set_mode((500, 400), 0, 32) DISPLAYSURF = pygame.display.set_mode((1920, 1080), pygame.OPENGL | pygame.DOUBLEBUF | pygame.HWSURFACE | pygame.FULLSCREEN) glClear(GL_COLOR_BUFFER_BIT) glMatrixMode(GL_MODELVIEW) glLoadIdentity() running = True while running: if bob==1: #pygame.draw.rect(DISPLAYSURF, RED, (0, 0, 1920, 1080)) #pygame.display.flip() glBegin(GL_QUADS) glColor3f(1.0, 0.0, 0.0) glVertex2f(-1.0, 1.0) glVertex2f(-1.0, -1.0) glVertex2f(1.0, -1.0) glVertex2f(1.0, 1.0) glEnd() pygame.dis bob = 0 else: #pygame.draw.rect(DISPLAYSURF, GREEN, (0, 0, 1920, 1080)) #pygame.display.flip() glBegin(GL_QUADS) glColor3f(0.0, 1.0, 0.0) glVertex2f(-1.0, 1.0) glVertex2f(-1.0, -1.0) glVertex2f(1.0, -1.0) glVertex2f(1.0, 1.0) glEnd() pygame.dis bob = 1 for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == KEYDOWN: if event.key == K_ESCAPE: running = False pygame.quit() sys.exit() I'm using Python 2.7 and my code need to be os independent. Thanks for your help.

    Read the article

  • How to correctly Dispose a SourceVoice once its finished

    - by clamp
    i am starting to play a sound with XAudio2 and SourceVoice and once its finished, it should be correctly disposed to not have any leaks. i was expecting it to be something like this: sourceVoice.Start(); sourceVoice.StreamEnd += delegate { if (!sourceVoice.IsDisposed) { sourceVoice.DestroyVoice(); sourceVoice.Dispose(); } }; but that crashes with a read access violation in native code deep in XAudio2.dll which i cant debug.

    Read the article

  • Away3D & Directional Light w/ Rotating Meshes

    - by seethru
    This is likely a stupid error but I can't seem to find what I've done wrong. I've got a simple scene with 10 cylinders rotating at a default speed. If I grab one of these cylinders I can rotate it in the opposite direction or at a greater speed. I have a single directional light in the scene. It would appear that the directional light is only calculated at initialization and not on further frames. The shadow created by the light rotates with the cylinder giving the impression that the light is rotating when it isn't. Camera & Light Initialization _view = new View3D(); addChild(_view); _view.antiAlias = 4; _view.backgroundColor = 0xFFFFFF; _view.camera.z = -850; _view.camera.y = 0; _view.camera.x = 0; _view.camera.lookAt(new Vector3D()); _view.camera.lens = new PerspectiveLens(15); _view.mousePicker = PickingType.RAYCAST_BEST_HIT; _light = new DirectionalLight(); _light.z = -850; _light.direction = new Vector3D(1, 1, 1); _light.color = 0xFFFFFF; _light.ambient = 0.1; _light.diffuse = 0.7; _view.scene.addChild(_light); Mesh and Material creation var material:TextureMaterial = new TextureMaterial(createPow2Texture(sprite, _colors[i]) , true, false, true); material.animateUVs = true; material.lightPicker = _lightPicker; cylinder = new Mesh(new CylinderGeometry(radius, radius, 13, 70, 1, true, true), material); cylinder.subMeshes[0].scaleU = spriteWidth / sprite.width; cylinder.y = y; cylinder.mouseEnabled = true; cylinder.pickingCollider = PickingColliderType.AS3_BEST_HIT; cylinder.addEventListener(MouseEvent3D.MOUSE_OVER, onMouseOverMesh); cylinder.addEventListener(MouseEvent3D.MOUSE_MOVE, onMouseOverMesh); cylinder.addEventListener(MouseEvent3D.MOUSE_OUT, onMouseOutMesh); _cylinders.push(cylinder); Frame private function onEnterFrame(event:Event):void { for each (var mesh:Mesh in _cylinders) { if (mesh == _mouseOverMesh) continue; mesh.rotationY += 0.25; } _view.render(); }

    Read the article

  • Voxel Face Crawling (Mesh simplification, possibly using greedy)

    - by Tim Winter
    This is in regards to a Minecraft-like terrain engine. I store blocks in chunks (16x256x16 blocks in a chunk). When I generate a chunk, I use multiple procedural techniques to set the terrain and to place objects. While generating, I keep one 1D array for the full chunk (solid or not) and a separate 1D array of solid blocks. After generation, I iterate through the solid blocks checking their neighbors so I only generate block faces that don't have solid neighbors. I store which faces to generate in their own list (that's 6 lists, one per possible face). When rendering a chunk, I render all lists in the camera's current chunk and only the lists facing the camera in all other chunks. Using a 2D atlas with this little shader trick Andrew Russell suggested, I want to merge similar faces together completely. That is, if they are in the same list (same normal), are adjacent to each other, have the same light level, etc. My assumption would be to have each of the 6 lists sorted by the axis they rest on, then by the other two axes (the list for the top of a block would be sorted by it's Y value, then X, then Z). With this alone, I could quite easily merge strips of faces, but I'm looking to merge more than just strips together when possible. I've read up on this greedy meshing algorithm, but I am having a lot of trouble understanding it. To even use it, I would think I'd need to perform a type of flood-fill per sorted list to get the groups of merge-able faces. Then, per group, perform the greedy algorithm. It all sounds awfully expensive if I would ever want dynamic terrain/lighting after initial generation. So, my question: To perform merging of faces as described (ignoring whether it's a bad idea for dynamic terrain/lighting), is there perhaps an algorithm that is simpler to implement? I would also quite happily accept an answer that walks me through the greedy algorithm in a much simpler way (a link or explanation). I don't mind a slight performance decrease if it's easier to implement or even if it's only a little better than just doing strips. I worry that most algorithms focus on triangles rather than quads and using a 2D atlas the way I am, I don't know that I could implement something triangle based with my current skills. PS: I already frustum cull per chunk and as described, I also cull faces between solid blocks. I don't occlusion cull yet and may never.

    Read the article

  • XNA matrix order problem

    - by user1990950
    I want a matrix that scales first and then rotates. I tried the code below, but it didn't work. zRotation, yRotation and xRotation are rotations that shouldn't be affected by the origin. allrot should be affected. xScale, yScale and zScale are the scaling variables. The code below works except that it rotates and then scales. Matrix worldMatrix = ( Matrix.CreateRotationZ(MathHelper.ToRadians(zRotation)) * Matrix.CreateRotationX(MathHelper.ToRadians(xRotation)) * Matrix.CreateRotationY(MathHelper.ToRadians(yRotation)) ) * ( Matrix.CreateTranslation(origin) * Matrix.CreateRotationY(MathHelper.ToRadians(allrot)) * Matrix.CreateScale(xScale, yScale, zScale) );

    Read the article

  • Advantages And Disadvantages Of Resource Serialization

    - by CPP_Person
    A good example is let's say I'm making a pong game. I have a PNG image for the ball and another PNG image for the paddles. Now which would be better, loading the PNG images with a PNG loader, or loading them in a separate program, serializing it, and de-serializing it in the game itself for use? The reason why this may be good to know is because it seems like game companies (or anyone in the long run) build all of their resources into some sort of file. For example, in the game Fallout: New Vegas the DLCs are loaded as a .ESM file, which includes everything it needs, all the game does is find it, serialize it, and it has the resources. Games like Penumbra: Black Plague take a different approch and add a folder which contains all the textures, sounds, scrips, ect that it needs, but not serialized (it does this with the game itself, and the DLC). Which is the better approch and why?

    Read the article

  • GLSL: Strange light reflections [Solved]

    - by Tom
    According to this tutorial I'm trying to make a normal mapping using GLSL, but something is wrong and I can't find the solution. The output render is in this image: Image1 in this image is a plane with two triangles and each of it is different illuminated (that is bad). The plane has 6 vertices. In the upper left side of this plane are 2 identical vertices (same in the lower right). Here are some vectors same for each vertice: normal vector = 0, 1, 0 (red lines on image) tangent vector = 0, 0,-1 (green lines on image) bitangent vector = -1, 0, 0 (blue lines on image) here I have one question: The two identical vertices does need to have the same tangent and bitangent? I have tried to make other values to the tangents but the effect was still similar. Here are my shaders Vertex shader: #version 130 // Input vertex data, different for all executions of this shader. in vec3 vertexPosition_modelspace; in vec2 vertexUV; in vec3 vertexNormal_modelspace; in vec3 vertexTangent_modelspace; in vec3 vertexBitangent_modelspace; // Output data ; will be interpolated for each fragment. out vec2 UV; out vec3 Position_worldspace; out vec3 EyeDirection_cameraspace; out vec3 LightDirection_cameraspace; out vec3 LightDirection_tangentspace; out vec3 EyeDirection_tangentspace; // Values that stay constant for the whole mesh. uniform mat4 MVP; uniform mat4 V; uniform mat4 M; uniform mat3 MV3x3; uniform vec3 LightPosition_worldspace; void main(){ // Output position of the vertex, in clip space : MVP * position gl_Position = MVP * vec4(vertexPosition_modelspace,1); // Position of the vertex, in worldspace : M * position Position_worldspace = (M * vec4(vertexPosition_modelspace,1)).xyz; // Vector that goes from the vertex to the camera, in camera space. // In camera space, the camera is at the origin (0,0,0). vec3 vertexPosition_cameraspace = ( V * M * vec4(vertexPosition_modelspace,1)).xyz; EyeDirection_cameraspace = vec3(0,0,0) - vertexPosition_cameraspace; // Vector that goes from the vertex to the light, in camera space. M is ommited because it's identity. vec3 LightPosition_cameraspace = ( V * vec4(LightPosition_worldspace,1)).xyz; LightDirection_cameraspace = LightPosition_cameraspace + EyeDirection_cameraspace; // UV of the vertex. No special space for this one. UV = vertexUV; // model to camera = ModelView vec3 vertexTangent_cameraspace = MV3x3 * vertexTangent_modelspace; vec3 vertexBitangent_cameraspace = MV3x3 * vertexBitangent_modelspace; vec3 vertexNormal_cameraspace = MV3x3 * vertexNormal_modelspace; mat3 TBN = transpose(mat3( vertexTangent_cameraspace, vertexBitangent_cameraspace, vertexNormal_cameraspace )); // You can use dot products instead of building this matrix and transposing it. See References for details. LightDirection_tangentspace = TBN * LightDirection_cameraspace; EyeDirection_tangentspace = TBN * EyeDirection_cameraspace; } Fragment shader: #version 130 // Interpolated values from the vertex shaders in vec2 UV; in vec3 Position_worldspace; in vec3 EyeDirection_cameraspace; in vec3 LightDirection_cameraspace; in vec3 LightDirection_tangentspace; in vec3 EyeDirection_tangentspace; // Ouput data out vec3 color; // Values that stay constant for the whole mesh. uniform sampler2D DiffuseTextureSampler; uniform sampler2D NormalTextureSampler; uniform sampler2D SpecularTextureSampler; uniform mat4 V; uniform mat4 M; uniform mat3 MV3x3; uniform vec3 LightPosition_worldspace; void main(){ // Light emission properties // You probably want to put them as uniforms vec3 LightColor = vec3(1,1,1); float LightPower = 40.0; // Material properties vec3 MaterialDiffuseColor = texture2D( DiffuseTextureSampler, vec2(UV.x,-UV.y) ).rgb; vec3 MaterialAmbientColor = vec3(0.1,0.1,0.1) * MaterialDiffuseColor; //vec3 MaterialSpecularColor = texture2D( SpecularTextureSampler, UV ).rgb * 0.3; vec3 MaterialSpecularColor = vec3(0.5,0.5,0.5); // Local normal, in tangent space. V tex coordinate is inverted because normal map is in TGA (not in DDS) for better quality vec3 TextureNormal_tangentspace = normalize(texture2D( NormalTextureSampler, vec2(UV.x,-UV.y) ).rgb*2.0 - 1.0); // Distance to the light float distance = length( LightPosition_worldspace - Position_worldspace ); // Normal of the computed fragment, in camera space vec3 n = TextureNormal_tangentspace; // Direction of the light (from the fragment to the light) vec3 l = normalize(LightDirection_tangentspace); // Cosine of the angle between the normal and the light direction, // clamped above 0 // - light is at the vertical of the triangle -> 1 // - light is perpendicular to the triangle -> 0 // - light is behind the triangle -> 0 float cosTheta = clamp( dot( n,l ), 0,1 ); // Eye vector (towards the camera) vec3 E = normalize(EyeDirection_tangentspace); // Direction in which the triangle reflects the light vec3 R = reflect(-l,n); // Cosine of the angle between the Eye vector and the Reflect vector, // clamped to 0 // - Looking into the reflection -> 1 // - Looking elsewhere -> < 1 float cosAlpha = clamp( dot( E,R ), 0,1 ); color = // Ambient : simulates indirect lighting MaterialAmbientColor + // Diffuse : "color" of the object MaterialDiffuseColor * LightColor * LightPower * cosTheta / (distance*distance) + // Specular : reflective highlight, like a mirror MaterialSpecularColor * LightColor * LightPower * pow(cosAlpha,5) / (distance*distance); //color.xyz = E; //color.xyz = LightDirection_tangentspace; //color.xyz = EyeDirection_tangentspace; } I have replaced the original color value by EyeDirection_tangentspace vector and then I got other strange effect but I can not link the image (not eunogh reputation) Is it possible that with this shaders is something wrong, or maybe in other place in my code e.g with my matrices?

    Read the article

  • AI for a mixed Turn Based + Real Time battle system - Something "Gambit like" the right approach?

    - by Jason L.
    This is maybe a question that's been asked 100 times 1,000 different ways. I apologize for that :) I'm in the process of building the AI for a game I'm working on. The game is a turn based one, in the vein of Final Fantasy but also has a set of things that happen in real time (reactions). I've experimented with FSM, HFSMs, and Behavior Trees. None of them felt "right" to me and all felt either too limiting or too generic / big. The idea I'm toying with now is something like a "Rules engine" that could be likened to the Gambit system from Final Fantasy 12. I would have a set of predefined personalities. Each of these personalities would have a set of conditions it would check on each event (Turn start, time to react, etc). These conditions would be priority ordered, and the first one that returns true would be the action I take. These conditions can also point to a "choice" action, which is just an action that will make a choice based on some Utility function. Sort of a mix of FSM/HFSM and a Utility Function approach. So, a "gambit" with the personality of "Healer" may look something like this: (ON) Ally HP = 0% - Choose "Relife" spell (ON) Ally HP < 50% - Choose Heal spell (ON) Self HP < 65% - Choose Heal spell (ON) Ally Debuff - Choose Debuff Removal spell (ON) Ally Lost Buff - Choose Buff spell Likewise, a "gambit" with the personality of "Agressor" may look like this: (ON) Foe HP < 10% - Choose Attack skill (ON) Foe any - Choose target - Choose Attack skill (ON) Self Lost Buff - Choose Buff spell (ON) Foe HP = 0% - Taunt the player What I like about this approach is it makes sense in my head. It also would be extremely easy to build an "AI Editor" with an approach like this. What I'm worried about is.. would it be too limiting? Would it maybe get too complicated? Does anyone have any experience with AIs in Turn Based games that could maybe provide me some insight into this approach.. or suggest a different approach? Many thanks in advance!!!

    Read the article

  • Get Unity to read in objects name without the need to hard code

    - by N0xus
    I'm trying to get away from having to hard code in the names of objects I want my code to use. For example, I'm use to do it this way: TextAsset test = new TextAsset(); test = (TextAsset)Resources.Load("test.txt", typeof(TextAsset)); What I want to know, is there a way to have so that when I drag my test.txt file onto my object in Unity, my code automatically gets the name of that object? I'm wanting to do this so once I write the code, I don't need to back in and change it should I wish re-use it.

    Read the article

< Previous Page | 8 9 10 11 12 13 14  | Next Page >