Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sbf2009

Pages: [1] 2
1
Project announcement / Re: what p64 does
« on: April 15, 2019, 04:34:25 am »
The lesson I'm getting from this is that if you use SGL (meaning Jo Engine or Z-treme Tools as well,) the DSP will not play nice without a lot of extra considerations.

2
General Jo Engine Help / Re: Compilation Error: "Too many new sections"
« on: January 28, 2019, 11:42:30 am »
That makes sense, thank you. This probably happened as I was adding functions. I have a lot of mutual include statements, those should still be fine, correct?

3
General Jo Engine Help / Compilation Error: "Too many new sections"
« on: January 28, 2019, 03:42:04 am »
I was playing around with making a text based Mean Bean Machine clone. I was implementing a series print statements and I kept compiling and making progress with test runs. For some reason, I have suddenly come to a point where I am no longer allowed to compile. The full output of the compilation attempt is attached as an image. I don't think there's anything wrong with my actual code, but I have attached it in case that helps. I read here (https://stackoverflow.com/questions/16596876/object-file-has-too-many-sections) that it can be remedied in GCC through command line inputs, but the Jo Engine Cue Maker is something of a black box to me.

4
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 19, 2019, 01:39:03 am »
You may very well have just saved my ass.

Using Paint.net to make .TGA's with 24-bit color depth and no compression gives me valid textures.

Exporting quad based blender objects to .obj Wavefront files with with materials named identical to said .TGA's allows me to use the model converter.

Using the model converter with 0 keyframes (for a still model) and the same scale as the corresponding line of code:
Code: [Select]
jo_3d_set_scale(14,14,14);
gives me a valid model that will actually display in your test program.

I will be taking your program apart on my stream tonight to figure out what is needed and what isn't and transferring the appropriate portions to my main code (with attribution.)

Thank you so much. Hopefully the first half of tonight's stream can serve as a guide for others here. I'll try to be as thorough as my understanding allows so others can follow along when they're starting out.

5
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 18, 2019, 03:40:04 am »
Below is the blender file, textures, and obj export used to create the ZTP. I desperately want to solve this problem tonight. There muse be something I am doing incorrectly with making these models. Is there a stripped down version of a basic load a single 3D model code I can look at?

6
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 18, 2019, 03:37:54 am »
Well I have tried again, and these steps are not sufficient to display a model on the screen. I've attempted to make a simple quad based ball appear on screen using the code described, given your corrections.

Attempting to load this figure in a test code results in my code hanging. I also tried to display the SONIC.ZTP in XL2's code example, and that also hung.

I attempted to simply input my ball into XL2's example code:

Code: [Select]
//currentAddress = ztLoad3Dmodel((Sint8*)"SONIC.ZTP", currentAddress, &entities[0], 1);
currentAddress = ztLoad3Dmodel((Sint8*)"BALL.ZTP", currentAddress, &entities[0], 1);

My attempt to display a ball in XL2's code resulted in the attached screenshot.

Clearly there is more to displaying this model than the steps I described. Please tell me what I am missing.

This isn't even to mention the problem I am having even generating TGA files. I attempted to make 8x1 TGA files of single colors exported from gimp. They seem to have introduced some further error, as I could not even get as far as a broken ball render in XL2's code with them, so I had to use XL2's colors. I was really hoping to be able to get this problem solved before tomorrow so I could move forward with displaying multiple 3D objects on screen.

7
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 17, 2019, 03:09:52 am »
I've had a change to play with the blender files for XL2's model converter. So none of the models are actually textured, just labelled, and the converter applies the specified TGA files based on the name of the material. From what I can tell, the workflow is:

1 ) Create the model in blender. Materials act as a label for applied TGA textures of the same name. Correct orientation and deformation of textures will rely on a combination of experience and trial and error.

2 ) Export model as .obj file. Place .obj and .tga files in a sub-directory of the converter and run the batch script.

3 ) Header files and the .ZTP files are created in the /OUT/ directory of the converter. Copy over to your program's directory, preserving the relative file structure.

4 ) Copy over ZT folder with headers into your program's directory.

5 ) Include "ZT/ZT_COMMON.h" and the header file for your model.

6 ) Create a void pointer and asign it the memory location LWRAM as defined in ZT_COMMON.h, like so:

Code: [Select]
void * currentAddress = (void*)LWRAM;

7 ) Write your model to LWRAM using ztLoad3Dmodel() as defined in ZT_LOAD_MODEL.c like so:
Code: [Select]
currentAddress = ztLoad3Dmodel((Sint8*)"MODEL_NAME.ZTP", currentAddress, &entities[0], 1);

