Search Results

Search found 5564 results on 223 pages for 'rollover effect'.

Page 1/223 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • how to make HLSL effect just for lighning without texture mapping?

    - by naprox
    I'm new to XNA, i created an effect and just want to use lightning but in default effect that XNA create we should do texture mapping or the model appears 'RED', because of this lines of code in the effect file: float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 { float4 output = float4(1,0,0,1); return output; } and if i want to see my model (appear like when i use basiceffect) must do texture mapping by UV coordinates. but my model does not have UV coordinates assigned or its UV coordinates is not exported. and if i do texture mapping i got error. (i do texture mapping by this line of code in vertexshaderfunction and other necessary codes) output.UV= input.UV i have many of this models and want to work with them.(my models are in .FBX format) when i use Bassiceffect i have no problem and model appears correctly. how can i use "just" lightnings in my custom effects? and don't do texture mapping (because i have no UV coordinates in my models) and my model be look like when i use BasicEffect? if you need my complete code Here it is: http://www.mediafire.com/?4jexhd4ulm2icm2 here is inside of my Model Using BasicEffect http://i.imgur.com/ygP2h.jpg?1 and this is my code for drawing with or without BasicEffect inside of my draw() method: Matrix baseWorld = Matrix.CreateScale(Scale) * Matrix.CreateFromYawPitchRoll(Rotation.Y, Rotation.X, Rotation.Z) * Matrix.CreateTranslation(Position); foreach(ModelMesh mesh in Model.Meshes) { Matrix localWorld = ModelTransforms[mesh.ParentBone.Index] * baseWorld; foreach(ModelMeshPart part in mesh.MeshParts) { Effect effect = part.Effect; if (effect is BasicEffect) { ((BasicEffect)effect).World = localWorld; ((BasicEffect)effect).View = View; ((BasicEffect)effect).Projection = Projection; ((BasicEffect)effect).EnableDefaultLighting(); } else { setEffectParameter(effect, "World", localWorld); setEffectParameter(effect, "View", View); setEffectParameter(effect, "Projection", Projection); setEffectParameter(effect, "CameraPosition", CameraPosition); } } mesh.Draw(); } setEffectParameter is another method that sets effect parameter if i use my custom effect.

    Read the article

  • Red Sand – An Awesome Fan Made Mass Effect Prequel [Short Movie]

    - by Asian Angel
    Welcome to Mars where humanity has just discovered the Prothean Ruins and Element Zero, but danger abounds as the Red Sand terrorist group seeks to claim Mars for themselves! If you love the Mass Effect game series, then you will definitely want to watch this awesome fan made prequel set 35 years before the events of the first game. Synopsis From YouTube: Serving as a prequel to the MASS EFFECT game series,”Red Sand” is set 35 years before the time of Commander Shepard and tells the story of the discovery of ancient ruins on Mars. Left behind by the mysterious alien race known as the Protheans, the ruins are a treasure trove of advanced technology and the powerful Element Zero, an energy source beyond humanity’s wildest dreams. As the Alliance research team led by Dr. Averroes (Ayman Samman) seeks to unlock the secrets of the ruins, a band of marauders living in the deserts of Mars wants the ruins for themselves. Addicted to refined Element Zero in the form of a narcotic nicknamed “Red Sand” which gives them telekinetic “biotic” powers, these desert-dwelling terrorists will stop at nothing to control the ruins and the rich vein of Element Zero at its core. Standing between them and their goal are Colonel Jon Grissom (Mark Meer), Colonel Lily Sandhurst (Amy Searcy), and a team of Alliance soldiers tasked with defending the ruins at all costs. At stake – the future of humanity’s exploration of the galaxy, and the set up for the MASS EFFECT storyline loved by millions of gamers worldwide. RED SAND: a Mass Effect fan film – starring MARK MEER [via Geeks are Sexy] 7 Ways To Free Up Hard Disk Space On Windows HTG Explains: How System Restore Works in Windows HTG Explains: How Antivirus Software Works

    Read the article

  • Rain effect looks like snowfall effect?

    - by Nikhil Lamba
    i am making a game in that game i want rain effect i am little bit far from this right now i am doing like below particleSystem.addParticleInitializer(new ColorInitializer(1, 1, 1)); particleSystem.addParticleInitializer(new AlphaInitializer(0)); particleSystem.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE); particleSystem.addParticleInitializer(new VelocityInitializer(2, 2, 20, 10)); particleSystem.addParticleInitializer(new RotationInitializer(0.0f, 30.0f)); particleSystem.addParticleModifier(new ScaleModifier(1.0f, 2.0f, 0, 150)); particleSystem.addParticleModifier(new ColorModifier(1, 1, 1, 1f, 1, 1, 1, 3)); particleSystem.addParticleModifier(new ColorModifier(1, 1, 1f, 1, 1, 1, 1, 6)); particleSystem.addParticleModifier(new AlphaModifier(0, 1, 0, 3)); particleSystem.addParticleModifier(new AlphaModifier(1, 0, 1, 125)); particleSystem.addParticleModifier(new ExpireModifier(50, 50)); scene.attachChild(particleSystem); But its looks like snowfall effect what changes i can do for make it rain effect please correct me EDIT : here is link for snapshot http://i.imgur.com/bRIMP.png

    Read the article

  • Best practice for setting Effect parameters in XNA

    - by hichaeretaqua
    I want to ask if there is a best practice for setting Effect parameters in XNA. Or in other words, what exactly happens when I call pass.Apply(). I can imagine multiple scenarios: Each time Apply is called, all effect parameters are transferred to the GPU and therefor it has no real influence how often I set a parameter. Each time Apply is called, only the parameters that got reset are transferred. So caching Set-operations that don't actually set a new value should be avoided. Each time Apply is called, only the parameters that got changed are transferred. So caching Set-operations is useless. This whole questions is bootless because no one of the mentions ways has any noteworthy impact on game performance. So the final question: Is it useful to implement some caching of set operation like: private Matrix _world; public Matrix World { get{ return _world; } set { if (value == world) return; _effect.Parameters["xWorld"].SetValue(value); _world = value; } } Thanking you in anticipation.

    Read the article

  • Best practice settings Effect parameters in XNA

    - by hichaeretaqua
    I want to ask if there is a best practice settings effect parameters in XNA. Or in other words, what exactly happens when I call pass.Apply(). I can imagine multiple scenarios: Each time Apply() is called, all effect parameters are transferred to the GPU and therefor it has no real influence how often I set a parameter. Each time Apply() is called, only the parameters that got reset are transferred. So caching Set-operations that don't actually set a new value should be avoided. Each time Apply() is called, only the parameters that got changed are transferred. So caching Set-operations is useless. This whole questions is bootless because no one of the mentions ways has any noteworthy impact on game performance. So the final question: Is it useful to implement some caching of Set-operation like: private Matrix _world; public Matrix World { get{ return _world;} set { if(value == world)return; _effect.Parameters["xWorld"].SetValue(value); _world = value; } Thanking you in anticipation

    Read the article

  • Side effect-free interface on top of a stateful library

    - by beta
    In an interview with John Hughes where he talks about Erlang and Haskell, he has the following to say about using stateful libraries in Erlang: If I want to use a stateful library, I usually build a side effect-free interface on top of it so that I can the use it safely in the rest of my code. What does he mean by this? I am trying to think of an example of how this would look, but my imagination and/or knowledge is failing me.

    Read the article

  • how to implemet a nice scanline effect using libgdx

    - by Alexandre GUIDET
    I am working on an old school platformer based on libgdx. My first attempt is to make a little texture and fill a rect above the whole screen, but it seems that I am messing arround with the orthographic camera (I use two camera, one for the tilemap and one to project the scanline filter). Sometime the texture is stuck on the tilemap and sometime it is too large and cover the whole screen in black. Is my approach correct using two camera? Does someone have a solution to achieve this retro effect using libgdx (see maldita castilla)? Thanks

    Read the article

  • XNA clip plane effect makes models black

    - by user1990950
    When using this effect file: float4x4 World; float4x4 View; float4x4 Projection; float4 ClipPlane0; void vs(inout float4 position : POSITION0, out float4 clipDistances : TEXCOORD0) { clipDistances.x = dot(position, ClipPlane0); clipDistances.y = 0; clipDistances.z = 0; clipDistances.w = 0; position = mul(mul(mul(position, World), View), Projection); } float4 ps(float4 clipDistances : TEXCOORD0) : COLOR0 { clip(clipDistances); return float4(0, 0, 0, 0); } technique { pass { VertexShader = compile vs_2_0 vs(); PixelShader = compile ps_2_0 ps(); } } all models using this are rendered black. Is it possible to render them correctly?

    Read the article

  • Google Maps Rollover Problem in a Flex Website

    - by Laxmidi
    Hi, I'm using Google Maps in my Flex site to create a map. I've got polygons overlayed on the map. When the user rolls over a polygon an infowindow opens identifying the area and the fill Alpha of the area is set to 0. On roll-out, the info window is removed and the fill Alpha is returned to the default, 0.2. The polygons display and the InfoWindow is added and removed correctly. The problem is that the change in fill alpha only occurs on the very last polygon in the list. So for example, if I have polygons A, B, C, and D. If I rollover A, then A's alpha should change. But, instead D's alpha changes. No matter which polygon I rollover, the last polygon's alpha changes. It's weird, because the infoWindows behave correctly on rollover. So, if I rollover polygon A, the correct information for InfoWindow A appears. Please see the code below: private function allEncodedPolygons(event:MouseEvent) : void { var myPaneManager:IPaneManager = map.getPaneManager(); var myMapPane:IPane = myPaneManager.createPane(); if (allHoodsToggle.selected) { map.clearOverlays(); mapType.selectedIndex = -1; for each (var neighbNode:XML in detailMapResultData){ outlinePolygon = this.createPoly(neighbNode); map.addOverlay(outlinePolygon)}; allHoodsToggle.removeEventListener(MouseEvent.CLICK, allEncodedPolygons); } else {myPaneManager.clearOverlays(); allHoodsToggle.removeEventListener(MouseEvent.CLICK, allEncodedPolygons); } } The function below creates the polygons and has the rollover function: private var neighbShapes:Polygon; private function createPoly(neighbNode:XML):Polygon { var optionsDefault:PolygonOptions = new PolygonOptions( { strokeStyle: {thickness: 5, color: 0xFFFF00, alpha: 0.4, pixelHinting: true}, fillStyle: { alpha: 0.2 }} ); var neighbCenterLat:Number = neighbNode.latitudeCenter.toString(); var neighbCenterLong:Number = neighbNode.longitudeCenter.toString(); var neighbCenter:LatLng = new LatLng(neighbCenterLat,neighbCenterLong); var optionsHover:PolygonOptions = new PolygonOptions( { fillStyle: { alpha: 0.0 }} ); var encodedData:EncodedPolylineData = new EncodedPolylineData(neighbNode.encoding.toString(), neighbNode.zoomFactor.toString(), neighbNode.level.toString(), neighbNode.numlevels.toString()); var encodedList:Array = [encodedData]; neighbShapes = Polygon.fromEncoded(encodedList, optionsDefault); neighbShapes.addEventListener(MapMouseEvent.CLICK, function(event:MapMouseEvent): void { map.openInfoWindow(event.latLng, new InfoWindowOptions({content: neighbNode.name.toString(), hasCloseButton:false, hasShadow:true})); }); neighbShapes.addEventListener(MapMouseEvent.ROLL_OVER, function(event:MapMouseEvent): void { neighbShapes.setOptions(optionsHover); map.openInfoWindow(neighbCenter, new InfoWindowOptions({content: neighbNode.name.toString(), hasCloseButton:false, hasShadow:false})); }); neighbShapes.addEventListener(MapMouseEvent.ROLL_OUT, function(event:MapMouseEvent): void { neighbShapes.setOptions(optionsDefault); }); return neighbShapes; } Any suggestions as to why the function that changes the alpha is firing on the last polygon only, even though the InfoWindow appears correctly? If anyone has any ideas, I'd love to hear them. Thanks. -Laxmidi

    Read the article

  • How to implement physical effect, perspective effect on Android

    - by asedra_le
    I'm researching about 2D game for Android to implement an Android Game Project. My project looks nearly like PaperToss. Instance of throwing a page, my game will throw a coin. Suppose that I have a coin put in three-dimensional that have coordinates at A(x,y,z). I throw that point ahead, after 1/100 second, that coin move from A(x,y,z) to A'(x',y',z'). By this way, I have two problems need to solve. Determine the formulas can be used to compute the coordinates of the coin at time t. This problem is under-researching. I have no idea to solve this problem. Mapping three-dimensional points to a two-dimensional and use those new coordinates (a two-dimensional coordinates) to draw our coin on screen. I have found two solutions for this problem: Orthographic projection & Perspective projection However, my old friend said that OpenGL supports to solve problems like my problems. Any body have experiences about my problems? Help me please :) Thank for reading my question.

    Read the article

  • disjointed rollover issues in explorer and safari

    - by Allan
    I have got a disjointed rollover script from Dax Assist: www . daxassist . com/js/disjointedrollovers.cfm check out the page I'm working on: http://www.gherkin.co.nz/tester/ The rollovers works pretty well on firefox, but in Explorer the larger images show up under the central div, and in Safari, they don't seem to work at all. Any ideas?

    Read the article

  • mouse rollover event in Python (VPython)

    - by kame
    Is there something similar to scene.mouse.getclick in the visual module (VPython)? I need it for a rollover. Thanks in advance. EDIT: I need a function for doing something when the mouse moves inside a special area without clicking.

    Read the article

  • Very simple jQuery rollover

    - by Gusepo
    I made a very simple jQuery img rollover function inspired by this one: http://www.smileycat.com/miaow/archives/000224.php. It just check all the imgs that contain _off in their name and swap them with an img with the same name but "_on" instead of "_off". Since I can't use background imgs in my layout, I feel that's an handy solution. But I've got the feeling that the swapping is not smooth, like if the function runs slow. What do you think? Are there ways to optimize it? Here is the code: function roll_over() { $("img[src*='_off']").hover( function() { var stringa = $(this).attr("src"); var stringa = stringa.replace("_off", "_on"); $(this).attr("src", stringa); }, function() { var stringa = $(this).attr("src"); var stringa = stringa.replace("_on", "_off"); $(this).attr("src", stringa); } ); }

    Read the article

  • Show information over image on rollover

    - by Chris
    I want to be able to show information (HTML basically) over an image when the mouse rolls over the image... I know there is a .hover() jQuery function but am unsure how to use it to get the desired effect. Ideally when a user hovers over an image it would "grey out" (e.g. layer of 50% opacity black) with some HTML like a title etc etc. Can someone point me in the right direction or provide sample code Thanks

    Read the article

  • Difference between the terms Material & Effect

    - by codey
    I'm making an effect system right now (I think, because it may be a material system... or both!). The effects system follows the common (e.g. COLLADA, DirectX) effect framework abstraction of Effects have Techniques, Techniques have Passes, Passes have States & Shader Programs. An effect, according to COLLADA, defines the equations necessary for the visual appearance of geometry and screen-space image processing. Keeping with the abstraction, effects contain techniques. Each effect can contain one or many techniques (i.e. ways to generate the effect), each of which describes a different method for rendering that effect. The technique could be relate to quality (e.g. high precision, high LOD, etc.), or in-game-situation (e.g. night/day, power-up-mode, etc.). Techniques hold a description of the textures, samplers, shaders, parameters, & passes necessary for rendering this effect using one method. Some algorithms require several passes to render the effect. Pipeline descriptions are broken into an ordered collection of Pass objects. A pass provides a static declaration of all the render states, shaders, & settings for "one rendering pipeline" (i.e. one pass). Meshes usually contain a series of materials that define the model. According to the COLLADA spec (again), a material instantiates an effect, fills its parameters with values, & selects a technique. But I see material defined differently in other places, such as just the Lambert, Blinn, Phong "material types/shaded surfaces", or as Metal, Plastic, Wood, etc. In game dev forums, people often talk about implementing a "material/effect system". Is the material not an instance of an effect? Ergo, if I had effect objects, stored in a collection, & each effect instance object with there own parameter setting, then there is no need for the concept of a material... Or am I interpreting it wrong? Please help by contributing your interpretations as I want to be clear on a distinction (if any), & don't want to miss out on the concept of a material if it should be implemented to follow the abstraction of the DirectX FX framework & COLLADA definitions closely.

    Read the article

  • Z-Index and javascript for rollover

    - by Raffaele
    I have a container (div) with a background image. In this div there is a menu - a horizontal list. What I need is to insert an image onMouseOver, positioning it absolutely, and showing it behind the text (of course!) AND on top of the div's background image. I also use jQuery, but I think this doesn't matter. The problem can be viewed online. Go to http://www.w3schools.com/css/tryit.asp?filename=trycss_zindex and paste the following text <html> <head> <style type="text/css"> img { top: 0; left: 0; position:absolute; z-index:-1; } #main { color: red; margin: 30px; padding: 20px; width: 700px; min-height: 400px; z-index: -2; background-image: url("http://www.google.com/logos/mother10-hp.gif"); background-repeat: no-repeat; } </style> </head> <body> <div id="main"> <h1>Z-Index question:</h1> <img src="w3css.gif" width="100" height="140" /> <p>How can we place the green pic between the text and the div#main?</p> <p>I need the green gif to appear</p> <ol> <li>On top of #main's background image</li> <li>Behind the text</li> </ol> </div> </body> </html>

    Read the article

  • jquery change image on mouse rollover

    - by Craig Rinde
    I have been having problems with this. I think this should be pretty simple but I cannot seem to get it to work. I want a new image to appear when rolling over my facebook button. Thanks for your help! <p align="right"> <a href="http://www.facebook.com/AerialistPress" ><img height="30px" id="facebook" class="changePad" alt="Aerialist Press Facebook Page" src="/sites/aerialist.localhost/files/images/facebook300.jpg" /></a> <a href="http://twitter.com/#!/AerialistPress" > <img height="30px" class="changePad" alt="Aerialist Press Twitter Page" src="/sites/aerialist.localhost/files/images/twitter300.jpg" /></a> <a href="http://www.pinterest.com/aerialistpress" ><img height="30px" class="changePad" alt="Aerialist Press Pinterest Page" src="/sites/aerialist.localhost/files/images/pinterest300.jpg" /></a> </p> <script> jQuery(document).ready(function(){ jQuery('#facebook').mouseover(function() { jQuery('#facebook').attr('src').replace('/sites/aerialist.localhost/files/images/facebook-roll.jpg'); }) }); </script>

    Read the article

  • How to apply the shake effect to a dialog with an embedded form

    - by Felix Guerrero
    Hi. I'm newbie on this, I'm trying to apply the shake effect to a dialog that has an embedded form but not success on this. When I try to trigger the effect $("#divDialogContainer").effect("shake", {times: 3}, 80); only the fields inside the form tag is taking the effect but the dialog box itself doesn't. My div Code My dialog $("#restore_password").dialog({ height: 220, width: 310, autoOpen: false, modal: true, draggable: false, resizable: false, show: 'puff', hiden: 'puff', buttons: { "Confirm": function(){ $("#change_password").dialog('open'); }, "Cancel": function(){ $(this).dialog('close'); $("#forgot_data").dialog('close'); $("#dialog-form").dialog('open'); setTimeout(function(){ $("#name").focus(); }, 800); } }, close: function() { allFields.val('').removeClass('ui-state-error'); } }); Any ideas?, it would be helpful.

    Read the article

  • Jquery Effect Onunload

    - by j3frea
    I would like to use the jquery slideUp effect when the user navigates away from the page just to make the page look cool as it closes. I assume that I should use the onunload event but how can I delay the page closing long enough for the effect to run to completion. One of the options that came to mind is effectively hijacking the page closing function, storing it in some variable and then executing it once I had run my effect but I have no idea how I would do that. Any suggestions or alternative ideas are more than welcome

    Read the article

  • jQuery effect on iframe parent document

    - by Jabes88
    Just wondering if anyone else has experienced this or knows why I am getting an error. I'm using javascript from within an iframe to call a parent dom element then use jQuery UI's effect core to shake it. Here is an example: $(document).ready(function(){ if ($("form").length>0) { $("form").submit(function(){ var oParentDoc = $(parent.document).find("div#element"); var action = $(this).attr("action"); var postdata = $(this).serialize(); $(oParentDoc).addClass("loading"); $.post(action,postdata,function(data){ $(oParentDoc).removeClass("loading").effect("shake",{"times":3,"distance":10},60); }); return false; }); } }); It works without the effect, but when I use an effect it gives me this error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCSSStyleDeclaration.getPropertyValue]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" Thanks in advance for any insight :)

    Read the article

  • Toggle Blind Effect

    - by flipflopmedia
    Is there a way to alter this script to be used as the blind effect. // Andy Langton's show/hide/mini-accordion - updated 23/11/2009 // Latest version @ http://andylangton.co.uk/jquery-show-hide // this tells jquery to run the function below once the DOM is ready $(document).ready(function() { // choose text for the show/hide link - can contain HTML (e.g. an image) var showText=''; var hideText=''; // initialise the visibility check var is_visible = false; // append show/hide links to the element directly preceding the element with a class of "toggle" $('.toggle').prev().append(' '+showText+''); // hide all of the elements with a class of 'toggle' $('.toggle').hide(); // capture clicks on the toggle links $('a.toggleLink').click(function() { // switch visibility is_visible = !is_visible; // toggle the display - uncomment the next line for a basic "accordion" style //$('.toggle').hide();$('a.toggleLink').html(showText); $(this).parent().next('.toggle').toggle('slow'); // return false so any link destination is not followed return false; }); }); FYI- Where it says: var showText=''; var hideText=''; It was originally: var showText='Show'; var hideText='Hide'; I deleted the Show/Hide Text because I am applying the link to different areas of text. I like the Blind effect, vs. this Toggle effect, and need to know how to apply it, if possible. I cannot find a basic Blind effect script that allows the use of applying the link to ANY text, vs. a button or static text. Thanks! Hope you can help! Tracy

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >