• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By 51mon
      Hey
      I'm dealing with ribbons following the shape of multiple spline segments. It's straightforward to compute the direction at any point along the spline. However the ribbon also got a flat shape and I'm struggling with finding a way to compute the angle of the ribbon in the plane perpendicular to the direction.
      To illustrate what I mean here's a piece of code that almost worked:
      float3x3 rotMtxFromSpline; rotMtxFromSpline[1] = normalize(splineDir); rotMtxFromSpline[0] = normalize(cross(float3(1, 0, 0), rotMtxFromSpline[1])); rotMtxFromSpline[2] = cross(rotMtxFromSpline[0], rotMtxFromSpline[1]); // Rotate rotMtxFromSpline[0] in the rotMtxFromSpline[0]-rotMtxFromSpline[2]-plane to align with float3(0, 0, 1) dir rotMtxFromSpline[0] = normalize(dot(rotMtxFromSpline[0], float3(0, 0, 1)) * rotMtxFromSpline[0] + dot(rotMtxFromSpline[2], float3(0, 0, 1)) * rotMtxFromSpline[2]); rotMtxFromSpline[2] = cross(rotMtxFromSpline[0], rotMtxFromSpline[1]); The problem with this code is when the spline segment becomes perpendicular to (0,0,1)-dir as the orientation switch from one side to the other very easily.
      The approach above is kind of a global approach and I'm thinking if there's a way to append some info to each spline segment to remedy the issue.
      Anyhow I wanted to post this question in case anyone had a similar problem that they solved or maybe anyone know some web resource dealing with this issue?
       
      Thanks!
    • By Ricardo3Ddev
      Hi guys!
      This is a independent game being produced by me and my brother. We’ve been working on it for about 6 months and we’ve already done a good part of the game. We hope to finalize and make it available on Steam by the end of this year.
      We are using Blender 3D and Gimp software for production.
       
      About the Game: Dongo Adventure will be a 3D platform style game, where the main character (Dongo) is a mouse that ventures through various scenarios (sewers, culverts, streets, electric grid, etc.) and faces several enemies along the way (cockroaches, mosquitoes, spiders, toxic gases, electrical wires, etc.). He carries a basket / backpack with cheeses that he uses to throw and defend himself from enemies, as well as being able to push objects that helps him to overcome obstacles. The ultimate goal will be a surprise!
       
      Now we are developing new scenarios and enemies. We hope to publish news soon...
      Game page on Steam: http://store.steampowered.com/app/811450/Dongo_Adventure/ - (Teaser UPDATED)
      Dongo Adventure - Indie Game Project (First Teaser) https://www.youtube.com/watch?v=X2nmxtkE0xk
       
      Thanks for following the project!

    • By Epicghost 505
      Hello,
      We are looking for people to be apart of a team, to help create a horror game we are looking for 3d modelers, coders, artist, animators, fx artist, level designers, and audio design, there will be a payment plan once release of game                                                                                                                                                                                                                                                                                              if your interested come join our discord                                                                                                                                                                                                                                                                         We hope to see you there
      https://discord.gg/6rcc6xr
      -Epicghost505
    • By lxjk
      Hi guys,
      There are many ways to do light culling in tile-based shading. I've been playing with this idea for a while, and just want to throw it out there.
      Because tile frustums are general small compared to light radius, I tried using cone test to reduce false positives introduced by commonly used sphere-frustum test.
      On top of that, I use distance to camera rather than depth for near/far test (aka. sliced by spheres).
      This method can be naturally extended to clustered light culling as well.
      The following image shows the general ideas

       
      Performance-wise I get around 15% improvement over sphere-frustum test. You can also see how a single light performs as the following: from left to right (1) standard rendering of a point light; then tiles passed the test of (2) sphere-frustum test; (3) cone test; (4) spherical-sliced cone test
       

       
      I put the details in my blog post (https://lxjk.github.io/2018/03/25/Improve-Tile-based-Light-Culling-with-Spherical-sliced-Cone.html), GLSL source code included!
       
      Eric
    • By Octane_Test
      I am developing a mini golf game in Scenekit. I have applied dynamic physics body to the ball and static physics body to the grass surface and the brick walls show in this image.
      Issue:
      When I apply the force to the ball, the ball’s linear and angular speeds change as shown in the graphs.  The ball’s speeds don’t reduce to zero (so that the ball can stop) but remains constant after certain value.
      Ball linear speed graph
      Ball angular speed graph
      Analysis Tests:
      When I increase the values to both the rolling friction and the friction, the ball speed is reduced quickly but remains constant after certain value (similar to the above graphs). When I increase the values of the linear damping and the angular damping, the ball speed behavior is same as the point #1. When I set the gravity value to -9.8 m/s2, the ball’s linear speed remains constant after 0.1 m/s. If I reduce the gravity value to -5 m/s2, the ball’s linear speed remains constant after 0.05 m/s. The friction, linear friction, linear damping and angular damping are same throughout the motion of the ball.
      There is 1 millimeter overlapping between the ball and the surface of the golf course.
      Questions:
      From the analysis test #3, I think the gravity is causing the constant ball speed issue. Is my assumption correct? If yes, how can I fix the issue? I can’t remove the gravity field as without the gravity field the ball will not roll along the grass and it will slide. Why the friction and the damping properties are not affecting the ball speed after certain value?
      Are there any other physics properties can cause such issue?
      From the analysis test #5, are there any chances that the ball is receiving upward push to correct the position of the ball?
      Solutions:
      If I increase the physics timestep from 60 FPS to 200 FPS, the issue is resolved. I am not able to understand how this change can fix this issue? After reducing the gravity value to -1 m/s2 and physics simulation speed to 4 (4 times fast physics simulation), the issue is fixed. Again, I am not able to understand how this change fix the issue? I would appreciate any suggestions and thoughts on this topic. Thank you.
  • Advertisement
  • Advertisement
Sign in to follow this  

3D Mesh data (format)

Recommended Posts

Hi all,

As a part of my new framework/ 3D engine I've arrived at the point to go beyond nice cubes and spheres :)

My plan is to create a tool that will convert DCC output (I.e 3ds max) to a straight forward format I can load up in my engine (binary). The format will basically consist of sets of: vertices (in one defined format), face indices, material ID's and a transform to parent.

My question is about the transform. Would you store a position, rotation and scale? Or just a 4x4 matrix (I think assimp provides the latter).

For the tool to convert (pipeline), I aim to use assimp.

Besides the question on the transform, of course any feedback on the approach in general is appreciated.

Share this post


Link to post
Share on other sites
Advertisement

I've actually written (well attempted to write) my own modelling component of a game framework, and I can say from experience that it's a wheel not worth reinventing. It takes a lot of work, and you end up with more or less the same end product as something that you could just get off the internet and integrate into you engine/framework. Unless you truly have some optimization that has not been thought of before (or you just REAAALLLLYYY want to write this), why not borrow from the collective experience of the gamedev ancients, and either (1) use someone else's 3ds max importer, or (2) at worst, maybe get someone else's converter/exporter code to maybe convert models into a different format that you can use (e.g., Blender)?

There's no shame in that. As a comp sci professor once taught me: "Don't shade your eyes, plagiarize" :-D

Share this post


Link to post
Share on other sites

Thanks. I think I'm not far off that track. My tool will use assimp to load the DCC format, the only thing I'll do afterwards, is extract only the data I need to the format my engine will "eat".

Any thoughts on storing the child transform data? (Matrix versus individual offsets)

Share this post


Link to post
Share on other sites
1 hour ago, masskonfuzion said:

and either (1) use someone else's 3ds max importer

Are there any max file importer ?

AFAIK I only saw 3ds importers. And whereas I like 3ds, it is however very old and lacks useful recent things like per vertex normals, TBN, meta materials...

Share this post


Link to post
Share on other sites

At the moment of visual rendering you will use the composed matrix. If the the parenting transform is static, then importing already composed matrices is sufficient and effective. On the other hand, having the transform components separated makes sense if they are altered separately**, i.e. if animation is done, and the transform matrix is composed in the animation engine on the fly.

For static transforms it also may make sense to think about baking the transform into the geometry, so not using child transforms at all.

** Although interpolating matrices is possible, IMO interpolating more native representations is better.

 

Share this post


Link to post
Share on other sites

@_Silence_ : assimp can import .max according to the documentation.

I think I'll make a branch for the transform (offsets versus matrix), depending on animated or not. I also like the idea to "pre-transform" static mesh children, this can save quite some realtime matrix muls.

Share this post


Link to post
Share on other sites
4 hours ago, cozzie said:

My question is about the transform. Would you store a position, rotation and scale? Or just a 4x4 matrix (I think assimp provides the latter).

What format do you need the data to be in later? Are you going to send 4x4 matrices to a shader later? If yes, do you want to just copy the data directly into a constant buffer? If yes, then sure, that sounds great!
Are you going to send positions/rotations/scales into some kind of skeleton class that operates on that data? If yes, then sure, that sounds great!

Figure out where the data is flowing to and it will tell you how it should be formatted. Work backwards, start with the consumers of the data, then design the producers to fit.

Also, lots of engines restrict scaling to uniform / one-dimensional, while others support non-uniform / three-dimensional scaling. If you decide to allow the latter, that impacts how you write your shaders (normals cannot be transformed by your regular matrices -- you also need to pass the inverse-transpose of your matrices to your shaders). There's nothing wrong with limiting the kind of data that's permitted to be imported, and it's probably good to do some sanity checks over the input data and make some noisy errors if artists try to create content that your engine can't handle.

1 hour ago, haegarr said:

For static transforms it also may make sense to think about baking the transform into the geometry, so not using child transforms at all.

FWIW in my engine, I use a naming convention on the nodes in our DCC tool. If the artists create a node that begins with "M_", then I flag is as dynamic / important at runtime. If their nodes don't begin with that prefix, then I flag it as static / not required at runtime. Static nodes are collapsed into their parents, and their transforms are applied directly to the vertex data (a.k.a. baking). Dynamic nodes write out two 4x4 matrices -- an absolute node-to-world matrix (which can be copied directly into a constant buffer and used for rendering), and a relative node-to-parent matrix (which can be copied into my skeletal animation / ragdoll system).

Share this post


Link to post
Share on other sites
4 hours ago, cozzie said:

@_Silence_ : assimp can import .max according to the documentation.

I think I'll make a branch for the transform (offsets versus matrix), depending on animated or not. I also like the idea to "pre-transform" static mesh children, this can save quite some realtime matrix muls.

Well, according to this, no. Really, I never saw a max importer :) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement