Jump to content



Photo
* * * * * 12 votes

Dev thread: Road to DX9


  • Please log in to reply
2087 replies to this topic

#61 hotdp

hotdp

    Enthusiast

  • Members
  • PipPipPip
  • 434 posts

  • Flag: Denmark

  • Favorite Pinball: T2

Posted 27 January 2014 - 08:44 PM

There, this is better. Knew it had to be some minor thing.

 

attachicon.gif2014-01-27 22_21_44-Visual Pinball Player.png

 

I can really see that DX9 makes a big difference  :tongue3:



#62 bent98

bent98

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,077 posts
  • Location:NY

  • Flag: United States of America

  • Favorite Pinball: Roadshow, Haunted House, Safe Cracker

Posted 27 January 2014 - 10:07 PM

what would you say are your chances for completing this huge task?  I don't want to discourage you, but others have tried.  I know its early, but you might have an idea if it is still possible, looks like your going gangbusters!  Thanks

 
Right now I'm very optimistic that I will manage. I know the picture
must look disheartening to a non-developer, but I was actually very happy when I saw that. It proved to me that the initialization and render loop are working. Basically, the heavy lifting is done. From here on out, all that is left to do is to fix bugs, then re-enable the features that were disabled, and optimize. These are now all small, incremental things. We took the leap: we are in DX9 land now.
 
Basically, I know why most of the things in that screenshot look like that, and I know how to fix them. (Bar the weird flippers, but that's probably a simple index bug.) Another way to put it is that, if you look back at my little roadmap, we are in step 4 of 4 already.

Holy $h"t you work fast! Thank you again for your efforts

#63 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 28 January 2014 - 08:49 AM

Ok! Default table looks almost fine already:

 

Attached File  2014-01-28 10_38_38-Visual Pinball Player.png   620.9KB   33 downloads

 

The only thing is that the ball is still white because textures aren't in yet.

 

I had to work around a problem here. In DX7, we used DrawIndexedPrimitiveVB, which takes its vertices from a vertex buffer, but its indices from a directly passed memory array. This call is not supported in DX9, there you always need to pass an index buffer if you pass a vertex buffer. So for now I set up an internal dynamic index buffer which is filled with the passed indices. This works but it's definitely not ideal, so in the long run we should convert such calls to use index buffers.

 

If you ever wondered, here is how LOTR looks without textures:

 

Attached File  2014-01-28 10_40_47-Visual Pinball Player.png   338.13KB   28 downloads

 

One thing I can say for sure aleady is that the Nvidia Optimus issue is completely fixed with this DX9 port, I can now play with my GT 540M without issues, whereas before I got unusable framerates.



#64 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 28 January 2014 - 09:11 AM

very cool..

 

and don't worry about the index buffers yet..

as all of the render calls need to be re-visited anyhow (some of the pre-rendered stuff didn't use vertex buffers yet, others have dozens of drawcalls), these are just details..

later-on we will have to worry more about state/materials changes and all this crap..



#65 fuzzel

fuzzel

    spaghetti code

  • VP Dev Team
  • PipPipPipPipPip
  • 2,818 posts

  • Flag: Germany

  • Favorite Pinball: yes I have

Posted 28 January 2014 - 09:34 AM

Yes very cool! I thought of adding an index bigger class to vp but as Toxie said we have to do it anyway and convert all elements.

#66 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 28 January 2014 - 10:54 AM

Dunno if this is a weird quesion or not , but this can mean the desktop & full screen renders can be no different now? We can get 3D objects to work with like FP?


Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#67 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 28 January 2014 - 11:16 AM

Dunno if this is a weird quesion or not , but this can mean the desktop & full screen renders can be no different now? We can get 3D objects to work with like FP?

 

In what way are they different right now?



#68 Dozer316

Dozer316

    Dozer

  • VIP
  • 669 posts

  • Flag: Australia

  • Favorite Pinball: Cirqus Voltaire

Posted 28 January 2014 - 11:49 AM

I'm only guessing here but I assume he means the fact that when a table is in desktop orientation, there is a greater sense of depth with regard to ramp heights, etc which may have given the impression that the engine was using a different rendering mode to achieve this.



#69 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 28 January 2014 - 12:26 PM

actually there is no difference currently, and also won't be.. it's all just in the transformation matrix setup.. (something that has to change anyhow, especially if we want to get something similar to what BAM can do in FP)

 

the only thing that will change for sure, which is a real problem currently for DT vs FS, is the lighting via "real" light sources..

i already started this some time ago by making the default light sources of VP more configurable, but apparently nobody used that so far in real tables, but this is something that will need to be changed completely as its a mess as it is currently (light sources don't transform same as the table does if the default/legacy mode is used in VP, etc)..

 

also we need to move towards real materials and real lighting later-on, as this will give artists much more freedom and much less pain to get things looking "correct"..

but i'm now drifting away from the initial DX9 port work, sorry.. ;)



#70 zany

zany

    3D Beer Drinker

  • VIP
  • 1,644 posts

  • Flag: Sweden

  • Favorite Pinball: Medieval Madness



Posted 28 January 2014 - 12:40 PM

Hell mukuste....you are AMAZING!!! :D
 



#71 randr

randr

    I'm just a hardware guy so...

  • VIP
  • 2,650 posts
  • Location:Minnesota

  • Flag: United States of America

  • Favorite Pinball: Twilight Zone

Posted 28 January 2014 - 12:51 PM

Unreal! Has anyone got this far along with it before?


Sent from my iPhone using Tapatalk

randr___pinball.png                         


#72 arngrim

arngrim

    DJ Force Feedback

  • VIP
  • 2,188 posts
  • Location:Charleroi, Belgium

  • Flag: Belgium

  • Favorite Pinball: Monster bash



Posted 28 January 2014 - 02:08 PM

he's working too fast, this is not normal



#73 Les73gTx

Les73gTx

    Preschooler

  • Members
  • PipPipPipPip
  • 523 posts
  • Location:Maine

  • Flag: United States of America

  • Favorite Pinball: Power Play, BoP, JackBot, MM, AFM, CV, MB,Champions Pub, CftBL, ToM, and Many More

  • PS3 Gamer Tag: LCT0819, Les73gtx
  • 360 Gamer Tag: PissPoorShot

Posted 28 January 2014 - 02:34 PM

Amazing to read about all the exciting changes happening ... very happy to see someone dedicating the time and effort to the community to a long needed and huge project. Thank you for all your efforts ...
Also thanks to the current devs as all you hard work and efforts have led us to this point. Exciting times for sure

Sent from my SAMSUNG-SGH-I747 using Tapatalk


les73gtx___atomicpin-pc.png
                                                                      


#74 DJRobX

DJRobX

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 941 posts
  • Location:Valencia, CA

  • Flag: United States of America

  • Favorite Pinball: F14 Tomcat

Posted 28 January 2014 - 04:42 PM

Very nice!  :dblthumb:     I like the square ball - very Pong-retro.  :) 


Edited by DJRobX, 28 January 2014 - 04:43 PM.


#75 chepas

chepas

    t.me/horsepin

  • Members
  • PipPipPipPip
  • 1,966 posts

  • Flag: ---------

  • Favorite Pinball: BSD, Tr0n, SW:Stern

Posted 28 January 2014 - 06:58 PM

Sorry, what I meant was depending how some tables are made. Meaning some will not instantly work in a desktop view. Like the other editors, you can chop & change view without any issues.

 

I got my answer anyhow, which was no different. Getting confused by 3d render being thrown out there.

 

 

also we need to move towards real materials and real lighting later-on, as this will give artists much more freedom and much less pain to get things looking "correct"..

but i'm now drifting away from the initial DX9 port work, sorry.. ;)

 

Yes, lol. Same here, excuse me. But surely it lifts away some limitations you had before.


Edited by chepas, 28 January 2014 - 06:59 PM.

Bump maps are the new auto-tune :BDH:
VPX - RSS Updates ---- blog.flippingflips.xyz/en/ -- Visual Pinball No.1 (2021) . Est.2000


#76 lio

lio

    Enthusiast

  • VIP
  • 216 posts
  • Location:Hamburg

  • Flag: Germany

  • Favorite Pinball: Theatre of Magic

Posted 28 January 2014 - 09:02 PM

wohooo! I really enjoy these "tech-renders" - the progress that's visible here is insane!

just to make sure I don't missunderstand anything here: those images are still "prerendered", right? it's not rendered in real time with a moveable camera, or is it?

(totally unrelated but I wish the pro-pinball devs would provide 1/10th of the updates of work in progress we get here over at their VIP forum! ;-) )



#77 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 28 January 2014 - 09:29 PM

wohooo! I really enjoy these "tech-renders" - the progress that's visible here is insane!

just to make sure I don't missunderstand anything here: those images are still "prerendered", right? it's not rendered in real time with a moveable camera, or is it?

(totally unrelated but I wish the pro-pinball devs would provide 1/10th of the updates of work in progress we get here over at their VIP forum! ;-) )

 