This will load your model in the entities array index 0 as defined in ZT_LOAD_MODEL.c

8 ) Preferably inside a function, define a pointer to an entity_t and loop through displaying polygons based on the number of meshes property of the entity_t struct, like so:

Code: [Select]
entity_t * model = &entities[0];
for (i=0; i<model->nbMeshes; i++)
{
    slPutPolygon((PDATA*)model->pol[i]);
}

Does this all look correct as a basic workflow of Blender model to in game render?

8
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 16, 2019, 04:26:52 am »
This is really helpful and will give me some stuff to consider over the next few nights while I go over the code.

As for the object loop code: I have a list of game_objects (maximum capacity 100) that can be created or destroyed. Each game_object has coordinates, rotations, speed, and pointers to vectors and quads to be used for rendering. Only the first num_object in the list of object[] are active, and are drawn via that draw function. You refer to objects as being drawn automatically by the game loop, but I have no idea what functionality you are referring to. The only working model I have of rendering 3D objects is from the 3D demo sample from Jo Engine itself, using the so called hard coded cubes.

The reason I'm using UV mapping is because when I originally tried to use per face images, Jo Map Editor complained about multiple texture files. It seems like the pipeline from object modelling to rendering in engine is not exactly covered in the documentation. If I ever figure this out, I may have to make a video just so there is some definitive guide to doing so.

I see inside the advanced 3D demo there are collada and wavefront files. After I make your prescribed code fixes, I'll try to import these into blender and see the exact structure I should be aping and exporting to get these to work properly.

Thank you.

9
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 16, 2019, 03:19:58 am »
I've attached my code in a .7z file.

I include the header on line 40, and draw on line 179 inside my main loop.

10
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 16, 2019, 02:53:35 am »
I see you aren't using UV maps. I map my textures with UV, should I not?

Also, while I can import your header and run the code, attempts to draw using
Code: [Select]
display_bpony_mesh();
inside the main loop doesn't seem to do anything. I also see that the coordinates appear rather large. I tried moving back to -1000000 along the z but still saw nothing.

11
Jo Map Editor / Re: Trouble with 3D Objects
« on: January 16, 2019, 01:54:18 am »
I've attached the blender, wavefront, and collada files in case that helps explain my problem.

12
Jo Map Editor / Trouble with 3D Objects
« on: January 16, 2019, 01:48:51 am »
I have been attempting to use the Jo Map Editor to convert basic 3D objects into the appropriate header files and drawing them in Jo Engine.

The model is a basic 3d cube using a single image texture. I've exported the model as both a Collada (.dae) and Wavefront (.obj) file.

Importing the .dae and attempting to draw it results in nothing being shown on screen, but the coordinates appear to be massive. They don't change no matter what size I make the cube in blender.

Code: [Select]
static POINT    PointCube[] =
{
{3276800, 3276800, -3276800},
{3276800, -3276800, -3276800},
{-3276800, -3276799, -3276800},
{-3276799, 3276800, -3276800},
{3276800, 3276798, 3276800},
{3276798, -3276803, 3276800},
{-3276800, -3276799, 3276800},
{-3276800, 3276800, 3276800},
};

The .obj fair even worse. Attempts at importing these files simply crash my game before anything can display.

Is there a guide or pipeline I can use for guidance on how to get my 3D models into Jo Engine?

13
The model is a simple cube in blender of default size 1.

I have been attempting to export it as a Wavefront (.obj) file. Using the Jo Map Editor,  I export it as a header. Simply including the header crashes my game to the point where even the printf statements don't appear. I think at this point, it'd be more appropriate to move over to the Jo Map Editor forum and pose my questions there, and return to the topic of backface culling later.

Thanks for the help.

14
Jo Engine Wish List / Re: Collectables demo
« on: January 15, 2019, 02:58:05 pm »
It sounds like more of a logic problem than an engine problem. You want to keep track of a collectible using some sort of static integer, then increment it or track it per level whenever the player sprite collides with the collectible sprite, then destroy the collectible sprite. If you want to track it on an individual basis, you'll want to track each collectible in an array of bools.

Since this isn't a Jo Engine specific problem, any tutorial on 2d game design featuring collectible objects should do, just adjust the rendering portion for Jo Engine.

15
I've attached the .dae I'm using to generate the header file if you wished to test it out yourself.

Pages: [1] 2
SMF spam blocked by CleanTalk