Stencyl 3.4.0 is now out. Get it now!

3D Library Adventure

mdotedot

  • *
  • Posts: 1272
Someone uploaded the untitle rifle. Very nice.
It is missing the mtl and possibly the texture jpg/png.
If those were uploaded as well it might be more awesome :D
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

NobodyX

  • *
  • Posts: 1197
As someone with almost zero 3d experience (but some programs downloaded), I was able to make a simple (and terrible) 3d model from scratch in sketchup, use blender to convert the dae into an obj, and then got it into your viewer in just a few short minutes and it worked!!!! Super exciting!!! I'd love to be able to use this to insert 3d models for special effects in 2d games.
“If you wind up with a boring, miserable life because you listened to your mom, your dad, your teacher, your priest, or some guy on TV telling you how to do your shit, then YOU DESERVE IT.”
― Frank Zappa

fillergames

  • Posts: 735
I uploaded the weapon model thing. Didn't expect it to stay there when I left my browsing session, so I uploaded the quickest thing I could find in .obj on my side.

It was just a high poly version of a model from an N64 game. The normals seem to have been messed up, which might have been an error on my side of exporting.

I assume it didn't load the texture because it wasn't in common picture format, it's suppose to look like this:



No idea what happened with this model. It's suppose to be a house with some rocky areas.



One thing that would be neat would be to use the mousewheel to adjust zoom. If that's possible.

« Last Edit: September 15, 2017, 04:24:29 pm by fillergames »

mdotedot

  • *
  • Posts: 1272
Thanks Guys!

@Fillergames: For mobile devices the wheel won't do much, so I opted to use the scale button.

All new models (hello, untitled an house) complain about missing there .mtl counterparts.
As those files do have a reference to the mtl it should be found on the computer where you uploaded it. Mostly they reside in the same folder. If you just downloaded an obj from the internet then you might have a harder time to look for the .mtl

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

mdotedot

  • *
  • Posts: 1272
There is now also a MD5 viewer.

You can upload a MD5MESH and when you want to animate you can upload a companion MD5ANIM.

In the future extension you would be able to load materials for the submeshes. I now use the same material for all submeshes.

Also, as for the Wolf you need to scale it way up to > 200 to actually see something.

The HellKnight figure that came with the Away3D examples have several md5anim you can use.



To upload and access the MD5 Viewer:  OBJ and MD5 Viewers

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

fillergames

  • Posts: 735
How does MD5 support textures?

That way, I can ensure it's not texture-less.

mdotedot

  • *
  • Posts: 1272
I'm not sure what you are asking?!
Do you wonder how the extension will support textures for MD5?
Or how the md5mesh supports it?

I'm not an expert on MD5. It is just trial and error usuage of what I've found.

This is what I noticed:
In the md5mesh file there are these mesh { } parts. The first line inside it has a shader component.
That usually is a png , tga or png file reference.
For the HellKnight example this part is of interest:
Code: [Select]
mesh {
    // meshes: salivamesh
   shader "models/monsters/hellkinght/gob2"
In Blender I've made an example and the material I bound to the object appeared as a shader in the md5mesh file.

In the Away3D example code they have for the hellknight two materials. One for the body and one for everything else.

A few posts ago I have written a change on the md5parser where I take that shader line to bind textures/materials in the future extension.

If you want to know more about MD5 you could look at youtube video on it and/or wikipedia article on the MD5 Doom format.

If I entirely misunderstood your question, then I'm sorry and hopefully you can rephrase the question a little bit.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

fillergames

  • Posts: 735
That's exactly was I was asking about.

What plugin did you use for MD5 export on Blender? As I can't find one that doesn't create errors on export.

mdotedot

  • *
  • Posts: 1272
Yeah the process of exporting animations from Blender is real tricky.

I tried to follow these steps (installation instructions for different blender version are important)
https://www.katsbits.com/smforum/index.php?topic=178.0

I've managed to do some exports but not all. For instance the Bob blender file that were online (don't recall exactly what location I've found it) did not work with the steps. At least I'm not comfortable enough in Blender to know what steps I need to alter to make the export work.

I was glad I could make a little animation involving a cube to work but it took way more time than I was expecting.

You might have more experience with Blender to follow the steps on that link ?!?!

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

fillergames

  • Posts: 735
It seems like the MD5 export is broken on newer versions of Blender? As it was last documented for versions 2.5+

I spent quite a bit getting it to work, and it resulted in nothing.

mdotedot

  • *
  • Posts: 1272
Last week I’ve worked on a 3D Mesh Generator. I want to make a game  with this Away3D library instead of ‘just’ some ported examples.

Unfortunately I can’t remember where I saw the idea to create a 3D Object where all the walls are connecting. This way a grid/maze can be done very cheaply. If you want to do the same with cubes it will take far more memory/collision detection etc…

So I’ve made an editor where you can make a maze. You can even procedural generate some of it and later adjust.

Generating paths was not so difficult but to transform the maze to vectors was a challenge.

I finally found something neat that I could use:

http://devblog.phillipspiess.com/better%20know%20an%20algorithm/2010/02/23/better-know-marching-squares.html

So this is the end result:





You can play with it yourself if you would like:

Mesh Generator


Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

merrak

  • *
  • Posts: 1633
This is pretty neat! Is there a way to see the maze I generated in 3D?

I added marching squares to my own list of "need to know algorithms". It looks a lot like the "growing squares" algorithm I used to make rectangle-shaped regions out of a polygon.

mdotedot

  • *
  • Posts: 1272
Hey Merrak,

Glad you liked it! The animation they had on the webpage was awesome and gave me instant convidence. Porting the code took me less than I would have anticipated.

I'm working on the 3D viewer now :D

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

mdotedot

  • *
  • Posts: 1272


New version with which you can also view the mesh.

Maze Generator Viewer

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

merrak

  • *
  • Posts: 1633
Neat to see the 3D results :)

I'm not sure how the editor works, though. I edited my maze and clicked "Generate 3D", but didn't see a change. I assume I need to recompute the vectors, (since the blue outline didn't change), but I'm not sure how.