Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

137 Neutral

About WOsborn

  • Rank
  1. In DX11 and prior to draw to an off-screen texture (renderTarget) you would do something like this: dx11_dev_context->OMSetRenderTargets(1, &_color_view, _depth_view); And any draw calls after that would get sent to that texture until another OMSetRenderTargets() was called. This allowed a bind() in a high level function and then draw all objects in a lower scene-graph draw().   My question is in DX12 how is this type of scenario accomplished? Does every CommandList need to do a cl->OMSetRenderTargets() call so that if a Draw call is made it knows where to go?   Is it and option to:   CL0 {    Transition::RenderTarget   OMSetRenderTargets()    ClearRenderTargetView } CL1 {   IASetPrimTop   IASetVertexBuffer   ....   Draw scene objects } CL2 {    Transition::Present }   CommandQueue->execute(CL0,CL1,Cl2);
  2. WOsborn

    IPhone Touch Screen

    Check this out... Traffic Rush by Donut Games As for your question about knowing which direction. On touch DOWN: record 2d location of touch On touch UP: record 2d location of release vec2d screen_direction = normalize(vec2d(UP.x, UP.y) - vec2d(DOWN.x, DOWN.y));
  3. WOsborn

    Max Script Exporter

    -- this works on editableMeshes -- for editablePolys look for 'polyop' documentation in MAXScript Reference obj = $ nFaces = getNumFaces obj for f = 1 to nFaces do ( fc = getFace obj f -- returns array of vertex indicies #(0,2,3) for v = 1 to 3 do ( vOn = fc[v] as integer -- current vertex p = getVert obj vOn -- returns world vertex position n = getNormal obj vOn -- returns world vertex normal uv = meshop.getMapVert obj 1 vOn -- return UV coord for vertex from mapChannel 1 format "F:% V:% % % %\n" f vOn p n uv ) )
  4. -- Scene materials: for s in scenematerials do ( print s ) -- Material Editor materials: -- doesn't mean they are actually used in scene -- array size I think is 24... number of material slots in material editor for s in meditmaterials do ( print s ) In my opinion, don't worry about creating one big list.. process the two types of objects separately. If they are meant to be used together then go ahead and parent them as such and use the 'obj.parent' or 'obj.children' accessors.
  5. MaxScript help for 'ObjectSet Values' -- helpers in scene for h in helpers do ( print h ) -- geometry in scene for g in geometry do ( print g )
  6. WOsborn

    simple length reduction

    p1 = (0,0,0); p2 = (10,10,5); v = p2 - p1; v = v * 0.5; // <---- 50 % n = p1 + v; // new position (5,5,2.5)
  7. WOsborn

    MAXscript: Getting vertex weights...

    I haven't written a skeleton exporter in a long time so this might be a little off. For each bone you want to write its local position and rotation releative to parent. The ROOT bone will be in world_space. For every CHILD bone you want to take its transform and multiply against the inverse of its parents transform. That will give you its local transform. -------------------------------- trans = bn.transform if ( bn.parent != undefined ) then trans = trans * (inverse (bn.parent.transform)) t = trans.translationpart // point3 r = trans.rotationpart; // quat -------------------------------- For animations I think you want to write the transform difference from the last frame. Side Note: You should look at Cal3D. It's an easy to use skeletal animation library. It comes with maya/max exporters. It's opensource so it is good for reference even if you don't end up using it.
  8. WOsborn

    MAXscript: Getting vertex weights...

    First of all.... dont use max keywords as variable names. bone mesh The problem you are having is that you are getting total number of bones used in skin modifier. You want the total number of bones weighting a given vertex. I updated your code to also switch to the modify panel. You should turn on 'Macro Recorder' so you can see all the commands Max is doing underneath. --------------------------- msh = $body select msh max modify mode -- get bone info bones_total_count = skinops.getnumberbones msh.modifiers[#skin] vertex_count = getNumverts msh --getnumvertices -- loop through all mesh vertices in this mesh for i = 1 to vertex_count do ( -- loop through all bones affecting this vertex vertex_bone_count = skinOps.GetVertexWeightCount msh.modifiers[#skin] i for bn = 1 to vertex_bone_count do ( weight = skinops.getvertexweight msh.modifiers[#skin] i bn ) )
  9. WOsborn

    Game ENGINE vertex TYPES??

    I'm mobile right now so I can't post any code but what I did was make it dynamic. I read the format that the mesh file needs, build a 'fake' shader using a stringstream and then ask dx10 to create that input. Then store it for lookup later on.
  10. WOsborn

    [MaxScript] A verts question..

    Calculate a top down 2D rectangle of all verts in an object. Then do a objRECT vs cellRECT on every cell on your plane. If the RECTs intersect then you know some part of that object is in that cell. google: Rectangle intersection
  11. WOsborn

    TCP and UDP together?

    Check out the network section on this website: Really good stuff.
  12. WOsborn

    DirectX font class problem!

    Did you check the result of 'bool TEXT::initFont()'??? Is it true? I don't see where you set the 'd3ddev' value. Maybe you return false and then try and use a bad font pointer.
  13. WOsborn

    Screen space fonts

    I use FTGL for openGL text rendering. This should get you headed in right direction: //Init() #include <FTGLBitmapFont.h> const char* font_name = "Arial.ttf"; FTFont* FTGL_font = new FTGLBitmapFont( font_name ); //---------------------------------------------- // Render() // set color glColor4f(1,0,0,1); // set screen location glRasterPos2d(screen_x, screen_y); // clear some openGL state glUseProgramObjectARB( 0 ); glActiveTextureARB( GL_TEXTURE0_ARB ); const char* frames_per_second = "Frames per second: 60"; FTGL_font->Render( frames_per_second );
  14. WOsborn

    help on vertex colors painting in max

    Just add 2 vertex paint modifiers.. one for color one for alpha Then just paint black to the alpha vp modifier use 'getMapSupport' maxscript functions to check the data: meshOp.getMapSupport <mesh> <channel> color channel = 0 illum channel = -1 alpha channle = -2 Use the 'Layers' section in the vertex_paint floater
  15. WOsborn

    From Point A to Point B

    You asked: 'What is the formula required to find out the angle required to proceed from point a to point b in 2D?.... I suppose the first thing to do would be to find out the angle required to face the desired point in space' I told you the answer. You have to apply it to what your doing. I'm guessing your angle is from 0-360 degrees? If so you need to convert that to a normalized direction vec2 for each 'ObjectShip'. GOOGLE: '2d rotation' LINK: So if your initial direction for a ship is [0,1] or 0 degrees, then you would rotate that point how it is described on that link to find your vec2 direction. Then plug those directions into the code I gave you... not the positions. With the resulting 'angle_degrees' you can decide to rotate or impulse.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!