Results 1 to 24 of 24
  1. #1
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default Need help with 3Di

    Hey!

    So I'm trying to make a 3D UI for my game using Scaleform, and I want it look like the example 'udk_invetory', but can't figure how to do it. I've been looking alone a lot, and I have not be able to find stuff to help me learn how to do it. Any help would be helpful :P

  2. #2
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    Did you look at Working with 3Di from Scaleform? (Might not be exact name) but they show the AS2 code there.

  3. #3
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    Here's the code from mine...
    Code:
    _global.gfxExtensions = true;
    var brot:Boolean = false;
    var ox:Number = 0;
    var oy:Number = 0;
    var orx:Number = 0;
    var ory:Number = 0;
    this.onMouseMove  = function()  {
    	if (brot) {
    		calcRotations();
    	}	
    }
    var mouseListener:Object = new Object;
    Mouse.addListener(mouseListener);
    mouseListener.onMouseDown = function(button : Number) {
    	if (button == 2) {
    		brot = true;
    		ox = _root._xmouse;
    		oy = _root._ymouse;
    		orx = Hud._yrotation;
    		ory = -Hud._xrotation;	
    	}
    }
    mouseListener.onMouseUp = function(button : Number) {
    	if (button == 2) {
    		brot = false;
    	}
    }
    
    function calcRotations():Void {
    	rotX = orx + ((_root._xmouse - ox) / 1024) * 90;
    	rotY = ory + ((_root._ymouse - oy) / 1024) * 90;
    
    	Hud._yrotation = rotX;
    	Hud._xrotation = -rotY;
    	Left._yrotation = rotX
    	Left._xrotation = -rotY
    	Right._yrotation = rotX
    	Right._xrotation = -rotY
    }
    Note: HUD,Left,and Right are the Movie Clips on my 3Di interface, replace them with your corresponding Movie Clip instance names.

  4. #4
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Thanks a ton! Now another question if anyone else can help me out, but how do I apply this to a BSP surface in UDK and just have it be 3D? Kinda like in Dead Space 2.

  5. #5
    MSgt. Shooter Person
    Join Date
    Jan 2011
    Posts
    30

    Default

    Render targets. You can render the SWF to a texture and apply that to BSP.

    http://udn.epicgames.com/Three/GFxUs...erTargets.html

  6. #6
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    I tried that, but it doesn't 'pop out' like I would like it to. Maybe I'm doing something wrong in the Actionscript... I'll mess with it some more.

  7. #7
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    You have to use Z instead of y or x for individual elements to 'pop out'

  8. #8
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Ah ok. So would I just change all the _yrotation and _xrotation things to _zrotation? And sorry for my noobieness :P

  9. #9
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    oh no, not the rotation what i'm talking about is the "pop out" part. That's on the Z-Axis, you don't use Z rotation or else it'll rotate up or down.
    you keep the _yrotation and _xrotation. There's a code where it configures the Z of a movie clip.. I can't remember it right now...

  10. #10
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    Found it
    Code:
    (Move Clip Name here)._z = (any integer value)
    Note: Positive making it pop out (I think) and Negative being the opposite of positive

  11. #11
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    still not working... Here's my code:

    Code:
    _global.gfxExtensions = true;
    var brot:Boolean = false;
    var ox:Number = 0;
    var oy:Number = 0;
    var orx:Number = 0;
    var ory:Number = 0;
    this.onMouseMove  = function()  {
    	if (brot) {
    		calcRotations();
    	}	
    }
    var mouseListener:Object = new Object;
    Mouse.addListener(mouseListener);
    mouseListener.onMouseDown = function(button : Number) {
    	if (button == 2) {
    		brot = true;
    		ox = _root._xmouse;
    		oy = _root._ymouse;
    		orx = HealthBar._yrotation;
    		ory = -HealthBar._xrotation;	
    	}
    }
    mouseListener.onMouseUp = function(button : Number) {
    	if (button == 2) {
    		brot = false;
    	}
    }
    
    function calcRotations():Void {
    	rotX = orx + ((_root._xmouse - ox) / 1024) * 90;
    	rotY = ory + ((_root._ymouse - oy) / 1024) * 90;
    
    	HealthBar._yrotation = rotX;
    	HealthBar._xrotation = -rotY;
    	Power_Levels_bar._yrotation = rotX;
    	Power_Levels_bar._xrotation = -rotY;
    	Facility_condition_bar._yrotation = rotX;
    	Facility_condition_bar._xrotation = -rotY;
    }
    
    
    
    Title_01._z = -200;
    map._z = 500;
    com_pass._z = 0;
    lock1._z = 500;
    origin._z = -500;
    a_304._z = -500;
    lock2._z = -500;
    Power_Levels_bar._z = 400;
    playbtn._z = -500;
    subands._z = -200;
    output._z = 1000;
    log._z = 0;
    logs._z = 500;
    log_32._z = 0;
    HealthBar._z = -500;
    audio._z = -700;
    advanced._z = -700;
    brackets._z = -500;
    BackGround._z = 0;

  12. #12
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    What's not working?

  13. #13
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    I think I found the problem, you should create a new layer called Actions and put the ._z codes there. Maybe that will work..

  14. #14
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Everything in that code is on one keyframe on a diffrent layer called Actions. And nothing in UDK is 'poping out' like I would like, it's just staying 2D.... I'll try making a seconds actions layer, see if that works.

  15. #15
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    I should probably say that in UDK, I have a TextureRenderTarget2D that is set as the render Texture in Kismet, and I have the .fla file set as the movie, then movie player class is GFxMoviePlayer. Then I put the texture onto a BSP by having a texture sample in the material editor, and the material is set to Blend mode: BLEND_Translucent and LightingModel as MLM_Unlit.

    Am I messing something up in UDK maybe?

  16. #16
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    73

    Default

    Ohhh 2D... That's probably the reason, I don't have any luck on 3D on Render Targets, only when it's as a HUD..

  17. #17
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Ok. Do you have any ideas? As far as I know, you can only render GFx movies on TextureRenderTarget2D...

  18. #18
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Posts
    283

    Default

    not true. gfx can be rendered to the screen also. im not up on the in-depth scripting but each gfx player class instance has lots of params about how its rendered, and you should find out about those.
    if youre using kismet to open the movie, params about how its rendered can be found in the properties of the OpenGFXMovie node

    as for 3di - it should work even on an RTT since its all manipulated internally and rendered out - itl just be a 2d picture of a 3d scene. if you want true 3d, ie rendering it onto meshes in the game world, you will have to either make seperate and synced movies, or split your movie up visually to be more like a texture sheet, and uv the meshes to only map to parts of the movie.

  19. #19
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Ok. Would there be any way I can render a 3Di file and have it 'pop' out on a BSP surface?

  20. #20
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Posts
    56

    Default

    Is this what you're looking for?


    I just placed a plane above my BSP at the angle I wanted an applied a render texture to it.

    Beyond that, you can use a RenderTargetCube probably to UV it to a cube mesh for 3D

  21. #21
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Yea, that what I wanted it to look like! If I wanted to do this, would there be a way to removed the collision from the plane/BSP?

  22. #22
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Posts
    56

    Default

    Quote Originally Posted by Hamstamps View Post
    Yea, that what I wanted it to look like! If I wanted to do this, would there be a way to removed the collision from the plane/BSP?
    Convert it to a static mesh. It will then have no collision. Select the BSP brush (not the face, the actual brush. Go into brush view on the viewport if you have problems.) right clip and convert to static mesh.

    Scratch that, it looks like the plane bsp loses its collision when you use a RenderTarget2D on it with an alpha/opacity hookup.

    You don't have to do anything special just hook the opacity up in the render mat your movie should have no coliision.
    Last edited by Shozokui; 04-30-2012 at 02:27 AM.

  23. #23
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Okay thanks a ton! I'll try it out a bit later when I get some time!

  24. #24
    MSgt. Shooter Person
    Join Date
    Mar 2012
    Posts
    46

    Default

    Putting a TextureRenderTarged2D on a sheet BSP removed the collision! Thanks a ton for the help!


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.