Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 29th Aug 2021 03:49 Edited at: 1st Sep 2021 06:58

To add a second material to an object use a Blender node not a cycles node and add a material to is the node does not need to be linked or a files associated with it it just needs to exist.
Zip file included with all files and a full scene properly set up for testing
may build upon this in the future to import diffuse/spec and rgb of lights as well as auto loading
of normals and multiple obj file types but prolly not cause it servers my purpose and ive moved on to python.
https://vimeo.com/594009768



Attachments

Login to view attachments
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 29th Aug 2021 05:21
I am pretty sure you could box this and sell it!

What I have been doing is using blender 2.9 to do my main work and then back porting to 2.79 via FBX and export from there to get the animations to work, maybe that method will work for this too.

Thanks for sharing, this is pure gold.
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 29th Aug 2021 06:01
if you already downloaded the file please redownload it ive updated it instanced objects were not being created properly

Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 29th Aug 2021 09:06
I am using Blender 2.93 LTS, can't imagine to go lower than Blender 2.80 anymore.
But such a tool is very need and could speed up the development time with App Game Kit and 3D environments a lot
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 29th Aug 2021 16:43
Well u can always import it into 7.9 then export as .x. i feel it's worth it. It's like having an insane level editor built into agk.

ruckertheron
8
Years of Service
User Offline
Joined: 12th Nov 2016
Location:
Posted: 30th Aug 2021 00:03 Edited at: 30th Aug 2021 00:11
also if this helps as well, not instead of... nice exporter by the way... I am trying out python and I wrote a script that will list info.. still messing around but for 2.92 Blender so far it prints out this:

objects parse [objectname], [xpos],[ypos],[zpos],[xang],[yang],[zang],[xscale],[yscale],[zscale]
lights parse [lightname],[light power],[light color]

smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 30th Aug 2021 00:08
Well this is an exporter and an importer. The python script I imagine would work just as well for the export part, but I also wanted everything to be native agk

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 12th Nov 2021 14:58
Hi, this is great, thank a lot !!!!

I will try it and it works fine.
I still use blender 2.76 ^^ for lots of my games (and 2.90)

I only have errors with images which isn't power of 2 and setImageWrapU/V.
I think you should use image with power of 2 when you use wrap .

Thank you again, I will try it on a big scene .

Another things which could be great would be to create a file with :
- named objet +its textures names

So it would be easier to use :
- loadObject()
- SetObjectMeshTextures()


When I export my scene with 3 objects, in .x (blender 2.76), I only get 1 object with GetObjectNumMeshes(). So I hope your exporter/importer will works event if agk doesn't find more than 1 mesh .

AGK2 tier1 - http://www.dracaena-studio.com
Amon
10
Years of Service
User Offline
Joined: 30th May 2014
Location: Shropshire, United Kingdom
Posted: 16th Mar 2022 20:06
Does this work with the newest Blender 3.1?
Win 10 Pro - AMD RYZEN 9 3950X 64GB DDR4 - RTX 2080 SUPER
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 2nd Jun 2022 05:02
nope only 2.79 an below because the new one doesnt support.x addon

GOTO HelloWorld!
11
Years of Service
User Offline
Joined: 21st Oct 2013
Location: Skyrim,...and lost in it!
Posted: 2nd Jun 2022 17:07
That seem fantastic!!!

But please explain;

Where do i put these files? i extract to my AppGameKit folder? or into each and every project i am working on if i need a level?

if i follow;

1- I create a level in Blender and export as .X from the 2.79 Blender (as it is the only one still having the .X exporter)
2- I create a new project in AppGameKit in which i have your program
3- I save my Blender level as "text.x" in "media/import" folder (i have to create the folder "import" into the already created "media" folder?
4- In media folder, i place all the textures needed for that level
5- i add the following code to my game
#include "Init_engine.agc"
Init_engine()
CreateLevel()

This will ( i am trying to understand here) take the multitude of objects i use to create my level in Blender and create, a file, a list of objects with rotation. scaling, texture and position WITHOUT ME HAVING TO import IT ALL BY code in AGKS???

Then i comment off like this
//CreateLevel()

and i uncomment
loadlvl()

and run my game again and my level will load?

if that work, TGC need to hire you... Thank you so very much, we needed this terribly!!!
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 11th Jun 2022 04:37 Edited at: 11th Jun 2022 06:10
Yes that is pretty much how it works goto hello world lol. Its job is to parse the existing .x scene file and converts it into all of it sub objects, the texture rotation color ect information is grabbed form the .x file. At then creates a lvl load script that basically has all objects and their textures and coordinates that can be loaded with load level. load level will load all objects into a object type and after that its up to the user to decide what to do with their objects. ideally you could just sort by name and have it automatically apply shaders to objects with a glass or metal in their name or even based off texture. could get quite fancy with it. I just do small agk projects when i get time i don't think tgc could afford me i get to spend all day at work playing with python and plcs for a ridiculous pay rate. If agk would give me an api i would publish a killer 3d level editor for agk. cant be bothered dealing with plugins or tying to set up teir 2.


Attachments

Login to view attachments
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 7th Jul 2022 19:56
here is a link to a video on using it https://vimeo.com/594009768

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 10th Jul 2022 11:49
Excellent work Smurf I was lucky enough to test in early days a great project for sure cheers
PK

Login to post a reply

Server time is: 2024-11-23 08:03:41
Your offset time is: 2024-11-23 08:03:41