Author Topic: RMXP 3D Rendering Script  (Read 2620 times)

0 Members and 2 Guests are viewing this topic.
ChaosSpartan28 Male
*
Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
Rep: +37/-8
Offline Offline
Level 68 (67%)
Hi, there.
RMXP 3D Rendering Script
« on: April 27, 2009, 09:46:31 PM »

  • I'm not sure if anyone has seen this lately, but I seriously thought this was amazing.
    From http://www.rpg-palace.com/forums/index.php?showtopic=19034

    Quote
    UPDATE - 4/24/09
    Alright guys, big goings-on. I can now successfully make 3D maps using the 2D map editor! Now, this time around it is pretty simple-- all tiles are simply cubes and the id of the tile determines which texture the cube gets. This, however, proves the validity of using RMXP to make 3D games.

    Now, not only is drawing these 2D maps in 3D with my tool possible, it is also, so far, much much faster than drawing the maps in 2D using RGSS Graphics Module. In fact, during my testing I get 250+ frames per second.

    Alright, so enough talk. Let's get to the awesome: *BIG Image Warning*
    Layer 1 in RMXP
    Spoiler for Hiden:
    Layer 2 in RMXP
    Spoiler for Hiden:
    Layer 3 in RMXP
    Spoiler for Hiden:
    Full map in 3D
    Spoiler for Hiden:

    Now, the RGSS code running the demo: (No explanatory comments this time, guys :P)
    Spoiler for Hiden:
    Code: [Select]

      DF_GameWindow.set_dimensions(0,0,0,0)
      device = DF3DDevice.new(Video::EDT_DIRECT3D9, [800,600], 32, false)
      smgr = device.scene_manager
      driver = device.video_driver
      camera = smgr.add_camera_scene_node_FPS
      camera.set_position(-100,300,-100)
      camera.set_target(0,0,0)
      $data_tilesets   = load_data("Data/Tilesets.rxdata")
      $data_common_events = load_data("Data/CommonEvents.rxdata")
      $game_map = Game_Map.new
      $game_map.setup(1)
     
      for i in 0...20
    for j in 0...15
      for k in 0...3
    if $game_map.data[i,j,k] != 0
      node = smgr.add_cube_scene_node(64)
      node.set_position(i * 64, k * 64, j * 64)
      node.set_material_flag(Video::EMF_LIGHTING, false)
      texture_name = ($game_map.data[i,j,k] - 383).to_s + ".png"
      node.set_material_texture(0, driver.get_texture(texture_name))
    end
      end
    end
      end
     

     
      lasttime = Time.now
      while device.run
    DF_Input.update

    if DF_Input.trigger?(DF_Input::KEY_F)
      p driver.get_fps
    end

    time = Time.now
    if time - lasttime > 5
      Graphics.update
      lasttime = Time.now
    end
    driver.begin_scene(true, true, [255, 160, 160, 255])
    smgr.draw_all
    driver.end_scene
      end
     
      device.drop
     

    And, of course, there's a demo to be had!
    Keys:
    Arrow Keys to move (for now. I will change it later so you can use WASD)
    F to show FPS
    CTRL + F4 to quit

    Link: Download Now!

    [size=150]Don't Forget:[/size]
    I still need help with art and with moral support!
    Please contact me if you are a 3D artist.
    If you want to offer moral support, keep posting!

    Old Releases:

    Third Release (RGSS Controls the 3D)
    Spoiler for Hiden:
    Alright guys, now it's time to show you something really cool. I don't have a demo, but instead I have a screen shot and some real RGSS code to do with it.



    And here is the magical RGSS code that does it. (Normally, you would put this in a scene, but you guys know how to make scenes so I didn't bother)

    Code: [Select]
      #First, let's move the 2D window out of the way:
      DF_GameWindow.set_dimensions(0,0,0,0)
      #next, let's create out device. The parameters are:
      #Driver type, screen size (in an array), bits per pixel, and fullscreen
      #This device is the central point of the 3D engine. Absolutely everything
      #can be accessed through this device.
      device = DF3DDevice.new(Video::EDT_DIRECT3D9, [800,600], 32, false)
      #Now, let's get our scene manager. The scene manager does stuff like adding nodes
      #and cameras
      smgr = device.scene_manager
      #Now, let's get our driver. The driver handles actually rendering.
      driver = device.video_driver
      #Let's get our mesh! (Note that you should probably add error handling here.
      #smgr.get_mesh will return nil if it can't find the file so make sure you
      #always check that the mesh was actually created. I didn't do any error handling
      #but a simple check for nil would suffice)
      mesh = smgr.get_mesh("sydney.md2")
      #Let's create an animated scene node from the mesh. Again, normally you
      #want to check for errors.
      node = smgr.add_animated_mesh_scene_node(mesh)
      #now, let's add a camera to the scene node! Camera are how you view everything
      #in the scene. Note that it is possible to have more than one camera and
      #you can switch between them, or even have them render to different parts
      #of the screen.
      camera = smgr.add_camera_scene_node
      #move our camera, since both the camera and scene node are at the same, default
      #position right now. (Which is (0,0,0)) Note that the parameters here are x, y, z.
      #when your camera is at (0,0,0) and has no rotation, x is sideways, y is up,
      #and z is forwards/backwards
      camera.set_position(100,100,100)
      #Rememeber how I said that the default position is 0,0,0? Well, since we never moved
      #our node, it is at 0,0,0 right now. So, Let's tell the camera to look there:
      camera.set_target(0,0,0)
     
      lasttime = Time.now
      while device.run #check if our device is still running
    #begin rendering the scene. I will not explain what these parameters are yet
    #it's not important right now, and it's kind of complicated XD
    driver.begin_scene(true, true, [255, 160, 160, 255])
    smgr.draw_all #draw all of the scene nodes
    driver.end_scene #finish rendering the scene
    #this junk is just so Graphics doesn't whine.
    time = Time.now
    if time - lasttime > 5
      Graphics.update
    end
      end
     
      #Now, alway always always remember to drop your device when you are done.
      #The device is something you should only drop at the end of your game, after
      #the device no longer runs.
      device.drop


    Second Release (First look at game logic)
    Spoiler for Hiden:
    Hey guys! I just finished a new demo! This one allows you to actually walk around, so you guys can see that this is actually practical for making a game, and not just taking screenshots. You can also choose which renderer to use. Note that the 2 software renderers are very slow, and D3D8 does not work at all. OpenGL or D3D9 are your best bet.

    I will post the RGSS code tomorrow, so you can see what it is like, but I am out of time.

    Alright, first a screenshot. ON this screenshot I only took a picture of the 3D window, since you guys know it is actually RMXP (vgvgf can vouch for me, since he actually decrypted the project and looked XD)



    And the new demo can be downlaoded here:
    3D RMXP Walking Demo

    KEYS:
    Arrow keys to walk
    Mouse to look
    F to print current FPS (Please tell me what you get)
    Ctrl+F4 to quit (not alt, note that alt is disabled while running this)

    First Release (3D rendering)
    Spoiler for Hiden:


    Do I have it now? Good. That is exactly what it looks like: a 3D program running from RMXP. (I will explain why there are two windows, the little one and the big one*)

    Don't believe me? Try it yourself:
    RMXP in 3D Demo

    Sig by MacGravel
    grafikal Male
    *
    Resource Artist
    Rep: +164/-112
    Offline Offline
    Level 74 (76%)
    I really want those fucking flippers.
    Re: RMXP 3D Rendering Script
    « Reply #1 on: April 28, 2009, 12:38:51 AM »

  • wow, this is amazing. i hope he gets someone good to make resources.

    Polraudio Male
    ***
    Rep: +13/-12
    Offline Offline
    Level 65 (22%)
    Need Help?
    Re: RMXP 3D Rendering Script
    « Reply #2 on: April 28, 2009, 06:27:46 AM »

  • This is awesome. Wonder how it would run with events.

    http://files.filefront.com/Umaro+Tondaro+DEMOrar/;13445243;/fileinfo.html
    Dowload Umaro Tondaro Demo Here Un-compressed[/url]
    grafikal Male
    *
    Resource Artist
    Rep: +164/-112
    Offline Offline
    Level 74 (76%)
    I really want those fucking flippers.
    Re: RMXP 3D Rendering Script
    « Reply #3 on: April 28, 2009, 12:34:17 PM »

  • i was reading the post from that website and the author said that events would be the same but probably a little different because he planned on making enhancements. So, this seems like it'll be awesome.

    NAMKCOR Female
    *
    !!!
    Rep: +915/-239
    Offline Offline
    Level 77 (96%)
    ???
    Re: RMXP 3D Rendering Script
    « Reply #4 on: May 05, 2009, 11:00:49 AM »

  • holy crap that's amazing.

    Zylos Male
    *
    Furry Philosopher
    Rep: +242/-133
    Offline Offline
    Level 74 (20%)
    Checkmate.
    Re: RMXP 3D Rendering Script
    « Reply #5 on: May 05, 2009, 12:19:01 PM »

  • This is amazing, but somehow I doubt it'll see much use. <_<
    hafidhAura Male
    **
    Rep: +0/-0
    Offline Offline
    Level 53 (07%)
    hello all, I'm still a beginner ...
    Re: RMXP 3D Rendering Script
    « Reply #6 on: December 08, 2009, 11:30:50 PM »

  • hahahah........ :lol: :lol: :lol:
    you'r amazing...  :o :o :o
    two thumbs for you..... :tpg: :tpg: :tpg:

    I do not even think RMXP be 3D..

    >>sorry bad english<<
    ( ;D google translate ;D)
    joy Female
    *
    Rep: +35/-2
    Offline Offline
    Level 59 (21%)
    Carrion Feeder
    Re: RMXP 3D Rendering Script
    « Reply #7 on: December 08, 2009, 11:34:27 PM »

  • Translate this:

    DON'T NECROPOST

    The last post was made in MAY. You've added nothing substantial enough to warrant reviving this topic.

    I may be old but at least I'm not like all those other old guys.
    ngoaho Male
    **
    Rep: +1/-2
    Offline Offline
    Level 52 (35%)
    Real-time RPG is great
    Re: RMXP 3D Rendering Script
    « Reply #8 on: January 18, 2010, 02:53:02 AM »

  • AMAZING !!!!!!!!!!!!!!!!
    need a team mate for dev game in rgss.
    y!m: ngoaho91
    gtalk: ngoaho91
    game dev resource: http://www.mediafire.com/ngoaho
    NAMKCOR Female
    *
    !!!
    Rep: +915/-239
    Offline Offline
    Level 77 (96%)
    ???
    Re: RMXP 3D Rendering Script
    « Reply #9 on: January 18, 2010, 02:57:54 AM »



  • Nathanael
    **
    Rep: +1/-0
    Offline Offline
    Level 51 (68%)
    Re: RMXP 3D Rendering Script
    « Reply #10 on: April 13, 2010, 08:21:52 AM »

  • This is like WOW!!
    modern algebra Male
    *
    Rep: +336/-113
    Offline Offline
    Level 79 (49%)
    Re: RMXP 3D Rendering Script
    « Reply #11 on: April 13, 2010, 08:38:35 AM »

  • Is Most Resurrected Thread a category for the RMRK Awards?


    Zeriab
    *
    ? ? ? ? ? ? ? ? ? The nice kind of alien~
    Rep: +154/-10
    Offline Offline
    Level 74 (01%)
    Martian - Occasionally kind
    Re: RMXP 3D Rendering Script
    « Reply #12 on: April 13, 2010, 09:55:02 AM »

  • Good question XD
    I think DeM0nFiRe dropped it or just left it unfinished.
    garygill <3
     

    hi

    RMRK.net Theme Super Ultra Mega Beta

    Follow RMRK on Twitter Ask RMRK Questions on Formspring Get RMRK Updates via Windows Live

    Page created in 0.425 seconds with 19 queries.