Let me explain a bit. In the old engine, it was the case that the background was statically prerendered, and then all the movable items were also prerendered in various states of animation into little frames, which were during gameplay overlaid onto the background. So, basically everything you saw with very few exceptions (newer stuff like alpha ramps and primitives) were basically 2D images composited to look like a coherent 3D scene.

 

This approach doesn't transfer well to DX9, so in step 1 I changed most moving items (you can check the list) to render dynamically as true 3D objects in every frame. This is what you already see in the screenshots. However, the background and all static elements (walls, non-transparent ramps and so on) are still pre-rendered. In principle, it wouldn't be too difficult to make also these dynamic and have a movable camera. The big question mark here is performance. On the other hand, other games like FP and TPA also manage to do this stuff in full realtime, so I see no reason why it can't become a reality for VP in the future.

 

About Pro Pinball: I know, right? I also keep refreshing their Updates page, yet nothing happens....



#78 LoadedWeapon

LoadedWeapon

    The Night Owl..

  • Members
  • PipPipPipPipPip
  • 2,572 posts
  • Location:South Carolina USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek TNG



Posted 29 January 2014 - 02:06 AM

Wow gone 2 days and come back to dx9 lol... Great work so far and I can't wait to see the new VP in action..  :love39:



#79 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 29 January 2014 - 08:49 AM

Sorry guys, no updates from me today! Last night I just wanted to play some pinball instead of hacking on it for a change :)

 

And the next couple of days I'm on vacation with my girlfriend, so nothing will happen over the weekend. But I'm quite happy with the progress so far and will be eager to continue once I'm back!



#80 fuzzel

fuzzel

    spaghetti code

  • VP Dev Team
  • PipPipPipPipPip
  • 2,818 posts

  • Flag: Germany

  • Favorite Pinball: yes I have

Posted 29 January 2014 - 09:10 AM

Hey enjoy your trip :)