Emm... are you sure that's the only change you did? I have tried that and it gives me a bad result with your code. Can you upload the version which works fine?evgiz wrote:kikito wrote:
EDIT: Solved it! I changed this line in vox_model:readChar from self.str:len() to self.str:len()+1
Code: Select all
if self.index > self.str:len()+1 then return 0 end
Sprit3r - 3D model viewer for spritesheets
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Sprit3r - 3D model viewer for spritesheets
When I write def I mean function.
Re: Sprit3r - 3D model viewer for spritesheets
That animated purple cube is amazing, it looks very "organic" if that makes any sense. Might have to play around with that
I'll see if I can get the project on github soon too!
I'll see if I can get the project on github soon too!
Check out the .love in my original post, its the updated version. Im pretty sure I only changed that line in vox_model and another line in vox_texture (to flip the image), could be wrong tho... But anyways I got it to work so no need to take any more of your timekikito wrote:Emm... are you sure that's the only change you did? I have tried that and it gives me a bad result with your code. Can you upload the version which works fine?
Computer science student and part time game dev! Currently working on Depths of Limbo!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
Re: Sprit3r - 3D model viewer for spritesheets
the code is very simple, but in moonscript: https://github.com/s-ol/demoloops/blob/ ... d.moon#L31evgiz wrote:That animated purple cube is amazing, it looks very "organic" if that makes any sense. Might have to play around with that
I'll see if I can get the project on github soon too!
Check out the .love in my original post, its the updated version. Im pretty sure I only changed that line in vox_model and another line in vox_texture (to flip the image), could be wrong tho... But anyways I got it to work so no need to take any more of your timekikito wrote:Emm... are you sure that's the only change you did? I have tried that and it gives me a bad result with your code. Can you upload the version which works fine?
converted to Lua:
Code: Select all
local width, height = lg.getDimensions()
love.graphics.translate(width / 2, height / 2 + 70)
local function draw(i)
love.graphics.push()
love.graphics.translate(0, -120 * i)
love.graphics.scale(1, 0.5) -- perspective shortening
love.graphics.scale(1 - 0.1 * math.sin(self.time + i * 2)) -- pyramid/bulge effect
love.graphics.scale(0.8 - i * .4 * math.cos(self.time)) -- global zoom
love.graphics.rotate(self.time / 4) -- global rotation
love.graphics.rotate(i * .6 * math.cos(self.time)) -- skewing
love.graphics.setColor(self.shades[i])
love.graphics.rectangle("fill", -80, -80, 160, 160)
return love.graphics.pop()
end
for i = 0, 1, 1 / (20 + 19 * math.sin(self.time / 2)) do
draw(i) -- this does all the 'stacking' magic
end
draw(1)
Re: Sprit3r - 3D model viewer for spritesheets
Impressive result in such a few lines of code!s-ol wrote: the code is very simple, but in moonscript: https://github.com/s-ol/demoloops/blob/ ... d.moon#L31
Here it is! https://github.com/evgiz/sprit3rUlydev wrote:I love it! You should put it on Github if it isn't already
Computer science student and part time game dev! Currently working on Depths of Limbo!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
- thatcosmonaut
- Prole
- Posts: 9
- Joined: Sun Nov 06, 2016 6:04 pm
Re: Sprit3r - 3D model viewer for spritesheets
this tool looks amazing, about to play around with it now.
If you wouldn't mind, could you add a license to the github repository? If you don't know which one to choose this site helps you decide: http://choosealicense.com/
If you wouldn't mind, could you add a license to the github repository? If you don't know which one to choose this site helps you decide: http://choosealicense.com/
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Sprit3r - 3D model viewer for spritesheets
That site's missing the best license of them allthatcosmonaut wrote:this tool looks amazing, about to play around with it now.
If you wouldn't mind, could you add a license to the github repository? If you don't know which one to choose this site helps you decide: http://choosealicense.com/
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Sprit3r - 3D model viewer for spritesheets
It's my first time using github for my own project, so I overlooked the need for a license. I've added the MIT one now, thanks for the heads up!
Computer science student and part time game dev! Currently working on Depths of Limbo!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Sprit3r - 3D model viewer for spritesheets
I was still finding some weird stuff so I have done more tests and found an error: in the generation of the texture, point coordinates need to be offset by 0.5 on the x and y coordinates in order to be precise. Otherwise, pixels might be drawn at the wrong coordinates.
I sent a pull request on Github.
I sent a pull request on Github.
When I write def I mean function.
Re: Sprit3r - 3D model viewer for spritesheets
Since I'm not a pixel artist but wanted to try it, I kinda messed up and noticed two bugs in the process:
- single frames mess it up, the UI still works but only the menu button has an effect and loading doesn't work either, also, the layer distance gets set to infinity (this is why one should always consider edge cases, someone (me) will be stupid enough to try them)
- it can only handle frames in rows, not in columns (the editor i used defaulted to the latter)
Re: Sprit3r - 3D model viewer for spritesheets
Not sure I understand exactly what you mean by this. If there's only one layer? Like a square image? Should probably be an easy fix.raingloom wrote: Single frames mess it up, the UI still works but only the menu button has an effect and loading doesn't work either, also, the layer distance gets set to infinity (this is why one should always consider edge cases, someone (me) will be stupid enough to try them)
This was intentional, but I can see how its kinda limiting. It'd be preferable to have a choice here (perhaps even selecting tiles manually) but I'm not sure I can find the time to implement that myself.raingloom wrote: It can only handle frames in rows, not in columns (the editor i used defaulted to the latter)
Thanks for the feedback!
Computer science student and part time game dev! Currently working on Depths of Limbo!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
Check out the game website DepthsOfLimbo.com!
And my personal website with all my projects evgiz.net!
Who is online
Users browsing this forum: No registered users and 4 guests