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.

AppGameKit Classic Chat / AGK Export vertex colors

Author
Message
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 19th Apr 2021 13:04 Edited at: 19th Apr 2021 13:08
Hi there. I'm still around ... the covid19 has not been able to defeat me .

Lately I've been fiddling with the directx again . To export an object , if we are going to use only vertices color , we don't need the normals or texture coordinates but the position of each vertex x,y,z and its colors... this reduces the final file quite a bit. I have made a small example showing how we can export (write) .x files from AppGameKit . I have the same example exporting boxes that I use in my voxel creator and it works like a charm . I hope this example can be useful and inspiring for someone.





More to come if I feel myself motivated .
I'm not a grumpy grandpa

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 19th Apr 2021 13:20 Edited at: 19th Apr 2021 13:28
great stuff chafari as always
i changed line 51 to this OpenToWrite (1,"raw:"+GetReadPath()+"media\planes.x", 0 )

have you got a universal direct .x exporter with the normals etc

I think that could be modified to suit a plane mesh thats had its vertices modified

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 19th Apr 2021 14:52 Edited at: 19th Apr 2021 14:57
Thanks fubarpk.....yeah....I made my own .x exporter long ago when puzzler was here. I have an exporter that works great from Dbpro and I translated to Agk and you can export normals , textures , colors and now vertex colors. This last example was made with the purpose of export .x from any 2D engine. We really do not need a 3D program to write Obj or .x and even your own format based in vertex and triangles. Let me know what you need .

Cheers
Edit. The x exporter I made can only export static meshes...not animation .
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 19th Apr 2021 22:31 Edited at: 19th Apr 2021 22:31
If it can do static meshes with normals that would be great

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 19th Apr 2021 22:55
Yeah ....in Dbpro it was so easy to split the whole object and limbs into triangles to read better index data and save it to .x or Obj. When I translated my exporter, I made some test in Agk and I have exported correctly normals and texture coordinates ....even animation that I had to do on the fly. What I didn't sucsses was loading an animated mesh and export to animated .x . When we study the object, and we know what to export, I'm sure that can be posible .

Cheers.
I'm not a grumpy grandpa

Login to post a reply

Server time is: 2024-04-25 09:18:47
Your offset time is: 2024-04-25 09:18:47